Top Methods
org.apache.xerces.dom3.as

public Interface ASNamedObjectMap

Imports
org.w3c.dom.DOMException

Deprecated

Objects implementing the ASNamedObjectMap interface are used to represent collections of abstract schema nodes that can be accessed by name. Note that ASNamedObjectMap does not inherit from ASObjectList; ASNamedObjectMaps are not maintained in any particular order. Objects contained in an object implementing ASNamedObjectMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a ASNamedObjectMap, and does not imply that the DOM specifies an order to these ASObjects.

ASNamedObjectMap object in the DOM are live.

See also the Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification.

Method Summary

Modifier and TypeMethod and Description
public int
getLength()

The number of ASObjects in the ASObjectList.

public ASObject

Returns:

An ASObject with specified node name and null if the map does not contain an element with the given name.
getNamedItem
(String
The nodeName of an ASObject to retrieve.
name
)

Deprecated as a consequence of ASObject being deprecated.
Retrieves an ASObject specified by name.
public ASObject

Returns:

A ASObject (of any type) with the specified local name and namespace URI, or null if they do not identify any ASObject in this map.
getNamedItemNS
(String
The namespace URI of the ASObject to retrieve.
namespaceURI
,
String
The local name of the ASObject to retrieve.
localName
)

Deprecated as a consequence of ASObject being deprecated.
Retrieves an ASObject specified by local name and namespace URI.
public ASObject

Returns:

The ASObject at the indexth position in the ASNamedObjectMap, or null if that is not a valid index.
item
(int
The position in the map from which the item is to be retrieved.
index
)

Deprecated as a consequence of ASObject being deprecated.
Returns the indexth item in the map.
public ASObject

Returns:

The ASObject removed from this map if an ASObject with such a name exists.
removeNamedItem
(String
The nodeName of the ASObject to be removed.
name
)

Deprecated as a consequence of ASObject being deprecated.
Removes an ASObject specified by a nodeName.
public ASObject

Returns:

The ASObject removed from this map if an ASObject with such a local name and namespace URI exists.
removeNamedItemNS
(String
The namespace URI of the ASObject to be removed.
namespaceURI
,
String
The local name of the ASObject to remove.
localName
)

Deprecated as a consequence of ASObject being deprecated.
Removes an ASObject specified by a namespace URI and a local name.
public ASObject

Returns:

If the new node replaces an existing one, the replaced node is returned, otherwise null.
setNamedItem
(ASObject
The ASObject to be inserted in the map with its nodeName as the key.
newASObject
)

Deprecated as a consequence of ASObject being deprecated.
Adds an ASObject using its nodeName attribute.
public ASObject

Returns:

If the new node replaces an existing one, the replaced node is returned, otherwise null.
setNamedItemNS
(ASObject
The ASObject to be inserted in the map.The ASObject will later be accessible using the value of its namespaceURI and localName attributes.
newASObject
)

Deprecated as a consequence of ASObject being deprecated.
Adds an ASObject using its namespaceURI and localName.

Method Detail

getLengthback to summary
public int getLength()

The number of ASObjects in the ASObjectList. The range of valid child node indices is 0 to length-1 inclusive.

getNamedItemback to summary
public ASObject getNamedItem(String name)

Deprecated

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

Retrieves an ASObject specified by name.

Parameters
name:String

The nodeName of an ASObject to retrieve.

Returns:ASObject

An ASObject with specified node name and null if the map does not contain an element with the given name.

getNamedItemNSback to summary
public ASObject getNamedItemNS(String namespaceURI, String localName)

Deprecated

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

Retrieves an ASObject specified by local name and namespace URI.

Parameters
namespaceURI:String

The namespace URI of the ASObject to retrieve.

localName:String

The local name of the ASObject to retrieve.

Returns:ASObject

A ASObject (of any type) with the specified local name and namespace URI, or null if they do not identify any ASObject in this map.

itemback to summary
public ASObject item(int index)

Deprecated

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

Returns the indexth item in the map. The index starts at 0. If index is greater than or equal to the number of nodes in the list, this returns null.

Parameters
index:int

The position in the map from which the item is to be retrieved.

Returns:ASObject

The ASObject at the indexth position in the ASNamedObjectMap, or null if that is not a valid index.

removeNamedItemback to summary
public ASObject removeNamedItem(String name) throws DOMException

Deprecated

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

Removes an ASObject specified by a nodeName.

Parameters
name:String

The nodeName of the ASObject to be removed.

Returns:ASObject

The ASObject removed from this map if an ASObject with such a name exists.

Exceptions
DOMException:
NOT_FOUND_ERR: Raised if there is no node named name in this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
removeNamedItemNSback to summary
public ASObject removeNamedItemNS(String namespaceURI, String localName) throws DOMException

Deprecated

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

Removes an ASObject specified by a namespace URI and a local name.

Parameters
namespaceURI:String

The namespace URI of the ASObject to be removed.

localName:String

The local name of the ASObject to remove.

Returns:ASObject

The ASObject removed from this map if an ASObject with such a local name and namespace URI exists.

Exceptions
DOMException:
NOT_FOUND_ERR: Raised if there is no node with the specified namespaceURI and localName in this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
setNamedItemback to summary
public ASObject setNamedItem(ASObject newASObject) throws DOMException

Deprecated

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

Adds an ASObject using its nodeName attribute. If an ASObject with that name is already present in this map, it is replaced by the new one.

Parameters
newASObject:ASObject

The ASObject to be inserted in the map with its nodeName as the key.

Returns:ASObject

If the new node replaces an existing one, the replaced node is returned, otherwise null.

Exceptions
DOMException:
WRONG_DOCUMENT_ERR: Raised if arg was created from a different ASModel than the one that created this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this ASNamedObjectMap.
setNamedItemNSback to summary
public ASObject setNamedItemNS(ASObject newASObject) throws DOMException

Deprecated

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

Adds an ASObject using its namespaceURI and localName. If an ASObject with the same namespaceURI and localName is already present in this map, it is replaced by the new one.

Parameters
newASObject:ASObject

The ASObject to be inserted in the map.The ASObject will later be accessible using the value of its namespaceURI and localName attributes.

Returns:ASObject

If the new node replaces an existing one, the replaced node is returned, otherwise null.

Exceptions
DOMException:
WRONG_DOCUMENT_ERR: Raised if arg was created from a different ASModel than the one that created this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this ASNamedObjectMap.