KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > pull > UnconstructedElement


1 package net.sf.saxon.pull;
2
3 import net.sf.saxon.instruct.ElementCreator;
4 import net.sf.saxon.expr.XPathContext;
5 import net.sf.saxon.type.Type;
6
7 /**
8  * An element node whose construction is deferred.
9  */

10
11 public class UnconstructedElement extends UnconstructedParent {
12
13     private int nameCode;
14
15     public UnconstructedElement(ElementCreator instruction, XPathContext context) {
16         super(instruction, context);
17     }
18
19     public void setNameCode(int nameCode) {
20         this.nameCode = nameCode;
21     }
22
23     /**
24      * Get name code. The name code is a coded form of the node name: two nodes
25      * with the same name code have the same namespace URI, the same local name,
26      * and the same prefix. By masking the name code with &0xfffff, you get a
27      * fingerprint: two nodes with the same fingerprint have the same local name
28      * and namespace URI.
29      *
30      * @return an integer name code, which may be used to obtain the actual node
31      * name from the name pool
32      * @see net.sf.saxon.om.NamePool#allocate allocate
33      * @see net.sf.saxon.om.NamePool#getFingerprint getFingerprint
34      */

35
36     public int getNameCode() {
37         return nameCode;
38     }
39
40     public int getNodeKind() {
41         return Type.ELEMENT;
42     }
43 }
44
45
46 //
47
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
48
// you may not use this file except in compliance with the License. You may obtain a copy of the
49
// License at http://www.mozilla.org/MPL/
50
//
51
// Software distributed under the License is distributed on an "AS IS" basis,
52
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
53
// See the License for the specific language governing rights and limitations under the License.
54
//
55
// The Original Code is: all this file.
56
//
57
// The Initial Developer of the Original Code is Michael H. Kay.
58
//
59
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
60
//
61
// Contributor(s): none.
62
//
63
Popular Tags