|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.util.HolderBase
public abstract class HolderBase
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, assigning 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.
Field Summary | |
---|---|
private java.lang.String |
m_fileName
|
private java.lang.String |
m_namespace
|
private java.util.Map |
m_nsPrefixMap
|
private java.util.Set |
m_referenceSet
|
Constructor Summary | |
---|---|
HolderBase(java.lang.String uri)
Constructor. |
Method Summary | |
---|---|
protected abstract void |
addNamespaceDecl(java.lang.String prefix,
java.lang.String uri)
Subclass hook method to handle adding a namespace declaration. |
void |
addReference(HolderBase ref)
Record a reference from this file to another file of the same type. |
abstract void |
finish()
Implementation method for subclasses to complete the construction of the file. |
java.lang.String |
getFileName()
Get the file name to be used for this file. |
java.lang.String |
getNamespace()
Get namespace URI associated with this file. |
java.lang.String |
getPrefix(java.lang.String uri)
Get the prefix for a namespace URI. |
java.util.Set |
getReferences()
Get the set of references from this file to other files of the same type. |
void |
setFileName(java.lang.String name)
Set the file name to be used for this file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.String m_namespace
private final java.util.Map m_nsPrefixMap
private java.lang.String m_fileName
private java.util.Set m_referenceSet
Constructor Detail |
---|
public HolderBase(java.lang.String uri)
uri
- (null
if no-namespace binding)Method Detail |
---|
public java.lang.String getPrefix(java.lang.String uri)
uri
-
protected abstract void addNamespaceDecl(java.lang.String prefix, java.lang.String uri)
prefix
- uri
- public java.lang.String getNamespace()
null
if no-namespace)public java.lang.String getFileName()
null
if not set)public void setFileName(java.lang.String name)
name
- public void addReference(HolderBase ref)
ref
- public java.util.Set getReferences()
public abstract void finish()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |