KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > xquark > xpath > StepExpr


1 /*
2  * This file belongs to the XQuark distribution.
3  * Copyright (C) 2003 XQuark Group.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307.
18  * You can also get it at http://www.gnu.org/licenses/lgpl.html
19  *
20  * For more information on this software, see http://www.xquark.org.
21  */

22
23
24 package org.xquark.xpath;
25
26
27 public interface StepExpr {
28
29
30 /**
31  * The <code>NO_WILDCARD</code> wildcard contains no wildcard.
32  */

33 static public final byte NO_WILDCARD = 0x00;
34
35 /**
36  * The <code>NO_WILDCARD</code> wildcard contains a wildcard.
37  */

38 static public final byte WILDCARD = 0x01;
39
40 /**
41  * The <code>NO_WILDCARD</code> wildcard contains a wildcard in the localname part.
42  */

43 static public final byte LOCALNAME_WILDCARD = 0x02;
44
45 /**
46  * The <code>NO_WILDCARD</code> wildcard contains a wildcard in the namspace part.
47  */

48 static public final byte NAMESPACE_WILDCARD = 0x03;
49
50 /**
51  *
52  * @return true if there is a separator in front of the step
53  */

54 public boolean hasSeparator();
55
56 /**
57  *
58  * @return the constant representing the axis
59  */

60 public byte getAxis();
61
62 /**
63  *
64  * @return the namespace if any null otherwise
65  */

66 public String JavaDoc getNameSpace();
67
68 /**
69  *
70  * @return the localname if any null otherwise
71  */

72 public String JavaDoc getLocalName();
73
74 /**
75  *
76  * @return the constant representing the wilcard
77  */

78 public byte getWildCardType();
79
80 /**
81  *
82  * @return false if no wildcard is present
83  */

84 public boolean hasWildcard();
85
86 /**
87  *
88  * @return true if step if *
89  */

90 public boolean isWildcard();
91
92 /**
93  *
94  * @return true if step is qname with * as namespace
95  */

96 public boolean isNameSpaceWildcard();
97
98 /**
99  *
100  * @return true if step is qname with * as localname
101  */

102 public boolean isLocalNameWildcard();
103
104 /**
105  *
106  * @return the constant representing the kind of the step
107  */

108 public byte getKindTest();
109
110 /**
111  *
112  * @return the (schema) type used in element or attribute test
113  */

114 public org.xquark.schema.Type getType();
115
116 /**
117  *
118  * @return true if the type used in element test is nillable
119  */

120 public boolean isTypeNillable();
121
122 // methods for path resolving
123

124 public XNode getXNode();
125
126 public boolean match(XNode node);
127
128 public byte getTypeTest();
129
130 public boolean isTypeTest();
131
132 public String JavaDoc toHashCodeString();
133
134 }
135
Popular Tags