| java.lang.Object org.jibx.binding.generator.HolderBase
All known Subclasses: org.jibx.binding.generator.BindingHolder, org.jibx.binding.generator.SchemaHolder,
HolderBase | abstract public class HolderBase (Code) | | Base class for external data used in constructing a namespaced file which may
reference other files of the same type. This class tracks both the referenced
files and the corresponding namespace references, asigning prefixes for the
latter as appropriate. The namespace associated with this file is always
given the prefix 'tns', while those used for other files get prefixes of the
form 'ns1', 'ns2', etc.
|
Method Summary | |
abstract protected void | addNamespaceDecl(String prefix, String uri) Subclass hook method to handle adding a namespace declaration. | public void | addReference(HolderBase ref) Record a reference from this file to another file of the same type. | abstract public void | fixReferences() Implementation method for subclasses to handle the references from this
file to other files. | public String | getFileName() Get the file name to be used for this file. | public String | getNamespace() Get namespace URI associated with this file. | public String | getPrefix(String uri) Get the prefix for a namespace URI. | public Set | getReferences() Get the set of references from this file to other files of the same type. | public void | setFileName(String name) Set the file name to be used for this file. |
HolderBase | public HolderBase(String uri)(Code) | | Constructor.
Parameters: uri - (null if no-namespace binding) |
addNamespaceDecl | abstract protected void addNamespaceDecl(String prefix, String uri)(Code) | | Subclass hook method to handle adding a namespace declaration. The
implementation of this method needs to set up the namespace declaration
for output in the generated XML.
Parameters: prefix - Parameters: uri - |
addReference | public void addReference(HolderBase ref)(Code) | | Record a reference from this file to another file of the same type. This
adds the reference to the set of references.
Parameters: ref - |
fixReferences | abstract public void fixReferences()(Code) | | Implementation method for subclasses to handle the references from this
file to other files. This is intended for use after all references have
been added, allowing the subclass to add any necessary structures to the
file representation.
|
getFileName | public String getFileName()(Code) | | Get the file name to be used for this file.
name (null if not set) |
getNamespace | public String getNamespace()(Code) | | Get namespace URI associated with this file.
namespace |
getPrefix | public String getPrefix(String uri)(Code) | | Get the prefix for a namespace URI. The first time this is called for a
particular namespace URI a prefix is assigned and returned. This assumes
that the default namespace is always the no-namespace.
Parameters: uri - prefix |
getReferences | public Set getReferences()(Code) | | Get the set of references from this file to other files of the same type.
references |
setFileName | public void setFileName(String name)(Code) | | Set the file name to be used for this file.
Parameters: name - |
|
|