SchemaHolderpublic abstract class HolderBase
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
private boolean |
m_existingFile |
|
private java.lang.String |
m_fileName |
|
private boolean |
m_finished |
|
private java.lang.String |
m_namespace |
|
private java.util.Map |
m_nsPrefixMap |
|
private java.util.Set |
m_referenceSet |
| Constructor | Description |
|---|---|
HolderBase(java.lang.String uri) |
Constructor for a file being generated.
|
HolderBase(java.lang.String uri,
java.lang.String name) |
Constructor for an existing file.
|
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
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.
|
boolean |
isExistingFile() |
Check if file already exists.
|
boolean |
isModifiable() |
Check if file is modifiable.
|
void |
setFileName(java.lang.String name) |
Set the file name to be used for this file.
|
private final java.lang.String m_namespace
private final java.util.Map m_nsPrefixMap
private boolean m_finished
private boolean m_existingFile
private java.lang.String m_fileName
private java.util.Set m_referenceSet
public HolderBase(java.lang.String uri)
uri - (null if no-namespace binding)public HolderBase(java.lang.String uri,
java.lang.String name)
uri - (null if no-namespace binding)name - file namepublic boolean isExistingFile()
true if existing file, false if notpublic boolean isModifiable()
false for an existing file, and will be set
false for new files when finish() is called.true if file is modifiable, false if notpublic 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 void finish()