JENA-1847: Expand javadoc for getLocalName and getNameSpace.
diff --git a/jena-core/src/main/java/org/apache/jena/rdf/model/Property.java b/jena-core/src/main/java/org/apache/jena/rdf/model/Property.java
index 4eeac22..e13ae3c 100644
--- a/jena-core/src/main/java/org/apache/jena/rdf/model/Property.java
+++ b/jena-core/src/main/java/org/apache/jena/rdf/model/Property.java
@@ -21,29 +21,41 @@
/** An RDF Property.
*/
public interface Property extends Resource {
-
- public boolean isProperty();
- /** Returns the namespace associated with this property.
- * @return The namespace for this property.
+ public boolean isProperty();
+ /** Returns the namespace associated with this resource if it is a URI, else return null.
+ * <p>
+ * The namespace is suitable for use with localname in in RDF/XML.
+ * XML does not allow QNames to start with a digit and this method
+ * reflects that restriction in the values for namespace and localname.
+ * <p>
+ * See functions in {@code SplitIRI} for other split algorithms.
+ *
+ * @return The namespace for this resource or null.
*/
- @Override
-public String getNameSpace();
+ @Override
+ public String getNameSpace();
- /**
+ /**
Override RDFNode.inModel() to produce a staticly-typed Property
in the given Model.
- */
- @Override
-public Property inModel( Model m );
-
- /** Returns the name of this property within its namespace.
- * @return The name of this property within its namespace.
*/
- @Override
-public String getLocalName();
-
- /** Returns the ordinal value of a containment property.
+ @Override
+ public Property inModel( Model m );
+
+ /** Returns the localname of this resource within its namespace if it is a URI else null.
+ * <p>
+ * Note: XML requires QNames to start with a letter, not a digit,
+ * and this method reflects that restriction.
+ * <p>
+ * See functions in {@code SplitIRI}.
+ * @return The localname of this property within its namespace.
+ */
+
+ @Override
+ public String getLocalName();
+
+ /** Returns the ordinal value of a containment property.
*
* <p>RDF containers use properties of the form _1, _2, _3 etc to represent
* the containment relationship between the container and the objects it
@@ -54,5 +66,5 @@
* or 0 otherwise.
*
*/
- public int getOrdinal();
+ public int getOrdinal();
}
diff --git a/jena-core/src/main/java/org/apache/jena/rdf/model/Resource.java b/jena-core/src/main/java/org/apache/jena/rdf/model/Resource.java
index aaa7245..ac55405 100644
--- a/jena-core/src/main/java/org/apache/jena/rdf/model/Resource.java
+++ b/jena-core/src/main/java/org/apache/jena/rdf/model/Resource.java
@@ -82,13 +82,25 @@
*/
public String getURI();
- /** Returns the namespace associated with this resource.
- * @return The namespace for this property.
+ /** Returns the namespace associated with this resource if it is a URI, else return null.
+ * <p>
+ * The namespace is suitable for use with localname in in RDF/XML.
+ * XML does not allow QNames to start with a digit and this method
+ * reflects that restriction in the values for namespace and localname.
+ * <p>
+ * See functions in {@code SplitIRI} for other split algorithms.
+ *
+ * @return The namespace for this resource or null.
*/
public String getNameSpace();
- /** Returns the name of this resource within its namespace.
- * @return The name of this property within its namespace.
+ /** Returns the localname of this resource within its namespace if it is a URI else null.
+ * <p>
+ * Note: XML requires QNames to start with a letter, not a digit,
+ * and this method reflects that restriction.
+ * <p>
+ * See functions in {@code SplitIRI} for other split algorithms.
+ * @return The localname of this property within its namespace.
*/
public String getLocalName();