net.dpml.transit
Class TransitBuilder

java.lang.Object
  extended bynet.dpml.transit.TransitBuilder

public class TransitBuilder
extends Object

Utility class supporting the reading of Transit XML configurations.

Version:
1.0.0
Author:
The Digital Product Meta Library

Constructor Summary
TransitBuilder(Logger logger)
          Creation of a new transit configuration builder.
 
Method Summary
 TransitDirective load(URL url)
          Construct a transit configuration from a supplied uri.
 void write(TransitDirective directive, OutputStream output)
          Write a transit directive to an output stream as XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransitBuilder

public TransitBuilder(Logger logger)
Creation of a new transit configuration builder.

Parameters:
logger - the assigned logging channel
Method Detail

load

public TransitDirective load(URL url)
                      throws Exception
Construct a transit configuration from a supplied uri.

Parameters:
url - the configuration url
Returns:
the transit configuration
Throws:
Exception - if an error occurs during configuration loading

write

public void write(TransitDirective directive,
                  OutputStream output)
           throws IOException
Write a transit directive to an output stream as XML.

Parameters:
directive - the directive to externalize
output - the output stream to write to
Throws:
IOException - if an I/O error occurs