Package org.apache.xerces.dom
Class ASModelImpl
java.lang.Object
org.apache.xerces.dom.ASModelImpl
- All Implemented Interfaces:
org.apache.xerces.dom3.as.ASModel
,org.apache.xerces.dom3.as.ASObject
Deprecated.
To begin with, an abstract schema is a generic structure that could
contain both internal and external subsets. An
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.
- Version:
- $Id: ASModelImpl.java 699892 2008-09-28 21:08:27Z mrglavas $
- Author:
- Pavani Mukthipudi, Neil Graham
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Vector
Deprecated.protected SchemaGrammar
Deprecated.Fields inherited from interface org.apache.xerces.dom3.as.ASObject
AS_ATTRIBUTE_DECLARATION, AS_CONTENTMODEL, AS_ELEMENT_DECLARATION, AS_ENTITY_DECLARATION, AS_MODEL, AS_NOTATION_DECLARATION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 thisASObject
.org.apache.xerces.dom3.as.ASAttributeDeclaration
createASAttributeDeclaration
(String namespaceURI, 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 anASElementDeclaration
's content model.org.apache.xerces.dom3.as.ASElementDeclaration
createASElementDeclaration
(String namespaceURI, String name) Deprecated.Creates an element declaration for the element type specified.org.apache.xerces.dom3.as.ASEntityDeclaration
Deprecated.Creates an ASEntityDeclaration.org.apache.xerces.dom3.as.ASNotationDeclaration
createASNotationDeclaration
(String namespaceURI, String name, String systemId, String publicId) Deprecated.Creates a new notation declaration.Deprecated.The hint to locating an ASModel.Deprecated.The URI reference.org.apache.xerces.dom3.as.ASObjectList
Deprecated.To retrieve a list of nested ASModels without reference to names.short
Deprecated.A code representing the underlying object as defined above.org.apache.xerces.dom3.as.ASNamedObjectMap
Deprecated.Instead of returning an all-in-oneASObject
withASModel
methods, have discernible top-level/"global" attribute declarations.boolean
Deprecated.Ifusage
is EXTERNAL_SUBSET or NOT_USED, and theASModel
is simply a container of other ASModels.org.apache.xerces.dom3.as.ASNamedObjectMap
Deprecated.Instead of returning an all-in-oneASObject
withASModel
methods, have discernible top-level/"global content model declarations.org.apache.xerces.dom3.as.ASNamedObjectMap
Deprecated.Instead of returning an all-in-oneASObject
withASModel
methods, have discernible top-level/"global" element declarations.org.apache.xerces.dom3.as.ASNamedObjectMap
Deprecated.Instead of returning an all-in-oneASObject
withASModel
methods, have discernible top-level/"global" entity declarations.Deprecated.Deprecated.boolean
Deprecated.true
if thisASModel
defines the document structure in terms of namespaces and local names ;false
if the document structure is defined only in terms ofQNames
.Deprecated.Returns the local part of the qualified name of thisASObject
.Deprecated.The namespace URI of this node, ornull
if it is unspecified.Deprecated.Thename
of thisASObject
depending on theASObject
type.org.apache.xerces.dom3.as.ASNamedObjectMap
Deprecated.Instead of returning an all-in-oneASObject
withASModel
methods, have discernible top-level/"global" notation declarations.org.apache.xerces.dom3.as.ASModel
Deprecated.TheASModel
object associated with thisASObject
.Deprecated.The namespace prefix of this node, ornull
if it is unspecified.short
Deprecated.0 if used internally, 1 if used externally, 2 if not all.void
importASObject
(org.apache.xerces.dom3.as.ASObject asobject) Deprecated.ImportsASObject
into ASModel.void
insertASObject
(org.apache.xerces.dom3.as.ASObject asobject) Deprecated.InsertsASObject
into ASModel.void
removeAS
(org.apache.xerces.dom3.as.ASModel as) Deprecated.Removes only the specifiedASModel
from the list ofASModel
s.void
Deprecated.The hint to locating an ASModel.void
setAsLocation
(String asLocation) Deprecated.The URI reference.void
setGrammar
(SchemaGrammar grammar) Deprecated.void
setLocalName
(String localName) Deprecated.Returns the local part of the qualified name of thisASObject
.void
setNamespaceURI
(String namespaceURI) Deprecated.The namespace URI of this node, ornull
if it is unspecified.void
setNodeName
(String nodeName) Deprecated.Thename
of thisASObject
depending on theASObject
type.void
setOwnerASModel
(org.apache.xerces.dom3.as.ASModel ownerASModel) Deprecated.TheASModel
object associated with thisASObject
.void
Deprecated.The namespace prefix of this node, ornull
if it is unspecified.boolean
validate()
Deprecated.Determines if anASModel
itself is valid, i.e., confirming that it's well-formed and valid per its own formal grammar.
-
Field Details
-
fASModels
Deprecated. -
fGrammar
Deprecated.
-
-
Constructor Details
-
ASModelImpl
public ASModelImpl()Deprecated. -
ASModelImpl
public ASModelImpl(boolean isNamespaceAware) Deprecated.
-
-
Method Details
-
getAsNodeType
public short getAsNodeType()Deprecated.A code representing the underlying object as defined above.- Specified by:
getAsNodeType
in interfaceorg.apache.xerces.dom3.as.ASObject
-
getOwnerASModel
public org.apache.xerces.dom3.as.ASModel getOwnerASModel()Deprecated.TheASModel
object associated with thisASObject
. For a node of typeAS_MODEL
, this isnull
.- Specified by:
getOwnerASModel
in interfaceorg.apache.xerces.dom3.as.ASObject
-
setOwnerASModel
public void setOwnerASModel(org.apache.xerces.dom3.as.ASModel ownerASModel) Deprecated.TheASModel
object associated with thisASObject
. For a node of typeAS_MODEL
, this isnull
.- Specified by:
setOwnerASModel
in interfaceorg.apache.xerces.dom3.as.ASObject
-
getNodeName
Deprecated.Thename
of thisASObject
depending on theASObject
type.- Specified by:
getNodeName
in interfaceorg.apache.xerces.dom3.as.ASObject
-
setNodeName
Deprecated.Thename
of thisASObject
depending on theASObject
type.- Specified by:
setNodeName
in interfaceorg.apache.xerces.dom3.as.ASObject
-
getPrefix
Deprecated.The namespace prefix of this node, ornull
if it is unspecified.- Specified by:
getPrefix
in interfaceorg.apache.xerces.dom3.as.ASObject
-
setPrefix
Deprecated.The namespace prefix of this node, ornull
if it is unspecified.- Specified by:
setPrefix
in interfaceorg.apache.xerces.dom3.as.ASObject
-
getLocalName
Deprecated.Returns the local part of the qualified name of thisASObject
.- Specified by:
getLocalName
in interfaceorg.apache.xerces.dom3.as.ASObject
-
setLocalName
Deprecated.Returns the local part of the qualified name of thisASObject
.- Specified by:
setLocalName
in interfaceorg.apache.xerces.dom3.as.ASObject
-
getNamespaceURI
Deprecated.The namespace URI of this node, ornull
if it is unspecified. defines how a namespace URI is attached to schema components.- Specified by:
getNamespaceURI
in interfaceorg.apache.xerces.dom3.as.ASObject
-
setNamespaceURI
Deprecated.The namespace URI of this node, ornull
if it is unspecified. defines how a namespace URI is attached to schema components.- Specified by:
setNamespaceURI
in interfaceorg.apache.xerces.dom3.as.ASObject
-
cloneASObject
public org.apache.xerces.dom3.as.ASObject cloneASObject(boolean deep) Deprecated.Creates a copy of thisASObject
. See text forcloneNode
off ofNode
but substitute AS functionality.- Specified by:
cloneASObject
in interfaceorg.apache.xerces.dom3.as.ASObject
- Parameters:
deep
- Setting thedeep
flag on, causes the whole subtree to be duplicated. Setting it tofalse
only duplicates its immediate child nodes.- Returns:
- Cloned
ASObject
.
-
getIsNamespaceAware
public boolean getIsNamespaceAware()Deprecated.true
if thisASModel
defines the document structure in terms of namespaces and local names ;false
if the document structure is defined only in terms ofQNames
.- Specified by:
getIsNamespaceAware
in interfaceorg.apache.xerces.dom3.as.ASModel
-
getUsageLocation
public short getUsageLocation()Deprecated.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 interfaceorg.apache.xerces.dom3.as.ASModel
-
getAsLocation
Deprecated.The URI reference.- Specified by:
getAsLocation
in interfaceorg.apache.xerces.dom3.as.ASModel
-
setAsLocation
Deprecated.The URI reference.- Specified by:
setAsLocation
in interfaceorg.apache.xerces.dom3.as.ASModel
-
getAsHint
Deprecated.The hint to locating an ASModel.- Specified by:
getAsHint
in interfaceorg.apache.xerces.dom3.as.ASModel
-
setAsHint
Deprecated.The hint to locating an ASModel.- Specified by:
setAsHint
in interfaceorg.apache.xerces.dom3.as.ASModel
-
getContainer
public boolean getContainer()Deprecated.Ifusage
is EXTERNAL_SUBSET or NOT_USED, and theASModel
is simply a container of other ASModels. -
getElementDeclarations
public org.apache.xerces.dom3.as.ASNamedObjectMap getElementDeclarations()Deprecated.Instead of returning an all-in-oneASObject
withASModel
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).- Specified by:
getElementDeclarations
in interfaceorg.apache.xerces.dom3.as.ASModel
-
getAttributeDeclarations
public org.apache.xerces.dom3.as.ASNamedObjectMap getAttributeDeclarations()Deprecated.Instead of returning an all-in-oneASObject
withASModel
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).- Specified by:
getAttributeDeclarations
in interfaceorg.apache.xerces.dom3.as.ASModel
-
getNotationDeclarations
public org.apache.xerces.dom3.as.ASNamedObjectMap getNotationDeclarations()Deprecated.Instead of returning an all-in-oneASObject
withASModel
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).- Specified by:
getNotationDeclarations
in interfaceorg.apache.xerces.dom3.as.ASModel
-
getEntityDeclarations
public org.apache.xerces.dom3.as.ASNamedObjectMap getEntityDeclarations()Deprecated.Instead of returning an all-in-oneASObject
withASModel
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).- Specified by:
getEntityDeclarations
in interfaceorg.apache.xerces.dom3.as.ASModel
-
getContentModelDeclarations
public org.apache.xerces.dom3.as.ASNamedObjectMap getContentModelDeclarations()Deprecated.Instead of returning an all-in-oneASObject
withASModel
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).- Specified by:
getContentModelDeclarations
in interfaceorg.apache.xerces.dom3.as.ASModel
-
addASModel
public void addASModel(org.apache.xerces.dom3.as.ASModel abstractSchema) Deprecated.This method will allow the nesting or "importation" of ASModels.- Specified by:
addASModel
in interfaceorg.apache.xerces.dom3.as.ASModel
- Parameters:
abstractSchema
- ASModel to be set. Subsequent calls will nest the ASModels within the specifiedownerASModel
.
-
getASModels
public org.apache.xerces.dom3.as.ASObjectList getASModels()Deprecated.To retrieve a list of nested ASModels without reference to names.- Specified by:
getASModels
in interfaceorg.apache.xerces.dom3.as.ASModel
- Returns:
- A list of ASModels.
-
removeAS
public void removeAS(org.apache.xerces.dom3.as.ASModel as) Deprecated.Removes only the specifiedASModel
from the list ofASModel
s.- Specified by:
removeAS
in interfaceorg.apache.xerces.dom3.as.ASModel
- Parameters:
as
- AS to be removed.
-
validate
public boolean validate()Deprecated.Determines if anASModel
itself is valid, i.e., confirming that it's well-formed and valid per its own formal grammar.- Specified by:
validate
in interfaceorg.apache.xerces.dom3.as.ASModel
- Returns:
true
if theASModel
is valid,false
otherwise.
-
importASObject
public void importASObject(org.apache.xerces.dom3.as.ASObject asobject) Deprecated.ImportsASObject
into ASModel.- Parameters:
asobject
-ASObject
to be imported.
-
insertASObject
public void insertASObject(org.apache.xerces.dom3.as.ASObject asobject) Deprecated.InsertsASObject
into ASModel.- Parameters:
asobject
-ASObject
to be inserted.
-
createASElementDeclaration
public org.apache.xerces.dom3.as.ASElementDeclaration createASElementDeclaration(String namespaceURI, String name) throws DOMException Deprecated.Creates an element declaration for the element type specified.- Specified by:
createASElementDeclaration
in interfaceorg.apache.xerces.dom3.as.ASModel
- Parameters:
namespaceURI
- Thenamespace 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.- Returns:
- A new
ASElementDeclaration
object withname
attribute set totagname
andnamespaceURI
set tosystemId
. Other attributes of the element declaration are set throughASElementDeclaration
interface methods. - Throws:
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
-
createASAttributeDeclaration
public org.apache.xerces.dom3.as.ASAttributeDeclaration createASAttributeDeclaration(String namespaceURI, String name) throws DOMException Deprecated.Creates an attribute declaration.- Specified by:
createASAttributeDeclaration
in interfaceorg.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
ASAttributeDeclaration
object with appropriate attributes set by input parameters. - Throws:
DOMException
- INVALID_CHARACTER_ERR: Raised if the inputname
parameter contains an illegal character.
-
createASNotationDeclaration
public org.apache.xerces.dom3.as.ASNotationDeclaration createASNotationDeclaration(String namespaceURI, String name, String systemId, String publicId) throws DOMException Deprecated.Creates a new notation declaration.- Specified by:
createASNotationDeclaration
in interfaceorg.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
ASNotationDeclaration
object withnotationName
attribute set toname
andpublicId
andsystemId
set to the corresponding fields. - Throws:
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
-
createASEntityDeclaration
public org.apache.xerces.dom3.as.ASEntityDeclaration createASEntityDeclaration(String name) throws DOMException Deprecated.Creates an ASEntityDeclaration.- Specified by:
createASEntityDeclaration
in interfaceorg.apache.xerces.dom3.as.ASModel
- Parameters:
name
- The name of the entity being declared.- Returns:
- A new
ASEntityDeclaration
object withentityName
attribute set to name. - Throws:
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
-
createASContentModel
public org.apache.xerces.dom3.as.ASContentModel createASContentModel(int minOccurs, int maxOccurs, short operator) throws org.apache.xerces.dom3.as.DOMASException Deprecated.Creates an object which describes part of anASElementDeclaration
's content model.- Specified by:
createASContentModel
in interfaceorg.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_ALL
orAS_NONE
.- Returns:
- A new
ASContentModel
object. - Throws:
org.apache.xerces.dom3.as.DOMASException
- A DOMASException, e.g.,minOccurs > maxOccurs
.
-
getGrammar
Deprecated. -
setGrammar
Deprecated. -
getInternalASModels
Deprecated.
-