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.
public interface ASNamedObjectMap
Modifier and Type | Method and Description |
---|---|
int |
getLength()
Deprecated.
The number of
ASObjects in the ASObjectList . |
ASObject |
getNamedItem(String name)
Deprecated.
Retrieves an
ASObject specified by name. |
ASObject |
getNamedItemNS(String namespaceURI,
String localName)
Deprecated.
Retrieves an
ASObject specified by local name and
namespace URI. |
ASObject |
item(int index)
Deprecated.
Returns the
index th item in the map. |
ASObject |
removeNamedItem(String name)
Deprecated.
Removes an
ASObject specified by a nodeName . |
ASObject |
removeNamedItemNS(String namespaceURI,
String localName)
Deprecated.
Removes an
ASObject specified by a namespace URI and a
local name. |
ASObject |
setNamedItem(ASObject newASObject)
Deprecated.
Adds an
ASObject using its nodeName
attribute. |
ASObject |
setNamedItemNS(ASObject newASObject)
Deprecated.
Adds an
ASObject using its namespaceURI and
localName . |
int getLength()
ASObjects
in the ASObjectList
.
The range of valid child node indices is 0 to length-1
inclusive.ASObject getNamedItem(String name)
ASObject
specified by name.name
- The nodeName
of an ASObject
to
retrieve.ASObject
with specified node name and
null
if the map does not contain an element with the
given name.ASObject getNamedItemNS(String namespaceURI, String localName)
ASObject
specified by local name and
namespace URI.namespaceURI
- The namespace URI of the ASObject
to
retrieve.localName
- The local name of the ASObject
to
retrieve.ASObject
(of any type) with the specified local
name and namespace URI, or null
if they do not
identify any ASObject
in this map.ASObject item(int index)
index
th 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
.index
- The position in the map from which the item is to be
retrieved.ASObject
at the index
th position
in the ASNamedObjectMap
, or null
if that
is not a valid index.ASObject removeNamedItem(String name) throws DOMException
ASObject
specified by a nodeName
.name
- The nodeName
of the ASObject
to
be removed.ASObject
removed from this map if an
ASObject
with such a name exists.DOMException
- NOT_FOUND_ERR: Raised if there is no node named name
in
this map.
ASObject removeNamedItemNS(String namespaceURI, String localName) throws DOMException
ASObject
specified by a namespace URI and a
local name.namespaceURI
- The namespace URI of the ASObject
to
be removed.localName
- The local name of the ASObject
to remove.ASObject
removed from this map if an
ASObject
with such a local name and namespace URI
exists.DOMException
- NOT_FOUND_ERR: Raised if there is no node with the specified
namespaceURI
and localName
in this map.
ASObject setNamedItem(ASObject newASObject) throws DOMException
ASObject
using its nodeName
attribute. If an ASObject
with that name is already
present in this map, it is replaced by the new one.newASObject
- The ASObject
to be inserted in the map
with its nodeName
as the key.null
.DOMException
- WRONG_DOCUMENT_ERR: Raised if arg
was created from a
different ASModel
than the one that created this map.
ASNamedObjectMap
.ASObject setNamedItemNS(ASObject newASObject) throws DOMException
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.newASObject
- The ASObject
to be inserted in the
map.The ASObject
will later be accessible using the
value of its namespaceURI
and localName
attributes.null
.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
.Copyright © 2017 JBoss by Red Hat. All rights reserved.