public class ASModelImpl
extends java.lang.Object
implements org.apache.xerces.dom3.as.ASModel
ASModel
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.
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector |
fASModels
Deprecated.
|
protected SchemaGrammar |
fGrammar
Deprecated.
|
Constructor and Description |
---|
ASModelImpl()
Deprecated.
|
ASModelImpl(boolean isNamespaceAware)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addASModel(org.apache.xerces.dom3.as.ASModel abstractSchema)
Deprecated.
This method will allow the nesting or "importation" of ASModels.
|
org.apache.xerces.dom3.as.ASObject |
cloneASObject(boolean deep)
Deprecated.
Creates a copy of this
ASObject . |
org.apache.xerces.dom3.as.ASAttributeDeclaration |
createASAttributeDeclaration(java.lang.String namespaceURI,
java.lang.String name)
Deprecated.
Creates an attribute declaration.
|
org.apache.xerces.dom3.as.ASContentModel |
createASContentModel(int minOccurs,
int maxOccurs,
short operator)
Deprecated.
Creates an object which describes part of an
ASElementDeclaration 's content model. |
org.apache.xerces.dom3.as.ASElementDeclaration |
createASElementDeclaration(java.lang.String namespaceURI,
java.lang.String name)
Deprecated.
Creates an element declaration for the element type specified.
|
org.apache.xerces.dom3.as.ASEntityDeclaration |
createASEntityDeclaration(java.lang.String name)
Deprecated.
Creates an ASEntityDeclaration.
|
org.apache.xerces.dom3.as.ASNotationDeclaration |
createASNotationDeclaration(java.lang.String namespaceURI,
java.lang.String name,
java.lang.String systemId,
java.lang.String publicId)
Deprecated.
Creates a new notation declaration.
|
java.lang.String |
getAsHint()
Deprecated.
The hint to locating an ASModel.
|
java.lang.String |
getAsLocation()
Deprecated.
The URI reference.
|
org.apache.xerces.dom3.as.ASObjectList |
getASModels()
Deprecated.
To retrieve a list of nested ASModels without reference to names.
|
short |
getAsNodeType()
Deprecated.
A code representing the underlying object as defined above.
|
org.apache.xerces.dom3.as.ASNamedObjectMap |
getAttributeDeclarations()
Deprecated.
Instead of returning an all-in-one
ASObject with
ASModel methods, have discernible top-level/"global"
attribute declarations. |
boolean |
getContainer()
Deprecated.
If
usage is EXTERNAL_SUBSET or NOT_USED, and the
ASModel is simply a container of other ASModels. |
org.apache.xerces.dom3.as.ASNamedObjectMap |
getContentModelDeclarations()
Deprecated.
Instead of returning an all-in-one
ASObject with
ASModel methods, have discernible top-level/"global
content model declarations. |
org.apache.xerces.dom3.as.ASNamedObjectMap |
getElementDeclarations()
Deprecated.
Instead of returning an all-in-one
ASObject with
ASModel methods, have discernible top-level/"global"
element declarations. |
org.apache.xerces.dom3.as.ASNamedObjectMap |
getEntityDeclarations()
Deprecated.
Instead of returning an all-in-one
ASObject with
ASModel methods, have discernible top-level/"global"
entity declarations. |
SchemaGrammar |
getGrammar()
Deprecated.
|
java.util.Vector |
getInternalASModels()
Deprecated.
|
boolean |
getIsNamespaceAware()
Deprecated.
true if this ASModel defines the document
structure in terms of namespaces and local names ; false
if the document structure is defined only in terms of
QNames . |
java.lang.String |
getLocalName()
Deprecated.
Returns the local part of the qualified name of this
ASObject . |
java.lang.String |
getNamespaceURI()
Deprecated.
The namespace URI of this node, or
null if it is
unspecified. |
java.lang.String |
getNodeName()
Deprecated.
The
name of this ASObject depending on the
ASObject type. |
org.apache.xerces.dom3.as.ASNamedObjectMap |
getNotationDeclarations()
Deprecated.
Instead of returning an all-in-one
ASObject with
ASModel methods, have discernible top-level/"global"
notation declarations. |
org.apache.xerces.dom3.as.ASModel |
getOwnerASModel()
Deprecated.
The
ASModel object associated with this
ASObject . |
java.lang.String |
getPrefix()
Deprecated.
The namespace prefix of this node, or
null if it is
unspecified. |
short |
getUsageLocation()
Deprecated.
0 if used internally, 1 if used externally, 2 if not all.
|
void |
importASObject(org.apache.xerces.dom3.as.ASObject asobject)
Deprecated.
Imports
ASObject into ASModel. |
void |
insertASObject(org.apache.xerces.dom3.as.ASObject asobject)
Deprecated.
Inserts
ASObject into ASModel. |
void |
removeAS(org.apache.xerces.dom3.as.ASModel as)
Deprecated.
Removes only the specified
ASModel from the list of
ASModel s. |
void |
setAsHint(java.lang.String asHint)
Deprecated.
The hint to locating an ASModel.
|
void |
setAsLocation(java.lang.String asLocation)
Deprecated.
The URI reference.
|
void |
setGrammar(SchemaGrammar grammar)
Deprecated.
|
void |
setLocalName(java.lang.String localName)
Deprecated.
Returns the local part of the qualified name of this
ASObject . |
void |
setNamespaceURI(java.lang.String namespaceURI)
Deprecated.
The namespace URI of this node, or
null if it is
unspecified. |
void |
setNodeName(java.lang.String nodeName)
Deprecated.
The
name of this ASObject depending on the
ASObject type. |
void |
setOwnerASModel(org.apache.xerces.dom3.as.ASModel ownerASModel)
Deprecated.
The
ASModel object associated with this
ASObject . |
void |
setPrefix(java.lang.String prefix)
Deprecated.
The namespace prefix of this node, or
null if it is
unspecified. |
boolean |
validate()
Deprecated.
Determines if an
ASModel itself is valid, i.e., confirming
that it's well-formed and valid per its own formal grammar. |
protected java.util.Vector fASModels
protected SchemaGrammar fGrammar
public ASModelImpl()
public ASModelImpl(boolean isNamespaceAware)
public short getAsNodeType()
getAsNodeType
in interface org.apache.xerces.dom3.as.ASObject
public org.apache.xerces.dom3.as.ASModel getOwnerASModel()
ASModel
object associated with this
ASObject
. For a node of type AS_MODEL
, this
is null
.getOwnerASModel
in interface org.apache.xerces.dom3.as.ASObject
public void setOwnerASModel(org.apache.xerces.dom3.as.ASModel ownerASModel)
ASModel
object associated with this
ASObject
. For a node of type AS_MODEL
, this
is null
.setOwnerASModel
in interface org.apache.xerces.dom3.as.ASObject
public java.lang.String getNodeName()
name
of this ASObject
depending on the
ASObject
type.getNodeName
in interface org.apache.xerces.dom3.as.ASObject
public void setNodeName(java.lang.String nodeName)
name
of this ASObject
depending on the
ASObject
type.setNodeName
in interface org.apache.xerces.dom3.as.ASObject
public java.lang.String getPrefix()
null
if it is
unspecified.getPrefix
in interface org.apache.xerces.dom3.as.ASObject
public void setPrefix(java.lang.String prefix)
null
if it is
unspecified.setPrefix
in interface org.apache.xerces.dom3.as.ASObject
public java.lang.String getLocalName()
ASObject
.getLocalName
in interface org.apache.xerces.dom3.as.ASObject
public void setLocalName(java.lang.String localName)
ASObject
.setLocalName
in interface org.apache.xerces.dom3.as.ASObject
public java.lang.String getNamespaceURI()
null
if it is
unspecified. defines how a namespace URI is attached to schema
components.getNamespaceURI
in interface org.apache.xerces.dom3.as.ASObject
public void setNamespaceURI(java.lang.String namespaceURI)
null
if it is
unspecified. defines how a namespace URI is attached to schema
components.setNamespaceURI
in interface org.apache.xerces.dom3.as.ASObject
public org.apache.xerces.dom3.as.ASObject cloneASObject(boolean deep)
ASObject
. See text for
cloneNode
off of Node
but substitute AS
functionality.cloneASObject
in interface org.apache.xerces.dom3.as.ASObject
deep
- Setting the deep
flag on, causes the whole
subtree to be duplicated. Setting it to false
only
duplicates its immediate child nodes.ASObject
.public boolean getIsNamespaceAware()
true
if this ASModel
defines the document
structure in terms of namespaces and local names ; false
if the document structure is defined only in terms of
QNames
.getIsNamespaceAware
in interface org.apache.xerces.dom3.as.ASModel
public short getUsageLocation()
getUsageLocation
in interface org.apache.xerces.dom3.as.ASModel
public java.lang.String getAsLocation()
getAsLocation
in interface org.apache.xerces.dom3.as.ASModel
public void setAsLocation(java.lang.String asLocation)
setAsLocation
in interface org.apache.xerces.dom3.as.ASModel
public java.lang.String getAsHint()
getAsHint
in interface org.apache.xerces.dom3.as.ASModel
public void setAsHint(java.lang.String asHint)
setAsHint
in interface org.apache.xerces.dom3.as.ASModel
public boolean getContainer()
usage
is EXTERNAL_SUBSET or NOT_USED, and the
ASModel
is simply a container of other ASModels.public org.apache.xerces.dom3.as.ASNamedObjectMap getElementDeclarations()
ASObject
with
ASModel
methods, 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).getElementDeclarations
in interface org.apache.xerces.dom3.as.ASModel
public org.apache.xerces.dom3.as.ASNamedObjectMap getAttributeDeclarations()
ASObject
with
ASModel
methods, 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).getAttributeDeclarations
in interface org.apache.xerces.dom3.as.ASModel
public org.apache.xerces.dom3.as.ASNamedObjectMap getNotationDeclarations()
ASObject
with
ASModel
methods, 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).getNotationDeclarations
in interface org.apache.xerces.dom3.as.ASModel
public org.apache.xerces.dom3.as.ASNamedObjectMap getEntityDeclarations()
ASObject
with
ASModel
methods, 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).getEntityDeclarations
in interface org.apache.xerces.dom3.as.ASModel
public org.apache.xerces.dom3.as.ASNamedObjectMap getContentModelDeclarations()
ASObject
with
ASModel
methods, 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).getContentModelDeclarations
in interface org.apache.xerces.dom3.as.ASModel
public void addASModel(org.apache.xerces.dom3.as.ASModel abstractSchema)
addASModel
in interface org.apache.xerces.dom3.as.ASModel
abstractSchema
- ASModel to be set. Subsequent calls will nest
the ASModels within the specified ownerASModel
.public org.apache.xerces.dom3.as.ASObjectList getASModels()
getASModels
in interface org.apache.xerces.dom3.as.ASModel
public void removeAS(org.apache.xerces.dom3.as.ASModel as)
ASModel
from the list of
ASModel
s.removeAS
in interface org.apache.xerces.dom3.as.ASModel
as
- AS to be removed.public boolean validate()
ASModel
itself is valid, i.e., confirming
that it's well-formed and valid per its own formal grammar.validate
in interface org.apache.xerces.dom3.as.ASModel
true
if the ASModel
is valid,
false
otherwise.public void importASObject(org.apache.xerces.dom3.as.ASObject asobject)
ASObject
into ASModel.asobject
- ASObject
to be imported.public void insertASObject(org.apache.xerces.dom3.as.ASObject asobject)
ASObject
into ASModel.asobject
- ASObject
to be inserted.public org.apache.xerces.dom3.as.ASElementDeclaration createASElementDeclaration(java.lang.String namespaceURI, java.lang.String name) throws org.w3c.dom.DOMException
createASElementDeclaration
in interface org.apache.xerces.dom3.as.ASModel
namespaceURI
- The namespace URI
of 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.ASElementDeclaration
object with
name
attribute set to tagname
and
namespaceURI
set to systemId
. Other
attributes of the element declaration are set through
ASElementDeclaration
interface methods.org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.public org.apache.xerces.dom3.as.ASAttributeDeclaration createASAttributeDeclaration(java.lang.String namespaceURI, java.lang.String name) throws org.w3c.dom.DOMException
createASAttributeDeclaration
in interface org.apache.xerces.dom3.as.ASModel
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.ASAttributeDeclaration
object with
appropriate attributes set by input parameters.org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: Raised if the input name
parameter contains an illegal character.public org.apache.xerces.dom3.as.ASNotationDeclaration createASNotationDeclaration(java.lang.String namespaceURI, java.lang.String name, java.lang.String systemId, java.lang.String publicId) throws org.w3c.dom.DOMException
createASNotationDeclaration
in interface org.apache.xerces.dom3.as.ASModel
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.ASNotationDeclaration
object with
notationName
attribute set to name
and
publicId
and systemId
set to the
corresponding fields.org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.public org.apache.xerces.dom3.as.ASEntityDeclaration createASEntityDeclaration(java.lang.String name) throws org.w3c.dom.DOMException
createASEntityDeclaration
in interface org.apache.xerces.dom3.as.ASModel
name
- The name of the entity being declared.ASEntityDeclaration
object with
entityName
attribute set to name.org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.public org.apache.xerces.dom3.as.ASContentModel createASContentModel(int minOccurs, int maxOccurs, short operator) throws org.apache.xerces.dom3.as.DOMASException
ASElementDeclaration
's content model.createASContentModel
in interface org.apache.xerces.dom3.as.ASModel
minOccurs
- The minimum occurrence for the subModels of this
ASContentModel
.maxOccurs
- The maximum occurrence for the subModels of this
ASContentModel
.operator
- operator of type AS_CHOICE
,
AS_SEQUENCE
, AS_ALL
or
AS_NONE
.ASContentModel
object.org.apache.xerces.dom3.as.DOMASException
- A DOMASException, e.g., minOccurs > maxOccurs
.public SchemaGrammar getGrammar()
public void setGrammar(SchemaGrammar grammar)
public java.util.Vector getInternalASModels()
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.