Xalan-C++ API Reference  1.12.0
XalanEntity.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XALANENTITY_HEADER_GUARD_1357924680)
19 #define XALANENTITY_HEADER_GUARD_1357924680
20 
21 
22 
25 
26 
27 
28 namespace XALAN_CPP_NAMESPACE {
29 
30 
31 
32 /*
33  * <meta name="usage" content="deprecated"/>
34  *
35  * Base class for the DOM Entity interface.
36  *
37  * This class is deprecated and should not be used!!
38  */
39 
41 {
42 public:
43 
44  XalanEntity();
45 
46  virtual
47  ~XalanEntity();
48 
49 
50  // These interfaces are inherited from XalanNode...
51 
52  virtual const XalanDOMString&
53  getNodeName() const = 0;
54 
55  /**
56  * Gets the value of this node, depending on its type.
57  */
58  virtual const XalanDOMString&
59  getNodeValue() const = 0;
60 
61  /**
62  * An enum value representing the type of the underlying object.
63  */
64  virtual NodeType
65  getNodeType() const = 0;
66 
67  /**
68  * Gets the parent of this node.
69  *
70  * All nodes, except <code>Document</code>,
71  * <code>DocumentFragment</code>, and <code>Attr</code> may have a parent.
72  * However, if a node has just been created and not yet added to the tree,
73  * or if it has been removed from the tree, a <code>null</code> Node
74  * is returned.
75  */
76  virtual XalanNode*
77  getParentNode() const = 0;
78 
79  /**
80  * Gets a <code>NodeList</code> that contains all children of this node.
81  *
82  * If there
83  * are no children, this is a <code>NodeList</code> containing no nodes.
84  * The content of the returned <code>NodeList</code> is "live" in the sense
85  * that, for instance, changes to the children of the node object that
86  * it was created from are immediately reflected in the nodes returned by
87  * the <code>NodeList</code> accessors; it is not a static snapshot of the
88  * content of the node. This is true for every <code>NodeList</code>,
89  * including the ones returned by the <code>getElementsByTagName</code>
90  * method.
91  */
92  virtual const XalanNodeList*
93  getChildNodes() const = 0;
94 
95  /**
96  * Gets the first child of this node.
97  *
98  * If there is no such node, this returns <code>null</code>.
99  */
100  virtual XalanNode*
101  getFirstChild() const = 0;
102 
103  /**
104  * Gets the last child of this node.
105  *
106  * If there is no such node, this returns <code>null</code>.
107  */
108  virtual XalanNode*
109  getLastChild() const = 0;
110 
111  /**
112  * Gets the node immediately preceding this node.
113  *
114  * If there is no such node, this returns <code>null</code>.
115  */
116  virtual XalanNode*
117  getPreviousSibling() const = 0;
118 
119  /**
120  * Gets the node immediately following this node.
121  *
122  * If there is no such node, this returns <code>null</code>.
123  */
124  virtual XalanNode*
125  getNextSibling() const = 0;
126 
127  /**
128  * Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it
129  * is an <code>Element</code>) or <code>null</code> otherwise.
130  */
131  virtual const XalanNamedNodeMap*
132  getAttributes() const = 0;
133 
134  /**
135  * Gets the <code>Document</code> object associated with this node.
136  *
137  * This is also
138  * the <code>Document</code> object used to create new nodes. When this
139  * node is a <code>Document</code> or a <code>DocumentType</code>
140  * which is not used with any <code>Document</code> yet, this is
141  * <code>null</code>.
142  */
143  virtual XalanDocument*
144  getOwnerDocument() const = 0;
145 
146  /**
147  * Get the <em>namespace URI</em> of
148  * this node, or <code>null</code> if it is unspecified.
149  * <p>
150  * This is not a computed value that is the result of a namespace lookup
151  * based on an examination of the namespace declarations in scope. It is
152  * merely the namespace URI given at creation time.
153  * <p>
154  * For nodes of any type other than <CODE>ELEMENT_NODE</CODE> and
155  * <CODE>ATTRIBUTE_NODE</CODE> and nodes created with a DOM Level 1 method,
156  * such as <CODE>createElement</CODE> from the <CODE>Document</CODE>
157  * interface, this is always <CODE>null</CODE>.
158  */
159  virtual const XalanDOMString&
160  getNamespaceURI() const = 0;
161 
162  /**
163  * Get the <em>namespace prefix</em>
164  * of this node, or <code>null</code> if it is unspecified.
165  */
166  virtual const XalanDOMString&
167  getPrefix() const = 0;
168 
169  /**
170  * Returns the local part of the <em>qualified name</em> of this node.
171  * <p>
172  * For nodes created with a DOM Level 1 method, such as
173  * <code>createElement</code> from the <code>Document</code> interface,
174  * it is null.
175  */
176  virtual const XalanDOMString&
177  getLocalName() const = 0;
178 
179  /**
180  * Determine if the document is node-order indexed.
181  *
182  * @return true if the document is indexed, otherwise false.
183  */
184  virtual bool
185  isIndexed() const = 0;
186 
187  /**
188  * Get the node's index. Valid only if the owner document
189  * reports that the document is node-order indexed.
190  *
191  * @return The index value, or 0 if the node is not indexed.
192  */
193  virtual IndexType
194  getIndex() const = 0;
195 
196  // These interfaces are new to XalanEntity...
197 
198  /**
199  * Get the public identifier of this notation.
200  *
201  * If the public identifier was not
202  * specified, this is <code>null</code>.
203  * @return Returns the public identifier of the notation
204  */
205  virtual const XalanDOMString&
206  getPublicId() const = 0;
207 
208  /**
209  * Get the system identifier of this notation.
210  *
211  * If the system identifier was not
212  * specified, this is <code>null</code>.
213  * @return Returns the system identifier of the notation
214  */
215  virtual const XalanDOMString&
216  getSystemId() const = 0;
217 
218  /**
219  * For unparsed entities, the name of the notation for the entity.
220  *
221  * For parsed entities, this is <code>null</code>.
222  */
223  virtual const XalanDOMString&
224  getNotationName() const = 0;
225 
226 protected:
227 
228  XalanEntity(const XalanEntity& theSource);
229 
230  XalanEntity&
231  operator=(const XalanEntity& theSource);
232 
233  bool
234  operator==(const XalanEntity& theRHS) const;
235 
236 private:
237 };
238 
239 
240 
241 }
242 
243 
244 
245 #endif // !defined(XALANENTITY_HEADER_GUARD_1357924680)
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanNode
Definition: XalanNode.hpp:38
xalanc::XalanNode::NodeType
NodeType
Definition: XalanNode.hpp:47
xalanc::XalanDocument
Definition: XalanDocument.hpp:36
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
xalanc::XalanNode::IndexType
unsigned long IndexType
Definition: XalanNode.hpp:64
XalanNode.hpp
xalanc::XalanNodeList
Definition: XalanNodeList.hpp:36
xalanc::XalanNamedNodeMap
Definition: XalanNamedNodeMap.hpp:36
XalanDOMDefinitions.hpp
XALAN_DOM_EXPORT
#define XALAN_DOM_EXPORT
Definition: XalanDOMDefinitions.hpp:37
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::XalanEntity
Definition: XalanEntity.hpp:40