You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by wi...@apache.org on 2015/03/27 19:15:10 UTC
[12/50] [abbrv] incubator-commonsrdf git commit: Patch javadoc to be
strict
Patch javadoc to be strict
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/4d348f92
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/4d348f92
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/4d348f92
Branch: refs/heads/master
Commit: 4d348f926f4ce4940f5e76dadabba9009dfbe4e7
Parents: 29010e4
Author: Peter Ansell <p_...@yahoo.com>
Authored: Mon Jan 26 16:10:20 2015 +1100
Committer: Peter Ansell <p_...@yahoo.com>
Committed: Mon Jan 26 16:10:20 2015 +1100
----------------------------------------------------------------------
.../com/github/commonsrdf/api/BlankNode.java | 119 +++++++++----------
.../java/com/github/commonsrdf/api/IRI.java | 46 +++----
.../java/com/github/commonsrdf/api/Literal.java | 112 ++++++++---------
.../java/com/github/commonsrdf/api/Triple.java | 89 +++++++-------
4 files changed, 185 insertions(+), 181 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4d348f92/api/src/main/java/com/github/commonsrdf/api/BlankNode.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/github/commonsrdf/api/BlankNode.java b/api/src/main/java/com/github/commonsrdf/api/BlankNode.java
index 780cc15..5105dfa 100644
--- a/api/src/main/java/com/github/commonsrdf/api/BlankNode.java
+++ b/api/src/main/java/com/github/commonsrdf/api/BlankNode.java
@@ -19,15 +19,15 @@ package com.github.commonsrdf.api;
* "http://www.w3.org/TR/rdf11-concepts/#section-blank-nodes" >RDF-1.1 Concepts
* and Abstract Syntax</a>, a W3C Recommendation published on 25 February 2014.<br>
*
- * Note that: Blank nodes are disjoint from IRIs and literals. Otherwise,
- * the set of possible blank nodes is arbitrary. RDF makes no reference to any
+ * Note that: Blank nodes are disjoint from IRIs and literals. Otherwise, the
+ * set of possible blank nodes is arbitrary. RDF makes no reference to any
* internal structure of blank nodes.
*
- * Also note that: Blank node identifiers are local identifiers that are
- * used in some concrete RDF syntaxes or RDF store implementations. They are
- * always locally scoped to the file or RDF store, and are not persistent or
- * portable identifiers for blank nodes. Blank node identifiers are not part of
- * the RDF abstract syntax, but are entirely dependent on the concrete syntax or
+ * Also note that: Blank node identifiers are local identifiers that are used in
+ * some concrete RDF syntaxes or RDF store implementations. They are always
+ * locally scoped to the file or RDF store, and are not persistent or portable
+ * identifiers for blank nodes. Blank node identifiers are not part of the RDF
+ * abstract syntax, but are entirely dependent on the concrete syntax or
* implementation. The syntactic restrictions on blank node identifiers, if any,
* therefore also depend on the concrete RDF syntax or implementation.
* Implementations that handle blank node identifiers in concrete syntaxes need
@@ -36,53 +36,51 @@ package com.github.commonsrdf.api;
* by the syntax.
*
* @see <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node">RDF-1.1
- * Blank Node</a>
+ * Blank Node</a>
*/
public interface BlankNode extends BlankNodeOrIRI {
- /**
- * Return a <a href=
- * "http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node-identifier">label</a>
- * for the blank node. This is not a serialization/syntax label. It should
- * be uniquely identifying within the local scope it is created in but has
- * no uniqueness guarantees other than that.
- *
- * In particular, the existence of two objects of type {@link BlankNode}
- * with the same value returned from {@link #internalIdentifier()} are not
- * equivalent unless they are known to have been created in the same local
- * scope.
- *
- * An example of a local scope may be an instance of a Java Virtual Machine
- * (JVM). In the context of a JVM instance, an implementor may support
- * insertion and removal of {@link Triple} objects containing Blank Nodes
- * without modifying the blank node labels.
- *
- * Another example of a local scope may be a <a
- * href="http://www.w3.org/TR/rdf11-concepts/#section-rdf-graph">Graph</a>
- * or <a
- * href="http://www.w3.org/TR/rdf11-concepts/#section-dataset">Dataset</a>
- * created from a single document. In this context, an implementor should
- * reasonably guarantee that the label returned by getLabel only maps to
- * equivalent blank nodes in the same Graph or Dataset, but they may not
- * guarantee that it is unique for the JVM instance. In this case, the
- * implementor may support a mechanism to provide a mapping for blank nodes
- * between Graph or Dataset instances to guarantee their uniqueness.
- *
- * If implementors support <a
- * href="http://www.w3.org/TR/rdf11-concepts/#section-skolemization"
- * >Skolemisation</a>, they may map instances of {@link BlankNode} objects
- * to {@link IRI} objects to reduce scoping issues.
- *
- * @return An internal, system identifier for the {@link BlankNode}.
- */
- String internalIdentifier();
-
+ /**
+ * Return a <a href=
+ * "http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node-identifier"
+ * >label</a> for the blank node. This is not a serialization/syntax label.
+ * It should be uniquely identifying within the local scope it is created in
+ * but has no uniqueness guarantees other than that.
+ *
+ * In particular, the existence of two objects of type {@link BlankNode}
+ * with the same value returned from {@link #internalIdentifier()} are not
+ * equivalent unless they are known to have been created in the same local
+ * scope.
+ *
+ * An example of a local scope may be an instance of a Java Virtual Machine
+ * (JVM). In the context of a JVM instance, an implementor may support
+ * insertion and removal of {@link Triple} objects containing Blank Nodes
+ * without modifying the blank node labels.
+ *
+ * Another example of a local scope may be a <a
+ * href="http://www.w3.org/TR/rdf11-concepts/#section-rdf-graph">Graph</a>
+ * or <a
+ * href="http://www.w3.org/TR/rdf11-concepts/#section-dataset">Dataset</a>
+ * created from a single document. In this context, an implementor should
+ * reasonably guarantee that the label returned by getLabel only maps to
+ * equivalent blank nodes in the same Graph or Dataset, but they may not
+ * guarantee that it is unique for the JVM instance. In this case, the
+ * implementor may support a mechanism to provide a mapping for blank nodes
+ * between Graph or Dataset instances to guarantee their uniqueness.
+ *
+ * If implementors support <a
+ * href="http://www.w3.org/TR/rdf11-concepts/#section-skolemization"
+ * >Skolemisation</a>, they may map instances of {@link BlankNode} objects
+ * to {@link IRI} objects to reduce scoping issues.
+ *
+ * @return An internal, system identifier for the {@link BlankNode}.
+ */
+ String internalIdentifier();
/**
- * Check it this BlankNode is equal to another BlankNode.
- * <p>
- * <blockquote cite="http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node-identifier">
- * <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node-identifier">Blank
+ * Check it this BlankNode is equal to another BlankNode. <blockquote> <a
+ * href
+ * ="http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node-identifier">Blank
* node identifiers</a> are local identifiers that are used in some concrete
* RDF syntaxes or RDF store implementations. They are always locally scoped
* to the file or RDF store, and are <em>not</em> persistent or portable
@@ -93,28 +91,29 @@ public interface BlankNode extends BlankNodeOrIRI {
* implementation. Implementations that handle blank node identifiers in
* concrete syntaxes need to be careful not to create the same blank node
* from multiple occurrences of the same blank node identifier except in
- * situations where this is supported by the syntax.
- * </blockquote>
+ * situations where this is supported by the syntax. </blockquote>
* <p>
* Implementations MUST check the local scope, as two BlankNode in different
- * Graphs MUST differ. On the other hand, two BlankNodes found in triples
- * of the same Graph instance MUST equal if and only if they have the same
+ * Graphs MUST differ. On the other hand, two BlankNodes found in triples of
+ * the same Graph instance MUST equal if and only if they have the same
* {@link #internalIdentifier()}.
+ * </p>
* <p>
* Implementations MUST also override {@link #hashCode()} so that two equal
* Literals produce the same hash code.
+ * </p>
*
* @see Object#equals(Object)
*
* @param other
+ * Another object
* @return true if other is a BlankNode, is in the same local scope and is
* equal to this BlankNode
*/
- @Override
- public boolean equals(Object other);
-
-
- /**
+ @Override
+ public boolean equals(Object other);
+
+ /**
* Calculate a hash code for this BlankNode.
* <p>
* This method MUST be implemented when implementing {@link #equals(Object)}
@@ -124,7 +123,7 @@ public interface BlankNode extends BlankNodeOrIRI {
*
* @return a hash code value for this BlankNode.
*/
- @Override
- public int hashCode();
+ @Override
+ public int hashCode();
}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4d348f92/api/src/main/java/com/github/commonsrdf/api/IRI.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/github/commonsrdf/api/IRI.java b/api/src/main/java/com/github/commonsrdf/api/IRI.java
index a2600f7..421d2a9 100644
--- a/api/src/main/java/com/github/commonsrdf/api/IRI.java
+++ b/api/src/main/java/com/github/commonsrdf/api/IRI.java
@@ -14,50 +14,52 @@
package com.github.commonsrdf.api;
/**
- * An <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-iri"
- * >RDF-1.1 IRI</a>, as defined by <a href=
- * "http://www.w3.org/TR/rdf11-concepts/" >RDF-1.1 Concepts
- * and Abstract Syntax</a>, a W3C Recommendation published on 25 February 2014.<br>
+ * An <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-iri" >RDF-1.1 IRI</a>,
+ * as defined by <a href= "http://www.w3.org/TR/rdf11-concepts/" >RDF-1.1
+ * Concepts and Abstract Syntax</a>, a W3C Recommendation published on 25
+ * February 2014.<br>
*/
public interface IRI extends BlankNodeOrIRI {
/**
* Return the IRI encoded as a native Unicode String.<br>
*
- * The returned string must not include URL-encoding to escape
- * non-ASCII characters.
+ * The returned string must not include URL-encoding to escape non-ASCII
+ * characters.
*
* @return The IRI encoded as a native Unicode String.
*/
- String getIRIString();
-
- /**
- * Check it this IRI is equal to another IRI.
- * <p>
- * <blockquote cite="http://www.w3.org/TR/rdf11-concepts/#dfn-iri-equality"> <a
+ String getIRIString();
+
+ /**
+ * Check it this IRI is equal to another IRI. <blockquote> <a
* href="http://www.w3.org/TR/rdf11-concepts/#section-IRIs">IRI
* equality</a>: Two IRIs are equal if and only if they are equivalent under
* Simple String Comparison according to section 5.1 of [RFC3987]. Further
* normalization MUST NOT be performed when comparing IRIs for equality.
- * </blockquote>
- * <p>Two IRIs are equal are in the same local scope and their
- * {@link #getIRIString()} are equal.
+ * </blockquote>
+ * <p>
+ * Two IRIs are equal are in the same local scope and their
+ * {@link #getIRIString()} are equal.
+ * </p>
* <p>
* Implementations MAY check the local scope for IRI comparison.
+ * </p>
* <p>
* Implementations MUST also override {@link #hashCode()} so that two equal
* IRIs produce the same hash code.
+ * </p>
*
* @see Object#equals(Object)
*
* @param other
+ * Another object
* @return true if other is an IRI and is equal to this
*/
- @Override
- public boolean equals(Object other);
-
-
- /**
+ @Override
+ public boolean equals(Object other);
+
+ /**
* Calculate a hash code for this IRI.
* <p>
* This method MUST be implemented when implementing {@link #equals(Object)}
@@ -67,6 +69,6 @@ public interface IRI extends BlankNodeOrIRI {
*
* @return a hash code value for this IRI.
*/
- @Override
- public int hashCode();
+ @Override
+ public int hashCode();
}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4d348f92/api/src/main/java/com/github/commonsrdf/api/Literal.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/github/commonsrdf/api/Literal.java b/api/src/main/java/com/github/commonsrdf/api/Literal.java
index bb93aee..4982327 100644
--- a/api/src/main/java/com/github/commonsrdf/api/Literal.java
+++ b/api/src/main/java/com/github/commonsrdf/api/Literal.java
@@ -23,86 +23,86 @@ import java.util.Optional;
*/
public interface Literal extends RDFTerm {
- /**
- * The lexical form of this literal, represented by a <a
- * href="http://www.unicode.org/versions/latest/">Unicode string</a>.
- *
- * @return The lexical form of this literal.
- * @see <a
- * href="http://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form">RDF-1.1
- * Literal lexical form</a>
- */
- String getLexicalForm();
+ /**
+ * The lexical form of this literal, represented by a <a
+ * href="http://www.unicode.org/versions/latest/">Unicode string</a>.
+ *
+ * @return The lexical form of this literal.
+ * @see <a
+ * href="http://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form">RDF-1.1
+ * Literal lexical form</a>
+ */
+ String getLexicalForm();
- /**
- * The IRI identifying the datatype that determines how the lexical form
- * maps to a literal value.
- *
- * @return The datatype IRI for this literal.
- * @see <a
- * href="http://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri">RDF-1.1
- * Literal datatype IRI</a>
- */
- IRI getDatatype();
+ /**
+ * The IRI identifying the datatype that determines how the lexical form
+ * maps to a literal value.
+ *
+ * @return The datatype IRI for this literal.
+ * @see <a
+ * href="http://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri">RDF-1.1
+ * Literal datatype IRI</a>
+ */
+ IRI getDatatype();
- /**
- * If and only if the datatype IRI is <a
- * href="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
- * >http://www.w3.org/1999/02/22-rdf-syntax-ns#langString</a>, the language
- * tag for this Literal is a non-empty language tag as defined by <a
- * href="http://tools.ietf.org/html/bcp47">BCP47</a>.<br>
- * If the datatype IRI is not <a
- * href="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
- * >http://www.w3.org/1999/02/22-rdf-syntax-ns#langString</a>, this method
- * must return {@link Optional#empty()}.
- *
- * @return The {@link Optional} language tag for this literal. If
- * {@link Optional#isPresent()} returns true, the value returned by
- * {@link Optional#get()} must be a non-empty string conforming to
- * BCP47.
- * @see <a
- * href="http://www.w3.org/TR/rdf11-concepts/#dfn-language-tag">RDF-1.1
- * Literal language tag</a>
- */
- Optional<String> getLanguageTag();
-
/**
- * Check it this Literal is equal to another Literal.
- * <p>
- * <blockquote cite="http://www.w3.org/TR/rdf11-concepts/#dfn-literal-term">
- * <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-literal-term">Literal
- * term equality</a>: Two literals are term-equal (the same RDF literal) if
- * and only if the two lexical forms, the two datatype IRIs, and the two
+ * If and only if the datatype IRI is <a
+ * href="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
+ * >http://www.w3.org/1999/02/22-rdf-syntax-ns#langString</a>, the language
+ * tag for this Literal is a non-empty language tag as defined by <a
+ * href="http://tools.ietf.org/html/bcp47">BCP47</a>.<br>
+ * If the datatype IRI is not <a
+ * href="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
+ * >http://www.w3.org/1999/02/22-rdf-syntax-ns#langString</a>, this method
+ * must return {@link Optional#empty()}.
+ *
+ * @return The {@link Optional} language tag for this literal. If
+ * {@link Optional#isPresent()} returns true, the value returned by
+ * {@link Optional#get()} must be a non-empty string conforming to
+ * BCP47.
+ * @see <a
+ * href="http://www.w3.org/TR/rdf11-concepts/#dfn-language-tag">RDF-1.1
+ * Literal language tag</a>
+ */
+ Optional<String> getLanguageTag();
+
+ /**
+ * Check it this Literal is equal to another Literal. <blockquote> <a
+ * href="http://www.w3.org/TR/rdf11-concepts/#dfn-literal-term">Literal term
+ * equality</a>: Two literals are term-equal (the same RDF literal) if and
+ * only if the two lexical forms, the two datatype IRIs, and the two
* language tags (if any) compare equal, character by character. Thus, two
* literals can have the same value without being the same RDF term.
* </blockquote>
* <p>
- * Implementations MAY check the local scope for Literal
- * comparison.
+ * Implementations MAY check the local scope for Literal comparison.
+ * </p>
* <p>
* Implementations MUST also override {@link #hashCode()} so that two equal
* Literals produce the same hash code.
+ * </p>
*
* @see Object#equals(Object)
*
* @param other
+ * Another object
* @return true if other is a Literal and is equal to this
*/
- @Override
- public boolean equals(Object other);
-
-
- /**
+ @Override
+ public boolean equals(Object other);
+
+ /**
* Calculate a hash code for this Literal.
* <p>
* This method MUST be implemented when implementing {@link #equals(Object)}
* so that two equal Literals produce the same hash code.
+ * </p>
*
* @see Object#hashCode()
*
* @return a hash code value for this Literal.
*/
- @Override
- public int hashCode();
+ @Override
+ public int hashCode();
}
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/4d348f92/api/src/main/java/com/github/commonsrdf/api/Triple.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/github/commonsrdf/api/Triple.java b/api/src/main/java/com/github/commonsrdf/api/Triple.java
index 3badb30..1cc8ec8 100644
--- a/api/src/main/java/com/github/commonsrdf/api/Triple.java
+++ b/api/src/main/java/com/github/commonsrdf/api/Triple.java
@@ -20,75 +20,78 @@ package com.github.commonsrdf.api;
* 25 February 2014.<br>
*
* @see <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-triple" >RDF-1.1
- * Triple</a>
+ * Triple</a>
*/
public interface Triple {
- /**
- * The subject of this triple, which may be either a {@link BlankNode} or an
- * {@link IRI}, which are represented in Commons RDF by the interface
- * {@link BlankNodeOrIRI}.
- *
- * @return The subject {@link BlankNodeOrIRI} of this triple.
- * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-subject">RDF-1.1
- * Triple subject</a>
- */
- BlankNodeOrIRI getSubject();
+ /**
+ * The subject of this triple, which may be either a {@link BlankNode} or an
+ * {@link IRI}, which are represented in Commons RDF by the interface
+ * {@link BlankNodeOrIRI}.
+ *
+ * @return The subject {@link BlankNodeOrIRI} of this triple.
+ * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-subject">RDF-1.1
+ * Triple subject</a>
+ */
+ BlankNodeOrIRI getSubject();
- /**
- * The predicate {@link IRI} of this triple.
- *
- * @return The predicate {@link IRI} of this triple.
- * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-predicate">RDF-1.1
- * Triple predicate</a>
- */
- IRI getPredicate();
+ /**
+ * The predicate {@link IRI} of this triple.
+ *
+ * @return The predicate {@link IRI} of this triple.
+ * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-predicate">RDF-1.1
+ * Triple predicate</a>
+ */
+ IRI getPredicate();
- /**
- * The object of this triple, which may be either a {@link BlankNode}, an
- * {@link IRI}, or a {@link Literal}, which are represented in Commons RDF
- * by the interface {@link RDFTerm}.
- *
- * @return The object {@link RDFTerm} of this triple.
- * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-object">RDF-1.1
- * Triple object</a>
- */
- RDFTerm getObject();
+ /**
+ * The object of this triple, which may be either a {@link BlankNode}, an
+ * {@link IRI}, or a {@link Literal}, which are represented in Commons RDF
+ * by the interface {@link RDFTerm}.
+ *
+ * @return The object {@link RDFTerm} of this triple.
+ * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-object">RDF-1.1
+ * Triple object</a>
+ */
+ RDFTerm getObject();
- /**
+ /**
* Check it this Triple is equal to another Triple.
* <p>
- * <p>Two Triples are equal if and only if their
- * {@link #getSubject()}, {@link #getPredicate()} and {@link #getObject()}
- * are equal.
+ * Two Triples are equal if and only if their {@link #getSubject()},
+ * {@link #getPredicate()} and {@link #getObject()} are equal.
+ * </p>
* <p>
- * Implementations MUST check the local scope for Triple comparison
- * if either the subject or object is a BlankNode, and MAY check the local
+ * Implementations MUST check the local scope for Triple comparison if
+ * either the subject or object is a BlankNode, and MAY check the local
* scope in other cases.
+ * </p>
* <p>
* Implementations MUST also override {@link #hashCode()} so that two equal
* Triples produce the same hash code.
+ * </p>
*
* @see Object#equals(Object)
*
* @param other
+ * Another object
* @return true if other is a Triple and is equal to this
*/
- @Override
- public boolean equals(Object other);
-
-
- /**
+ @Override
+ public boolean equals(Object other);
+
+ /**
* Calculate a hash code for this Triple.
* <p>
* This method MUST be implemented when implementing {@link #equals(Object)}
* so that two equal IRIs produce the same hash code.
+ * </p>
*
* @see Object#hashCode()
*
* @return a hash code value for this Triple.
*/
- @Override
- public int hashCode();
-
+ @Override
+ public int hashCode();
+
}