| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.apache.xerces.dom.ASModelImplpublic class ASModelImplextends java.lang.Objectimplements org.apache.xerces.dom3.as.ASModelASModel is an
abstract object that could map to a DTD , an XML Schema , a database
schema, etc. An ASModel could represent either an internal
or an external subset; hence an abstract schema could be composed of an
ASModel representing the internal subset and an
ASModel representing the external subset. Note that the
ASModel representing the external subset could consult the
ASModel representing the internal subset. Furthermore, the
ASModel representing the internal subset could be set to
null by the setInternalAS method as a mechanism for
"removal". In addition, only one ASModel representing the
external subset can be specified as "active" and it is possible that none
are "active". Finally, the ASModel contains the factory
methods needed to create a various types of ASObjects like
ASElementDeclaration, ASAttributeDeclaration,
etc.
See also the
Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification.
Field Summary | |
protected Vector | |
protected SchemaGrammar | |
Constructor Summary | |
| |
Method Summary | |
void |
|
org.apache.xerces.dom3.as.ASObject |
|
org.apache.xerces.dom3.as.ASAttributeDeclaration |
|
org.apache.xerces.dom3.as.ASContentModel |
|
org.apache.xerces.dom3.as.ASElementDeclaration |
|
org.apache.xerces.dom3.as.ASEntityDeclaration |
|
org.apache.xerces.dom3.as.ASNotationDeclaration |
|
org.apache.xerces.dom3.as.ASObjectList |
|
String |
|
String |
|
short |
|
org.apache.xerces.dom3.as.ASNamedObjectMap |
|
boolean |
|
org.apache.xerces.dom3.as.ASNamedObjectMap |
|
org.apache.xerces.dom3.as.ASNamedObjectMap |
|
org.apache.xerces.dom3.as.ASNamedObjectMap |
|
SchemaGrammar | |
Vector | |
boolean |
|
String |
|
String |
|
String |
|
org.apache.xerces.dom3.as.ASNamedObjectMap |
|
org.apache.xerces.dom3.as.ASModel |
|
String |
|
short |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
boolean |
|
public void addASModel(org.apache.xerces.dom3.as.ASModel abstractSchema)
This method will allow the nesting or "importation" of ASModels.
- Specified by:
- addASModel in interface org.apache.xerces.dom3.as.ASModel
- Parameters:
abstractSchema- ASModel to be set. Subsequent calls will nest the ASModels within the specifiedownerASModel.
public org.apache.xerces.dom3.as.ASObject cloneASObject(boolean deep)
Creates a copy of thisASObject. See text forcloneNodeoff ofNodebut substitute AS functionality.
- Parameters:
deep- Setting thedeepflag on, causes the whole subtree to be duplicated. Setting it tofalseonly duplicates its immediate child nodes.
- Returns:
- Cloned
ASObject.
public org.apache.xerces.dom3.as.ASAttributeDeclaration createASAttributeDeclaration(String namespaceURI,
String name)
throws DOMExceptionCreates an attribute declaration.
- Specified by:
- createASAttributeDeclaration in interface org.apache.xerces.dom3.as.ASModel
- Parameters:
namespaceURI- The namespace URI of the attribute being declared.name- The name of the attribute. The format of the name could be an NCName as defined by XML Namespaces or a Name as defined by XML 1.0; it's ASModel-dependent.
- Returns:
- A new
ASAttributeDeclarationobject with appropriate attributes set by input parameters.
public org.apache.xerces.dom3.as.ASContentModel createASContentModel(int minOccurs,
int maxOccurs,
short operator)
throws org.apache.xerces.dom3.as.DOMASExceptionCreates an object which describes part of anASElementDeclaration's content model.
- Specified by:
- createASContentModel in interface org.apache.xerces.dom3.as.ASModel
- Parameters:
minOccurs- The minimum occurrence for the subModels of thisASContentModel.maxOccurs- The maximum occurrence for the subModels of thisASContentModel.operator- operator of typeAS_CHOICE,AS_SEQUENCE,AS_ALLorAS_NONE.
- Returns:
- A new
ASContentModelobject.
- Throws:
org.apache.xerces.dom3.as.DOMASException- A DOMASException, e.g.,minOccurs > maxOccurs.
public org.apache.xerces.dom3.as.ASElementDeclaration createASElementDeclaration(String namespaceURI,
String name)
throws DOMExceptionCreates an element declaration for the element type specified.
- Specified by:
- createASElementDeclaration in interface org.apache.xerces.dom3.as.ASModel
- Parameters:
namespaceURI- Thenamespace URIof the element type being declared.name- The name of the element. The format of the name could be an NCName as defined by XML Namespaces or a Name as defined by XML 1.0; it's ASModel-dependent.
- Returns:
- A new
ASElementDeclarationobject withnameattribute set totagnameandnamespaceURIset tosystemId. Other attributes of the element declaration are set throughASElementDeclarationinterface methods.
public org.apache.xerces.dom3.as.ASEntityDeclaration createASEntityDeclaration(String name)
throws DOMExceptionCreates an ASEntityDeclaration.
- Specified by:
- createASEntityDeclaration in interface org.apache.xerces.dom3.as.ASModel
- Parameters:
name- The name of the entity being declared.
- Returns:
- A new
ASEntityDeclarationobject withentityNameattribute set to name.
public org.apache.xerces.dom3.as.ASNotationDeclaration createASNotationDeclaration(String namespaceURI,
String name,
String systemId,
String publicId)
throws DOMExceptionCreates a new notation declaration.
- Specified by:
- createASNotationDeclaration in interface org.apache.xerces.dom3.as.ASModel
- Parameters:
namespaceURI- The namespace URI of the notation being declared.name- The name of the notation. The format of the name could be an NCName as defined by XML Namespaces or a Name as defined by XML 1.0; it's ASModel-dependent.systemId- The system identifier for the notation declaration.publicId- The public identifier for the notation declaration.
- Returns:
- A new
ASNotationDeclarationobject withnotationNameattribute set tonameandpublicIdandsystemIdset to the corresponding fields.
public org.apache.xerces.dom3.as.ASObjectList getASModels()
To retrieve a list of nested ASModels without reference to names.
- Specified by:
- getASModels in interface org.apache.xerces.dom3.as.ASModel
- Returns:
- A list of ASModels.
public String getAsHint()
The hint to locating an ASModel.
- Specified by:
- getAsHint in interface org.apache.xerces.dom3.as.ASModel
public String getAsLocation()
The URI reference.
- Specified by:
- getAsLocation in interface org.apache.xerces.dom3.as.ASModel
public short getAsNodeType()
A code representing the underlying object as defined above.
public org.apache.xerces.dom3.as.ASNamedObjectMap getAttributeDeclarations()
Instead of returning an all-in-oneASObjectwithASModelmethods, have discernible top-level/"global" attribute declarations. If one attempts to add, set, or remove a node type other than the intended one, a hierarchy exception (or equivalent is thrown).
- Specified by:
- getAttributeDeclarations in interface org.apache.xerces.dom3.as.ASModel
public boolean getContainer()
Ifusageis EXTERNAL_SUBSET or NOT_USED, and theASModelis simply a container of other ASModels.
public org.apache.xerces.dom3.as.ASNamedObjectMap getContentModelDeclarations()
Instead of returning an all-in-oneASObjectwithASModelmethods, have discernible top-level/"global content model declarations. If one attempts to add, set, or remove a node type other than the intended one, a hierarchy exception (or equivalent is thrown).
- Specified by:
- getContentModelDeclarations in interface org.apache.xerces.dom3.as.ASModel
public org.apache.xerces.dom3.as.ASNamedObjectMap getElementDeclarations()
Instead of returning an all-in-oneASObjectwithASModelmethods, have discernible top-level/"global" element declarations. If one attempts to add, set, or remove a node type other than the intended one, a hierarchy exception (or equivalent is thrown).
- Specified by:
- getElementDeclarations in interface org.apache.xerces.dom3.as.ASModel
public org.apache.xerces.dom3.as.ASNamedObjectMap getEntityDeclarations()
Instead of returning an all-in-oneASObjectwithASModelmethods, have discernible top-level/"global" entity declarations. If one attempts to add, set, or remove a node type other than the intended one, a hierarchy exception (or equivalent is thrown).
- Specified by:
- getEntityDeclarations in interface org.apache.xerces.dom3.as.ASModel
public Vector getInternalASModels()
public boolean getIsNamespaceAware()
trueif thisASModeldefines the document structure in terms of namespaces and local names ;falseif the document structure is defined only in terms ofQNames.
- Specified by:
- getIsNamespaceAware in interface org.apache.xerces.dom3.as.ASModel
public String getLocalName()
Returns the local part of the qualified name of thisASObject.
public String getNamespaceURI()
The namespace URI of this node, ornullif it is unspecified. defines how a namespace URI is attached to schema components.
public String getNodeName()
Thenameof thisASObjectdepending on theASObjecttype.
public org.apache.xerces.dom3.as.ASNamedObjectMap getNotationDeclarations()
Instead of returning an all-in-oneASObjectwithASModelmethods, have discernible top-level/"global" notation declarations. If one attempts to add, set, or remove a node type other than the intended one, a hierarchy exception (or equivalent is thrown).
- Specified by:
- getNotationDeclarations in interface org.apache.xerces.dom3.as.ASModel
public org.apache.xerces.dom3.as.ASModel getOwnerASModel()
TheASModelobject associated with thisASObject. For a node of typeAS_MODEL, this isnull.
public String getPrefix()
The namespace prefix of this node, ornullif it is unspecified.
public short getUsageLocation()
0 if used internally, 1 if used externally, 2 if not all. An exception will be raised if it is incompatibly shared or in use as an internal subset.
- Specified by:
- getUsageLocation in interface org.apache.xerces.dom3.as.ASModel
public void importASObject(org.apache.xerces.dom3.as.ASObject asobject)
ImportsASObjectinto ASModel.
- Parameters:
asobject-ASObjectto be imported.
public void insertASObject(org.apache.xerces.dom3.as.ASObject asobject)
InsertsASObjectinto ASModel.
- Parameters:
asobject-ASObjectto be inserted.
public void removeAS(org.apache.xerces.dom3.as.ASModel as)
Removes only the specifiedASModelfrom the list ofASModels.
- Specified by:
- removeAS in interface org.apache.xerces.dom3.as.ASModel
- Parameters:
as- AS to be removed.
public void setAsHint(String asHint)
The hint to locating an ASModel.
- Specified by:
- setAsHint in interface org.apache.xerces.dom3.as.ASModel
public void setAsLocation(String asLocation)
The URI reference.
- Specified by:
- setAsLocation in interface org.apache.xerces.dom3.as.ASModel
public void setLocalName(String localName)
Returns the local part of the qualified name of thisASObject.
public void setNamespaceURI(String namespaceURI)
The namespace URI of this node, ornullif it is unspecified. defines how a namespace URI is attached to schema components.
public void setNodeName(String nodeName)
Thenameof thisASObjectdepending on theASObjecttype.
public void setOwnerASModel(org.apache.xerces.dom3.as.ASModel ownerASModel)
TheASModelobject associated with thisASObject. For a node of typeAS_MODEL, this isnull.
public void setPrefix(String prefix)
The namespace prefix of this node, ornullif it is unspecified.
public boolean validate()
Determines if anASModelitself is valid, i.e., confirming that it's well-formed and valid per its own formal grammar.
- Specified by:
- validate in interface org.apache.xerces.dom3.as.ASModel
- Returns:
trueif theASModelis valid,falseotherwise.