Skip to content

Commit 0d966bd

Browse files
committed
[bugfix] Add missing JavaDoc to address errors reported by 'mvn javadoc:javadoc'
1 parent 52f6f39 commit 0d966bd

File tree

4 files changed

+34
-20
lines changed

4 files changed

+34
-20
lines changed

java5/src/main/java/javax/xml/XMLConstants.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public class XMLConstants {
5454
public static final java.lang.String XML_NS_URI =
5555
"http://www.w3.org/XML/1998/namespace";
5656

57-
/** <p>Constant holding the attribute name for declaration
58-
* of new prefixes. The constant value is "xmlns".</p>
59-
* <p><em>Note</em>: This is both an attribute name
57+
/** Constant holding the attribute name for declaration
58+
* of new prefixes. The constant value is "xmlns".
59+
* <em>Note</em>: This is both an attribute name
6060
* and a namespace prefix: For example, to assign the empty
6161
* prefix to a namespace, one would use
6262
* <pre>
@@ -66,7 +66,7 @@ public class XMLConstants {
6666
* one would use
6767
* <pre>
6868
* xmlns:pre="http://my.namespace/..."
69-
* </pre></p>
69+
* </pre>
7070
*/
7171
public static final java.lang.String XMLNS_ATTRIBUTE = "xmlns";
7272

java5/src/main/java/javax/xml/namespace/NamespaceContext.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
* @since JAXB 1.0
3838
*/
3939
public interface NamespaceContext {
40-
/** <p>Given a prefix, returns the namespace URI associated with the prefix.
40+
/** Given a prefix, returns the namespace URI associated with the prefix.
4141
* More precisely, the following rules apply:
42-
* <table border="1">
42+
* <table border="1" summary="Rules governing Prefix to URI lookup">
4343
* <tr><th>Prefix (Input)</th><th>Namespace URI (Output)</th></tr>
4444
* <tr><th>{@link javax.xml.XMLConstants#DEFAULT_NS_PREFIX} ("")</th>
4545
* <td>The current default namespace URI or null, if there is no
@@ -52,7 +52,7 @@ public interface NamespaceContext {
5252
* </tr>
5353
* <tr><th>Any other prefix</th><td>The namespace URI currently mapped to the
5454
* prefix or null, if no such mapping is established.</td></tr>
55-
* </table></p>
55+
* </table>
5656
* @param pPrefix The prefix being looked up in the list of mappings.
5757
* @return The Namespace URI to which the input prefix is currently mapped
5858
* or null, if there is no such mapping.
@@ -61,20 +61,20 @@ public interface NamespaceContext {
6161
public String getNamespaceURI(String pPrefix);
6262

6363

64-
/** <p>This method returns a prefix, which is currently mapped to the given
64+
/** This method returns a prefix, which is currently mapped to the given
6565
* namespace URI. Note, that multiple prefixes may be mapped to the namespace
6666
* URI, in which case the returned prefix is undetermined. Do not make any
6767
* assumptions on the order in such cases. It is a better choice to use
6868
* {@link #getPrefixes(String)} instead, if you depend on some order
69-
* <table border="1">
69+
* <table border="1" summary="Rules governing URI to Prefix lookup">
7070
* <tr><th>Namespace URI (Input)</th><th>Prefix (Output)</th></tr>
7171
* <tr><th>Current default namespace URI</th>
7272
* <td>{@link javax.xml.XMLConstants#DEFAULT_NS_PREFIX} ("")</td></tr>
7373
* <tr><th>{@link javax.xml.XMLConstants#XML_NS_URI} ("http://www.w3.org/XML/1998/namespace")</th>
7474
* <td>{@link javax.xml.XMLConstants#XML_NS_PREFIX} ("xml")</td></tr>
7575
* <tr><th>{@link javax.xml.XMLConstants#XMLNS_ATTRIBUTE_NS_URI} ("http://www.w3.org/2000/xmlns/")</th>
7676
* <td>{@link javax.xml.XMLConstants#XMLNS_ATTRIBUTE}</td></tr>
77-
* </table></p>
77+
* </table>
7878
*
7979
* @param pNamespaceURI The namespace URI being looked up in the list of mappings.
8080
* @return A prefix currently mapped to the given namespace URI or null, if there
@@ -84,19 +84,19 @@ public interface NamespaceContext {
8484
public java.lang.String getPrefix(java.lang.String pNamespaceURI);
8585

8686

87-
/** <p>This method returns a collection of prefixes, which are currently mapped
87+
/** This method returns a collection of prefixes, which are currently mapped
8888
* to the given namespace URI. Note, that the collection may contain more than
8989
* one prefix, in which case the order is undetermined. If you do not depend
9090
* on a certain order and any prefix will do, you may choose to use
9191
* {@link #getPrefix(String)} instead. The following table describes the
9292
* returned values in more details:
93-
* <table border="1">
93+
* <table border="1" summary="Rules governing URI to Prefixes lookup">
9494
* <tr><th>Namespace URI (Input)</th><th>Prefix collection (Output)</th></tr>
9595
* <tr><th>{@link javax.xml.XMLConstants#XML_NS_URI} ("http://www.w3.org/XML/1998/namespace")</th>
9696
* <td>Collection with a single element: {@link javax.xml.XMLConstants#XML_NS_PREFIX} ("xml")</td></tr>
9797
* <tr><th>{@link javax.xml.XMLConstants#XMLNS_ATTRIBUTE_NS_URI} ("http://www.w3.org/2000/xmlns/")</th>
9898
* <td>Collection with a single element: {@link javax.xml.XMLConstants#XMLNS_ATTRIBUTE}</td></tr>
99-
* </table></p>
99+
* </table>
100100
*
101101
* @param pNamespaceURI The namespace URI being looked up in the list of
102102
* mappings or null, if there is no such mapping.

java5/src/main/java/javax/xml/namespace/QName.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ public String getPrefix() {
113113
return prefix;
114114
}
115115

116-
/** <p>Returns true, if
116+
/** Returns true, if
117117
* <ul>
118118
* <li><code>pOther</code> instanceof QName</li>
119119
* <li>getNamespaceURI().equals(pOther.getNamespaceURI())</li>
120120
* <li>getLocalPart().equals(pOther.getLocalPart())</li>
121121
* </ul>
122-
* <em>Note</em>: The prefix is ignored.</p>
122+
* <em>Note</em>: The prefix is ignored.
123123
*/
124124
public boolean equals(Object pOther) {
125125
if (!(pOther instanceof QName)) {

util/src/main/java/org/apache/ws/commons/util/NamespaceContextImpl.java

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public void reset() {
4949
}
5050

5151
/** Declares a new prefix. Typically called from within
52-
* {@link org.xml.sax.ContextHandler#startPrefixMapping(java.lang.String, java.lang.String)}.
52+
* {@link org.xml.sax.ContentHandler#startPrefixMapping(String, String)}.
53+
* @param pPrefix The namespace prefix.
54+
* @param pURI The namespace URI.
5355
* @throws IllegalArgumentException Prefix or URI are null.
5456
*/
5557
public void startPrefixMapping(String pPrefix, String pURI) {
@@ -70,7 +72,8 @@ public void startPrefixMapping(String pPrefix, String pURI) {
7072

7173
/** Removes the declaration of the prefix, which has been defined
7274
* last. Typically called from within
73-
* {@link org.xml.sax.ContextHandler#endPrefixMapping(java.lang.String)}.
75+
* {@link org.xml.sax.ContentHandler#endPrefixMapping(String)}.
76+
* @param pPrefix The namespace prefix.
7477
* @throws IllegalArgumentException The prefix is null.
7578
* @throws IllegalStateException The prefix is not the prefix, which
7679
* has been defined last. In other words, the calls to
@@ -94,10 +97,10 @@ public void endPrefixMapping(String pPrefix) {
9497
}
9598
}
9699

97-
/** Given a prefix, returns the URI to which the prefix is
100+
/** <p>Given a prefix, returns the URI to which the prefix is
98101
* currently mapped or null, if there is no such mapping.</p>
99102
* <p><em>Note</em>: This methods behaviour is precisely
100-
* defined by {@link NamespaceContext#getNamespaceURI(java.lang.String)}.
103+
* defined by {@link NamespaceContext#getNamespaceURI(java.lang.String)}</p>.
101104
* @param pPrefix The prefix in question
102105
*/
103106
public String getNamespaceURI(String pPrefix) {
@@ -157,7 +160,8 @@ public String getPrefix(String pURI) {
157160
* URL or null, if there is no such mapping. This method may be
158161
* used to find a possible prefix for an attributes namespace
159162
* URI. For elements you should use {@link #getPrefix(String)}.
160-
* @param pURI Thhe namespace URI in question
163+
* @param pURI The namespace URI in question
164+
* @return the attribute prefix or null
161165
* @throws IllegalArgumentException The namespace URI is null.
162166
*/
163167
public String getAttributePrefix(String pURI) {
@@ -220,6 +224,9 @@ public Iterator getPrefixes(String pURI) {
220224
}
221225

222226
/** Returns whether a given prefix is currently declared.
227+
*
228+
* @param pPrefix the namespace prefix.
229+
* @return true if the prefix is declared, false otherwise.
223230
*/
224231
public boolean isPrefixDeclared(String pPrefix) {
225232
if (cachedURI != null) {
@@ -245,6 +252,8 @@ public boolean isPrefixDeclared(String pPrefix) {
245252
* invoking
246253
* {@link org.xml.sax.ContentHandler#endElement(String, String, String)},
247254
* the state is restored by calling {@link #checkContext(int)}.
255+
*
256+
* @return the current number of assigned prefixes.
248257
*/
249258
public int getContext() {
250259
return (prefixList == null ? 0 : prefixList.size()) +
@@ -272,6 +281,9 @@ public int getContext() {
272281
* h.endPrefixMapping(prefix);
273282
* }
274283
* </pre>
284+
*
285+
* @param i the input state.
286+
* @return the prefix.
275287
*/
276288
public String checkContext(int i) {
277289
if (getContext() == i) {
@@ -292,6 +304,8 @@ public String checkContext(int i) {
292304
* in the order of declaration. Duplicates are possible, if a
293305
* prefix has been assigned to more than one URI, or repeatedly to
294306
* the same URI.
307+
*
308+
* @return a list of all prefixes.
295309
*/
296310
public List getPrefixes() {
297311
if (cachedPrefix == null) {

0 commit comments

Comments
 (0)