1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_xml_dom_XNamedNodeMap_idl__
29#define __com_sun_star_xml_dom_XNamedNodeMap_idl__
30
31#ifndef __com_sun_star_uno_XInterface_idl__
32#include <com/sun/star/uno/XInterface.idl>
33#endif
34#ifndef __com_sun_star_xml_dom_DOMException_idl__
35#include <com/sun/star/xml/dom/DOMException.idl>
36#endif
37
38module com { module sun { module star { module xml { module dom {
39
40interface XNode;
41
42interface XNamedNodeMap : com::sun::star::uno::XInterface
43{
44
45    /**
46    The number of nodes in this map.
47    */
48    long getLength();
49
50    /**
51    Retrieves a node specified by local name
52    */
53    XNode getNamedItem([in] string name);
54
55    /**
56    Retrieves a node specified by local name and namespace URI.
57    */
58    XNode getNamedItemNS([in] string namespaceURI,[in]  string localName);
59
60    /**
61    Returns the indexth item in the map.
62    */
63    XNode item([in] long index);
64
65    /**
66    Removes a node specified by name.
67    Throws:
68    DOMException - NOT_FOUND_ERR: Raised if there is no node named name in this map.
69    NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
70    */
71    XNode removeNamedItem([in] string name) raises (DOMException);
72
73    /**
74    Removes a node specified by local name and namespace URI.
75    Throws:
76    DOMException - NOT_FOUND_ERR: Raised if there is no node with the specified namespaceURI and localName in this map.
77    NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
78    */
79    XNode removeNamedItemNS([in] string namespaceURI, [in] string localName) raises (DOMException);
80
81    /**
82    Adds a node using its nodeName attribute.
83    Throws:
84    DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
85    NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
86    INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
87    HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities.
88    */
89    XNode setNamedItem([in] XNode arg) raises (DOMException);
90
91    /**
92    Adds a node using its namespaceURI and localName.
93    Throws:
94    DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
95    NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
96    INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
97    HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities.
98    NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.
99    */
100    XNode setNamedItemNS([in] XNode arg) raises (DOMException);
101};
102}; }; }; }; };
103
104#endif
105