Source Code Cross Referenced for Axis.java in  » XML » xalan » org » apache » xml » dtm » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xalan » org.apache.xml.dtm 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 1999-2004 The Apache Software Foundation.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *     http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        /*
017:         * $Id: Axis.java,v 1.6 2004/12/15 17:35:47 jycli Exp $
018:         */
019:        package org.apache.xml.dtm;
020:
021:        /**
022:         * Specifies values related to XPath Axes.
023:         * <p>The ancestor, descendant, following, preceding and self axes partition a
024:         * document (ignoring attribute and namespace nodes): they do not overlap
025:         * and together they contain all the nodes in the document.</p>
026:         *
027:         */
028:        public final class Axis {
029:
030:            /**
031:             * The ancestor axis contains the ancestors of the context node;
032:             *  the ancestors of the context node consist of the parent of context
033:             *  node and the parent's parent and so on; thus, the ancestor axis will
034:             *  always include the root node, unless the context node is the root node.
035:             */
036:            public static final int ANCESTOR = 0;
037:
038:            /**
039:             * the ancestor-or-self axis contains the context node and the ancestors of
040:             *  the context node; thus, the ancestor axis will always include the
041:             *  root node.
042:             */
043:            public static final int ANCESTORORSELF = 1;
044:
045:            /**
046:             * the attribute axis contains the attributes of the context node; the axis
047:             *  will be empty unless the context node is an element.
048:             */
049:            public static final int ATTRIBUTE = 2;
050:
051:            /** The child axis contains the children of the context node. */
052:            public static final int CHILD = 3;
053:
054:            /**
055:             * The descendant axis contains the descendants of the context node;
056:             *  a descendant is a child or a child of a child and so on; thus the
057:             *  descendant axis never contains attribute or namespace nodes.
058:             */
059:            public static final int DESCENDANT = 4;
060:
061:            /**
062:             * The descendant-or-self axis contains the context node and the
063:             *  descendants of the context node.
064:             */
065:            public static final int DESCENDANTORSELF = 5;
066:
067:            /**
068:             * the following axis contains all nodes in the same document as the
069:             *  context node that are after the context node in document order, excluding
070:             *  any descendants and excluding attribute nodes and namespace nodes.
071:             */
072:            public static final int FOLLOWING = 6;
073:
074:            /**
075:             * The following-sibling axis contains all the following siblings of the
076:             *  context node; if the context node is an attribute node or namespace node,
077:             *  the following-sibling axis is empty.
078:             */
079:            public static final int FOLLOWINGSIBLING = 7;
080:
081:            /**
082:             * The namespace axis contains the namespace nodes of the context node; the
083:             *  axis will be empty unless the context node is an element.
084:             */
085:            public static final int NAMESPACEDECLS = 8;
086:
087:            /**
088:             * The namespace axis contains the namespace nodes of the context node; the
089:             *  axis will be empty unless the context node is an element.
090:             */
091:            public static final int NAMESPACE = 9;
092:
093:            /**
094:             * The parent axis contains the parent of the context node,
095:             *  if there is one.
096:             */
097:            public static final int PARENT = 10;
098:
099:            /**
100:             * The preceding axis contains all nodes in the same document as the context
101:             *  node that are before the context node in document order, excluding any
102:             *  ancestors and excluding attribute nodes and namespace nodes
103:             */
104:            public static final int PRECEDING = 11;
105:
106:            /**
107:             * The preceding-sibling axis contains all the preceding siblings of the
108:             *  context node; if the context node is an attribute node or namespace node,
109:             *  the preceding-sibling axis is empty.
110:             */
111:            public static final int PRECEDINGSIBLING = 12;
112:
113:            /** The self axis contains just the context node itself. */
114:            public static final int SELF = 13;
115:
116:            /**
117:             * A non-xpath axis, traversing the subtree including the subtree
118:             *  root, descendants, attributes, and namespace node decls.
119:             */
120:            public static final int ALLFROMNODE = 14;
121:
122:            /**
123:             * A non-xpath axis, traversing the the preceding and the ancestor nodes, 
124:             * needed for inverseing select patterns to match patterns.
125:             */
126:            public static final int PRECEDINGANDANCESTOR = 15;
127:
128:            // ===========================================
129:            // All axis past this are absolute.
130:
131:            /**
132:             * A non-xpath axis, returns all nodes in the tree from and including the 
133:             * root.
134:             */
135:            public static final int ALL = 16;
136:
137:            /**
138:             * A non-xpath axis, returns all nodes that aren't namespaces or attributes, 
139:             * from and including the root.
140:             */
141:            public static final int DESCENDANTSFROMROOT = 17;
142:
143:            /**
144:             * A non-xpath axis, returns all nodes that aren't namespaces or attributes, 
145:             * from and including the root.
146:             */
147:            public static final int DESCENDANTSORSELFFROMROOT = 18;
148:
149:            /**
150:             * A non-xpath axis, returns root only.
151:             */
152:            public static final int ROOT = 19;
153:
154:            /**
155:             * A non-xpath axis, for functions.
156:             */
157:            public static final int FILTEREDLIST = 20;
158:
159:            /**
160:             * A table to identify whether an axis is a reverse axis;
161:             */
162:            private static final boolean[] isReverse = { true, // ancestor
163:                    true, // ancestor-or-self
164:                    false, // attribute
165:                    false, // child
166:                    false, // descendant
167:                    false, // descendant-or-self
168:                    false, // following
169:                    false, // following-sibling
170:                    false, // namespace
171:                    false, // namespace-declarations
172:                    false, // parent (one node, has no order)
173:                    true, // preceding
174:                    true, // preceding-sibling
175:                    false // self (one node, has no order)
176:            };
177:
178:            /** The names of the axes for diagnostic purposes. */
179:            private static final String[] names = { "ancestor", // 0
180:                    "ancestor-or-self", // 1
181:                    "attribute", // 2
182:                    "child", // 3
183:                    "descendant", // 4
184:                    "descendant-or-self", // 5
185:                    "following", // 6
186:                    "following-sibling", // 7
187:                    "namespace-decls", // 8
188:                    "namespace", // 9
189:                    "parent", // 10
190:                    "preceding", // 11
191:                    "preceding-sibling", // 12
192:                    "self", // 13
193:                    "all-from-node", // 14
194:                    "preceding-and-ancestor", // 15
195:                    "all", // 16
196:                    "descendants-from-root", // 17
197:                    "descendants-or-self-from-root", // 18
198:                    "root", // 19
199:                    "filtered-list" // 20
200:            };
201:
202:            public static boolean isReverse(int axis) {
203:                return isReverse[axis];
204:            }
205:
206:            public static String getNames(int index) {
207:                return names[index];
208:            }
209:
210:            public static int getNamesLength() {
211:                return names.length;
212:            }
213:
214:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.