All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.xerces.dom3.as.ASNamedObjectMap Maven / Gradle / Ivy

Go to download

Xerces2 is the next generation of high performance, fully compliant XML parsers in the Apache Xerces family. This new version of Xerces introduces the Xerces Native Interface (XNI), a complete framework for building parser components and configurations that is extremely modular and easy to program. The Apache Xerces2 parser is the reference implementation of XNI but other parser components, configurations, and parsers can be written using the Xerces Native Interface. For complete design and implementation documents, refer to the XNI Manual. Xerces2 is a fully conforming XML Schema 1.0 processor. A partial experimental implementation of the XML Schema 1.1 Structures and Datatypes Working Drafts (December 2009) and an experimental implementation of the XML Schema Definition Language (XSD): Component Designators (SCD) Candidate Recommendation (January 2010) are provided for evaluation. For more information, refer to the XML Schema page. Xerces2 also provides a complete implementation of the Document Object Model Level 3 Core and Load/Save W3C Recommendations and provides a complete implementation of the XML Inclusions (XInclude) W3C Recommendation. It also provides support for OASIS XML Catalogs v1.1. Xerces2 is able to parse documents written according to the XML 1.1 Recommendation, except that it does not yet provide an option to enable normalization checking as described in section 2.13 of this specification. It also handles namespaces according to the XML Namespaces 1.1 Recommendation, and will correctly serialize XML 1.1 documents if the DOM level 3 load/save APIs are in use.

There is a newer version: 2.12.2
Show newest version
/*
 * Copyright (c) 2001 World Wide Web Consortium,
 * (Massachusetts Institute of Technology, Institut National de
 * Recherche en Informatique et en Automatique, Keio University). All
 * Rights Reserved. This program is distributed under the W3C's Software
 * Intellectual Property License. This program is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.
 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
 */

package org.apache.xerces.dom3.as;

import 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. */ public interface ASNamedObjectMap { /** * The number of ASObjects in the ASObjectList. * The range of valid child node indices is 0 to length-1 * inclusive. */ public int getLength(); /** * Retrieves an ASObject specified by name. * @param name The nodeName of an ASObject to * retrieve. * @return An ASObject with specified node name and * null if the map does not contain an element with the * given name. */ public ASObject getNamedItem(String name); /** * Retrieves an ASObject specified by local name and * namespace URI. * @param namespaceURI The namespace URI of the ASObject to * retrieve. * @param localName The local name of the ASObject to * retrieve. * @return 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. */ public ASObject getNamedItemNS(String namespaceURI, String localName); /** * 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. * @param index The position in the map from which the item is to be * retrieved. * @return The ASObject at the indexth position * in the ASNamedObjectMap, or null if that * is not a valid index. */ public ASObject item(int index); /** * Removes an ASObject specified by a nodeName. * @param name The nodeName of the ASObject to * be removed. * @return The ASObject removed from this map if an * ASObject with such a name exists. * @exception 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. */ public ASObject removeNamedItem(String name) throws DOMException; /** * Removes an ASObject specified by a namespace URI and a * local name. * @param namespaceURI The namespace URI of the ASObject to * be removed. * @param localName The local name of the ASObject to remove. * @return The ASObject removed from this map if an * ASObject with such a local name and namespace URI * exists. * @exception 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. */ public ASObject removeNamedItemNS(String namespaceURI, String localName) throws DOMException; /** * 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. * @param newASObject The ASObject to be inserted in the map * with its nodeName as the key. * @return If the new node replaces an existing one, the replaced node is * returned, otherwise null. * @exception 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. */ public ASObject setNamedItem(ASObject newASObject) throws DOMException; /** * 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. * @param newASObject The ASObject to be inserted in the * map.The ASObject will later be accessible using the * value of its namespaceURI and localName * attributes. * @return If the new node replaces an existing one, the replaced node is * returned, otherwise null. * @exception 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. */ public ASObject setNamedItemNS(ASObject newASObject) throws DOMException; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy