1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
2
|
<!--NewPage-->
|
3
|
<html>
|
4
|
<head>
|
5
|
<!-- Generated by javadoc on Fri Sep 24 03:23:03 CEST 1999 -->
|
6
|
<title>
|
7
|
Class de.tudarmstadt.ito.utils.NSName
|
8
|
</title>
|
9
|
</head>
|
10
|
<body>
|
11
|
<a name="_top_"></a>
|
12
|
<pre>
|
13
|
<a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-de.tudarmstadt.ito.utils.html">This Package</a> <a href="Package-de.tudarmstadt.ito.utils.html">Previous</a> <a href="de.tudarmstadt.ito.utils.TokenList.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre>
|
14
|
<hr>
|
15
|
<h1>
|
16
|
Class de.tudarmstadt.ito.utils.NSName
|
17
|
</h1>
|
18
|
<pre>
|
19
|
java.lang.Object
|
20
|
|
|
21
|
+----de.tudarmstadt.ito.utils.NSName
|
22
|
</pre>
|
23
|
<hr>
|
24
|
<dl>
|
25
|
<dt> public class <b>NSName</b>
|
26
|
<dt> extends Object
|
27
|
</dl>
|
28
|
Contains an element type or attribute name in local, prefixed, and
|
29
|
namespace-URI qualified forms.
|
30
|
<P>The local form of an element type or attribute name is the unprefixed
|
31
|
name. The prefixed form is the prefixed (with colon) form. The qualified
|
32
|
form is the namespace URI plus a caret (^) plus the local name. If the
|
33
|
element type or attribute does not belong to a namespace, then all three
|
34
|
forms are the same. For example:
|
35
|
<PRE>
|
36
|
<foo:element1 xmlns="http://foo">
|
37
|
Local name: "element1"
|
38
|
Prefixed name: "foo:element1"
|
39
|
Qualified name: "http://foo^element1"<br />
|
40
|
<element2>
|
41
|
Local name: "element2"
|
42
|
Prefixed name: "element2"
|
43
|
Qualified name: "element2"
|
44
|
</PRE>
|
45
|
<p>
|
46
|
<hr>
|
47
|
<a name="index"></a>
|
48
|
<h2>
|
49
|
<img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
|
50
|
</h2>
|
51
|
<dl>
|
52
|
<dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
|
53
|
<a href="#local"><b>local</b></a>
|
54
|
<dd> Local name of the element type or attribute.
|
55
|
<dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
|
56
|
<a href="#prefixed"><b>prefixed</b></a>
|
57
|
<dd> Prefixed name of the element type or attribute.
|
58
|
<dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
|
59
|
<a href="#qualified"><b>qualified</b></a>
|
60
|
<dd> Qualified name of the element type or attribute.
|
61
|
<dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
|
62
|
<a href="#SEPARATOR"><b>SEPARATOR</b></a>
|
63
|
<dd> The character used to separate the URI from the local name.
|
64
|
</dl>
|
65
|
<h2>
|
66
|
<img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
|
67
|
</h2>
|
68
|
<dl>
|
69
|
<dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
|
70
|
<a href="#NSName()"><b>NSName</b></a>()
|
71
|
<dd> Construct an empty NSName.
|
72
|
<dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
|
73
|
<a href="#NSName(java.lang.String, java.lang.String, java.lang.String)"><b>NSName</b></a>(String, String, String)
|
74
|
<dd> Construct as NSName from a local name, prefix, and namespace URI.
|
75
|
</dl>
|
76
|
<h2>
|
77
|
<img src="images/method-index.gif" width=207 height=38 alt="Method Index">
|
78
|
</h2>
|
79
|
<dl>
|
80
|
<dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
|
81
|
<a href="#getNSName(java.lang.String, java.util.Hashtable)"><b>getNSName</b></a>(String, Hashtable)
|
82
|
<dd> Given a prefixed name and a Hashtable relating prefixes to
|
83
|
namespace URIs, create a new NSName.
|
84
|
<dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
|
85
|
<a href="#getPrefix(java.lang.String)"><b>getPrefix</b></a>(String)
|
86
|
<dd> Get the prefix from a prefixed name.
|
87
|
<dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
|
88
|
<a href="#getPrefixedName(java.lang.String, java.lang.String)"><b>getPrefixedName</b></a>(String, String)
|
89
|
<dd> Construct a prefixed name.
|
90
|
<dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
|
91
|
<a href="#getQualifiedName(java.lang.String, java.lang.String)"><b>getQualifiedName</b></a>(String, String)
|
92
|
<dd> Construct a qualified name.
|
93
|
<dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
|
94
|
<a href="#getURI(java.lang.String)"><b>getURI</b></a>(String)
|
95
|
<dd> Get the URI from a qualified name.
|
96
|
</dl>
|
97
|
<a name="variables"></a>
|
98
|
<h2>
|
99
|
<img src="images/variables.gif" width=153 height=38 alt="Variables">
|
100
|
</h2>
|
101
|
<a name="SEPARATOR"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
|
102
|
<b>SEPARATOR</b>
|
103
|
<pre>
|
104
|
public static String SEPARATOR
|
105
|
</pre>
|
106
|
<dl>
|
107
|
<dd> The character used to separate the URI from the local name. Following the
|
108
|
convention of John Cowan's SAX namespace filter, a caret (^) is used
|
109
|
because it is neither a valid URI character nor a valid XML name
|
110
|
character.<p>
|
111
|
</dl>
|
112
|
<a name="local"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
|
113
|
<b>local</b>
|
114
|
<pre>
|
115
|
public String local
|
116
|
</pre>
|
117
|
<dl>
|
118
|
<dd> Local name of the element type or attribute.<p>
|
119
|
</dl>
|
120
|
<a name="prefixed"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
|
121
|
<b>prefixed</b>
|
122
|
<pre>
|
123
|
public String prefixed
|
124
|
</pre>
|
125
|
<dl>
|
126
|
<dd> Prefixed name of the element type or attribute.<p>
|
127
|
</dl>
|
128
|
<a name="qualified"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
|
129
|
<b>qualified</b>
|
130
|
<pre>
|
131
|
public String qualified
|
132
|
</pre>
|
133
|
<dl>
|
134
|
<dd> Qualified name of the element type or attribute.<p>
|
135
|
</dl>
|
136
|
<a name="constructors"></a>
|
137
|
<h2>
|
138
|
<img src="images/constructors.gif" width=231 height=38 alt="Constructors">
|
139
|
</h2>
|
140
|
<a name="NSName"></a>
|
141
|
<a name="NSName()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
|
142
|
<b>NSName</b>
|
143
|
<pre>
|
144
|
public NSName()
|
145
|
</pre>
|
146
|
<dl>
|
147
|
<dd> Construct an empty NSName.
|
148
|
<p>
|
149
|
</dl>
|
150
|
<a name="NSName(java.lang.String, java.lang.String, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
|
151
|
<b>NSName</b>
|
152
|
<pre>
|
153
|
public NSName(String local,
|
154
|
String prefix,
|
155
|
String uri)
|
156
|
</pre>
|
157
|
<dl>
|
158
|
<dd> Construct as NSName from a local name, prefix, and namespace URI.
|
159
|
<p>
|
160
|
</dl>
|
161
|
<a name="methods"></a>
|
162
|
<h2>
|
163
|
<img src="images/methods.gif" width=151 height=38 alt="Methods">
|
164
|
</h2>
|
165
|
<a name="getQualifiedName(java.lang.String, java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
|
166
|
<a name="getQualifiedName"><b>getQualifiedName</b></a>
|
167
|
<pre>
|
168
|
public static String getQualifiedName(String local,
|
169
|
String uri)
|
170
|
</pre>
|
171
|
<dl>
|
172
|
<dd> Construct a qualified name. Returns the local name if the URI is
|
173
|
null or zero-length.
|
174
|
<p>
|
175
|
<dd><dl>
|
176
|
<dt> <b>Parameters:</b>
|
177
|
<dd> local - The local name.
|
178
|
<dd> uri - The namespace URI.
|
179
|
</dl></dd>
|
180
|
</dl>
|
181
|
<a name="getPrefixedName(java.lang.String, java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
|
182
|
<a name="getPrefixedName"><b>getPrefixedName</b></a>
|
183
|
<pre>
|
184
|
public static String getPrefixedName(String local,
|
185
|
String prefix)
|
186
|
</pre>
|
187
|
<dl>
|
188
|
<dd> Construct a prefixed name. Returns the local name if the URI is
|
189
|
null or zero-length.
|
190
|
<p>
|
191
|
<dd><dl>
|
192
|
<dt> <b>Parameters:</b>
|
193
|
<dd> local - The local name.
|
194
|
<dd> uri - The namespace prefix.
|
195
|
</dl></dd>
|
196
|
</dl>
|
197
|
<a name="getNSName(java.lang.String, java.util.Hashtable)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
|
198
|
<a name="getNSName"><b>getNSName</b></a>
|
199
|
<pre>
|
200
|
public static <a href="#_top_">NSName</a> getNSName(String prefixedName,
|
201
|
Hashtable namespaceURIs)
|
202
|
</pre>
|
203
|
<dl>
|
204
|
<dd> Given a prefixed name and a Hashtable relating prefixes to
|
205
|
namespace URIs, create a new NSName.
|
206
|
<p>If the name is not prefixed, or if the Hashtable parameter is null,
|
207
|
then the local, prefixed, and qualified names in the returned NSName
|
208
|
are all set to the prefixedName parameter.</p>
|
209
|
<p>
|
210
|
<dd><dl>
|
211
|
<dt> <b>Parameters:</b>
|
212
|
<dd> prefixedName - The prefixed name. Not required to contain a prefix.
|
213
|
<dd> namespaceURIs - The Hashtable containing prefixes as keys and
|
214
|
namespace URIs as values. May be null.
|
215
|
<dt> <b>Returns:</b>
|
216
|
<dd> The new NSName.
|
217
|
<dt> <b>Throws:</b> IllegalArgumentException
|
218
|
<dd> Thrown if the prefixed name contains
|
219
|
more than one colon or the Hashtable does not contain the prefix as a
|
220
|
key.
|
221
|
</dl></dd>
|
222
|
</dl>
|
223
|
<a name="getPrefix(java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
|
224
|
<a name="getPrefix"><b>getPrefix</b></a>
|
225
|
<pre>
|
226
|
public static String getPrefix(String prefixedName)
|
227
|
</pre>
|
228
|
<dl>
|
229
|
<dd> Get the prefix from a prefixed name.
|
230
|
<p>
|
231
|
<dd><dl>
|
232
|
<dt> <b>Parameters:</b>
|
233
|
<dd> prefixedName - The prefixed name.
|
234
|
<dt> <b>Returns:</b>
|
235
|
<dd> The prefix or null if there is no prefix. Note that null is
|
236
|
also returned if the prefix is xmlns, which we don't treat as a prefix
|
237
|
since (by definition) it is not associated with any namespace.
|
238
|
</dl></dd>
|
239
|
</dl>
|
240
|
<a name="getURI(java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
|
241
|
<a name="getURI"><b>getURI</b></a>
|
242
|
<pre>
|
243
|
public static String getURI(String qualifiedName)
|
244
|
</pre>
|
245
|
<dl>
|
246
|
<dd> Get the URI from a qualified name.
|
247
|
<p>
|
248
|
<dd><dl>
|
249
|
<dt> <b>Parameters:</b>
|
250
|
<dd> prefixedName - The qualified name.
|
251
|
<dt> <b>Returns:</b>
|
252
|
<dd> The URI or null if there is no URI.
|
253
|
</dl></dd>
|
254
|
</dl>
|
255
|
<hr>
|
256
|
<pre>
|
257
|
<a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-de.tudarmstadt.ito.utils.html">This Package</a> <a href="Package-de.tudarmstadt.ito.utils.html">Previous</a> <a href="de.tudarmstadt.ito.utils.TokenList.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre>
|
258
|
</body>
|
259
|
</html>
|