Top Fields Methods
org.apache.xerces.dom3.as

public Interface ASModel

extends ASObject
Known Direct Implementers
org.apache.xerces.dom.ASModelImpl
Imports
org.w3c.dom.DOMException

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.

Field Summary

Inherited from org.apache.xerces.dom3.as.ASObject:
AS_ATTRIBUTE_DECLARATIONAS_CONTENTMODELAS_ELEMENT_DECLARATIONAS_ENTITY_DECLARATIONAS_MODELAS_NOTATION_DECLARATION

Method Summary

Modifier and TypeMethod and Description
public void
addASModel(ASModel
ASModel to be set. Subsequent calls will nest the ASModels within the specified ownerASModel.
abstractSchema
)

Deprecated as a consequence of ASModel being deprecated.
This method will allow the nesting or "importation" of ASModels.
public ASAttributeDeclaration

Returns:

A new ASAttributeDeclaration object with appropriate attributes set by input parameters.
createASAttributeDeclaration
(String
The namespace URI of the attribute being declared.
namespaceURI
,
String
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.
name
)

Deprecated as a consequence of ASAttributeDeclaration being deprecated.
Creates an attribute declaration.
public ASContentModel

Returns:

A new ASContentModel object.
createASContentModel
(int
The minimum occurrence for the subModels of this ASContentModel.
minOccurs
,
int
The maximum occurrence for the subModels of this ASContentModel.
maxOccurs
,
short
operator of type AS_CHOICE, AS_SEQUENCE, AS_ALL or AS_NONE.
operator
)

Deprecated as a consequence of ASContentModel being deprecated.
Creates an object which describes part of an ASElementDeclaration's content model.
public ASElementDeclaration

Returns:

A new 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.
createASElementDeclaration
(String
The namespace URI of the element type being declared.
namespaceURI
,
String
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.
name
)

Deprecated as a consequence of ASElementDeclaration being deprecated.
Creates an element declaration for the element type specified.
public ASEntityDeclaration

Returns:

A new ASEntityDeclaration object with entityName attribute set to name.
createASEntityDeclaration
(String
The name of the entity being declared.
name
)

Deprecated as a consequence of ASEntityDeclaration being deprecated.
Creates an ASEntityDeclaration.
public ASNotationDeclaration

Returns:

A new ASNotationDeclaration object with notationName attribute set to name and publicId and systemId set to the corresponding fields.
createASNotationDeclaration
(String
The namespace URI of the notation being declared.
namespaceURI
,
String
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.
name
,
String
The system identifier for the notation declaration.
systemId
,
String
The public identifier for the notation declaration.
publicId
)

Deprecated as a consequence of ASNotationDeclaration being deprecated.
Creates a new notation declaration.
public String
getAsHint()

The hint to locating an ASModel.

public String
getAsLocation()

The URI reference.

public ASObjectList

Returns:

A list of ASModels.
getASModels
()

Deprecated as a consequence of ASObjectList being deprecated.
To retrieve a list of nested ASModels without reference to names.
public ASNamedObjectMap
getAttributeDeclarations()

Deprecated as a consequence of ASNamedObjectMap being deprecated.
Instead of returning an all-in-one ASObject with ASModel methods, have discernible top-level/"global" attribute declarations.
public ASNamedObjectMap
getContentModelDeclarations()

Deprecated as a consequence of ASNamedObjectMap being deprecated.
Instead of returning an all-in-one ASObject with ASModel methods, have discernible top-level/"global content model declarations.
public ASNamedObjectMap
getElementDeclarations()

Deprecated as a consequence of ASNamedObjectMap being deprecated.
Instead of returning an all-in-one ASObject with ASModel methods, have discernible top-level/"global" element declarations.
public ASNamedObjectMap
getEntityDeclarations()

Deprecated as a consequence of ASNamedObjectMap being deprecated.
Instead of returning an all-in-one ASObject with ASModel methods, have discernible top-level/"global" entity declarations.
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.

public ASNamedObjectMap
getNotationDeclarations()

Deprecated as a consequence of ASNamedObjectMap being deprecated.
Instead of returning an all-in-one ASObject with ASModel methods, have discernible top-level/"global" notation declarations.
public short
getUsageLocation()

0 if used internally, 1 if used externally, 2 if not all.

public void
removeAS(ASModel
AS to be removed.
as
)

Deprecated as a consequence of ASModel being deprecated.
Removes only the specified ASModel from the list of ASModels.
public void
setAsHint(String asHint)

The hint to locating an ASModel.

public void
setAsLocation(String asLocation)

The URI reference.

public boolean

Returns:

true if the ASModel is valid, false otherwise.
validate
()

Determines if an ASModel itself is valid, i.e., confirming that it's well-formed and valid per its own formal grammar.

Inherited from org.apache.xerces.dom3.as.ASObject:
cloneASObjectgetAsNodeTypegetLocalNamegetNamespaceURIgetNodeNamegetOwnerASModelgetPrefixsetLocalNamesetNamespaceURIsetNodeNamesetOwnerASModelsetPrefix

Method Detail

addASModelback to summary
public void addASModel(ASModel abstractSchema)

Deprecated

as a consequence of ASModel being deprecated. See corresponding docs for further information.

This method will allow the nesting or "importation" of ASModels.

Parameters
abstractSchema:ASModel

ASModel to be set. Subsequent calls will nest the ASModels within the specified ownerASModel.

createASAttributeDeclarationback to summary
public ASAttributeDeclaration createASAttributeDeclaration(String namespaceURI, String name) throws DOMException

Deprecated

as a consequence of ASAttributeDeclaration being deprecated. See corresponding docs for further information.

Creates an attribute declaration.

Parameters
namespaceURI:String

The namespace URI of the attribute being declared.

name:String

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:ASAttributeDeclaration

A new ASAttributeDeclaration object with appropriate attributes set by input parameters.

Exceptions
DOMException:
INVALID_CHARACTER_ERR: Raised if the input name parameter contains an illegal character.
createASContentModelback to summary
public ASContentModel createASContentModel(int minOccurs, int maxOccurs, short operator) throws DOMASException

Deprecated

as a consequence of ASContentModel being deprecated. See corresponding docs for further information.

Creates an object which describes part of an ASElementDeclaration's content model.

Parameters
minOccurs:int

The minimum occurrence for the subModels of this ASContentModel.

maxOccurs:int

The maximum occurrence for the subModels of this ASContentModel.

operator:short

operator of type AS_CHOICE, AS_SEQUENCE, AS_ALL or AS_NONE.

Returns:ASContentModel

A new ASContentModel object.

Exceptions
DOMASException:
A DOMASException, e.g., minOccurs > maxOccurs.
createASElementDeclarationback to summary
public ASElementDeclaration createASElementDeclaration(String namespaceURI, String name) throws DOMException

Deprecated

as a consequence of ASElementDeclaration being deprecated. See corresponding docs for further information.

Creates an element declaration for the element type specified.

Parameters
namespaceURI:String

The namespace URI of the element type being declared.

name:String

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:ASElementDeclaration

A new 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.

Exceptions
DOMException:
INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
createASEntityDeclarationback to summary
public ASEntityDeclaration createASEntityDeclaration(String name) throws DOMException

Deprecated

as a consequence of ASEntityDeclaration being deprecated. See corresponding docs for further information.

Creates an ASEntityDeclaration.

Parameters
name:String

The name of the entity being declared.

Returns:ASEntityDeclaration

A new ASEntityDeclaration object with entityName attribute set to name.

Exceptions
DOMException:
INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
createASNotationDeclarationback to summary
public ASNotationDeclaration createASNotationDeclaration(String namespaceURI, String name, String systemId, String publicId) throws DOMException

Deprecated

as a consequence of ASNotationDeclaration being deprecated. See corresponding docs for further information.

Creates a new notation declaration.

Parameters
namespaceURI:String

The namespace URI of the notation being declared.

name:String

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:String

The system identifier for the notation declaration.

publicId:String

The public identifier for the notation declaration.

Returns:ASNotationDeclaration

A new ASNotationDeclaration object with notationName attribute set to name and publicId and systemId set to the corresponding fields.

Exceptions
DOMException:
INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
getAsHintback to summary
public String getAsHint()

The hint to locating an ASModel.

getAsLocationback to summary
public String getAsLocation()

The URI reference.

getASModelsback to summary
public ASObjectList getASModels()

Deprecated

as a consequence of ASObjectList being deprecated. See corresponding docs for further information.

To retrieve a list of nested ASModels without reference to names.

Returns:ASObjectList

A list of ASModels.

getAttributeDeclarationsback to summary
public ASNamedObjectMap getAttributeDeclarations()

Deprecated

as a consequence of ASNamedObjectMap being deprecated. See corresponding docs for further information.

Instead of returning an all-in-one 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).

getContentModelDeclarationsback to summary
public ASNamedObjectMap getContentModelDeclarations()

Deprecated

as a consequence of ASNamedObjectMap being deprecated. See corresponding docs for further information.

Instead of returning an all-in-one 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).

getElementDeclarationsback to summary
public ASNamedObjectMap getElementDeclarations()

Deprecated

as a consequence of ASNamedObjectMap being deprecated. See corresponding docs for further information.

Instead of returning an all-in-one 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).

getEntityDeclarationsback to summary
public ASNamedObjectMap getEntityDeclarations()

Deprecated

as a consequence of ASNamedObjectMap being deprecated. See corresponding docs for further information.

Instead of returning an all-in-one 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).

getIsNamespaceAwareback to summary
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.

getNotationDeclarationsback to summary
public ASNamedObjectMap getNotationDeclarations()

Deprecated

as a consequence of ASNamedObjectMap being deprecated. See corresponding docs for further information.

Instead of returning an all-in-one 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).

getUsageLocationback to summary
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.

removeASback to summary
public void removeAS(ASModel as)

Deprecated

as a consequence of ASModel being deprecated. See corresponding docs for further information.

Removes only the specified ASModel from the list of ASModels.

Parameters
as:ASModel

AS to be removed.

setAsHintback to summary
public void setAsHint(String asHint)

The hint to locating an ASModel.

setAsLocationback to summary
public void setAsLocation(String asLocation)

The URI reference.

validateback to summary
public boolean validate()

Determines if an ASModel itself is valid, i.e., confirming that it's well-formed and valid per its own formal grammar.

Returns:boolean

true if the ASModel is valid, false otherwise.