org.exolab.castor.builder.binding

Class BindingLoader


public class BindingLoader
extends java.lang.Object

This class is responsible for loading a binding document into an in-memory representation that is meant to be used by the SourceGenerator.
Version:
$Revision: 1.2 $ $Date: 2003/03/03 09:57:15 $
Author:
Arnaud Blandin

Nested Class Summary

(package private) class
BindingLoader.BindingResolver

Constructor Summary

BindingLoader()

Method Summary

static ExtendedBinding
createBinding(InputSource source)
Factory method that returns a binding given an InputSource.
static ExtendedBinding
createBinding(String fileName)
ExtendedBinding
getBinding()
Returns the binding loaded by the BindingLoader
void
loadBinding(InputSource source)
Loads a Binding Document.
void
loadBinding(String url)
void
setBaseURL(String url)
Sets the base URL for the binding and related files.

Constructor Details

BindingLoader

public BindingLoader()

Method Details

createBinding

public static ExtendedBinding createBinding(InputSource source)
            throws BindingException
Factory method that returns a binding given an InputSource. The InputSource identifies a Binding Document meant to be loaded.
Parameters:
source - the InputSource identifying the binding document to be loaded.
Returns:
a binding that contains the different component bindings to be used in the source generator.
Throws:
BindingException - thrown when the given InputSource doesn't refer to a valid Binding document.

createBinding

public static ExtendedBinding createBinding(String fileName)
            throws BindingException

getBinding

public ExtendedBinding getBinding()
Returns the binding loaded by the BindingLoader
Returns:
the binding loaded by this BindingLoader. This will return null if no call to loadBinding has been previously made.

loadBinding

public void loadBinding(InputSource source)
            throws BindingException
Loads a Binding Document. This method will load the binding document into a binding object and load all the included bindings along the way into a single collection.
Parameters:
Throws:
BindingException - thrown when an error occured during the unmarshalling.

loadBinding

public void loadBinding(String url)
            throws BindingException

setBaseURL

public void setBaseURL(String url)
Sets the base URL for the binding and related files. If the base URL is known, files can be included using relative names. Any URL can be passed, if the URL can serve as a base URL it will be used.
Parameters:
url - The base URL

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com