org.exolab.castor.builder.binding
Class BindingLoader
java.lang.Object
org.exolab.castor.builder.binding.BindingLoader
public final 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.
$Revision: 6936 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $(package private) class | BindingLoader.BindingResolver - EntityResolver specific to resolving entities related to the Castor XML
code generator binding file.
|
BindingLoader
public BindingLoader()
No-arg constructor.
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.
source
- the InputSource identifying the binding document to be
loaded.
- a binding that contains the different component bindings to be
used in the source generator.
BindingException
- thrown when the given InputSource doesn't refer
to a valid Binding document.
createBinding
public static ExtendedBinding createBinding(String fileName)
throws BindingException
Factory method for unmarshalling an
ExtendedBinding
instance from the
binding file as identified by the given file name.
fileName
- Binding file name.
getBinding
public ExtendedBinding getBinding()
Returns the binding loaded by the BindingLoader.
- 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.
source
- The binding document to load.
loadBinding
public void loadBinding(String url)
throws BindingException
Loads the binding file from the
URL
given, and populates
the
ExtendedBinding
instance from the values given.
url
- The URL for the binding file to process.
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.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com