commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [1/5] commons-rdf git commit: COMMONSRDF-55: JavaDoc of isDefaultGraph() recognition
Date Wed, 08 Feb 2017 14:38:58 GMT
Repository: commons-rdf
Updated Branches:
  refs/heads/COMMONSRDF-55 a383e1f2e -> 718336954


COMMONSRDF-55: JavaDoc of isDefaultGraph() recognition


Project: http://git-wip-us.apache.org/repos/asf/commons-rdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rdf/commit/7bbff257
Tree: http://git-wip-us.apache.org/repos/asf/commons-rdf/tree/7bbff257
Diff: http://git-wip-us.apache.org/repos/asf/commons-rdf/diff/7bbff257

Branch: refs/heads/COMMONSRDF-55
Commit: 7bbff2573cb1567cd1c414fa9824cbdb8264aa0b
Parents: a383e1f
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Wed Feb 8 14:17:20 2017 +0000
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Wed Feb 8 14:17:20 2017 +0000

----------------------------------------------------------------------
 .../org/apache/commons/rdf/jena/JenaRDF.java    | 32 ++++++++++++++++++++
 1 file changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/7bbff257/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java b/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
index 92c0adb..d10d16d 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
@@ -151,6 +151,18 @@ public final class JenaRDF implements RDF {
         return internalJenaFactory.createTriple(subject, predicate, object);
     }
 
+    /**
+     * {@inheritDoc}
+     * <p>
+     * In addition to supporting a <code>graphName</code> of <code>null</code>
+     * for representing a triple in the <em>default graph</em>, this method also
+     * recognize a {@link JenaIRI} which {@link JenaRDFTerm#asJenaNode()}
+     * represent the default graph according to
+     * {@link org.apache.jena.sparql.core.Quad#isDefaultGraph(Node)}, in which
+     * case the returned JenaQuad will have a {@link Quad#getGraphName()} of
+     * {@link Optional#empty()} rather than the provided IRI.
+     * 
+     */
     @Override
     public JenaQuad createQuad(final BlankNodeOrIRI graphName, final BlankNodeOrIRI subject,
final IRI predicate, final RDFTerm object)
             throws IllegalArgumentException, UnsupportedOperationException {
@@ -187,6 +199,14 @@ public final class JenaRDF implements RDF {
      * The <em>generalized quad</em> supports any {@link RDFTerm} as its
      * {@link QuadLike#getSubject()} {@link QuadLike#getPredicate()},
      * {@link QuadLike#getObject()} or {@link QuadLike#getObject()}.
+     * <p>
+     * In addition to supporting a <code>graphName</code> of <code>null</code>
+     * for representing a triple in the <em>default graph</em>, this method also
+     * recognize a {@link JenaIRI} which {@link JenaRDFTerm#asJenaNode()}
+     * represent the default graph according to
+     * {@link org.apache.jena.sparql.core.Quad#isDefaultGraph(Node)}, in which
+     * case the returned JenaQuad will have a {@link Quad#getGraphName()} of
+     * {@link Optional#empty()} rather than the provided IRI.
      * 
      * @see #createQuad(BlankNodeOrIRI, BlankNodeOrIRI, IRI, RDFTerm)
      * @see #createGeneralizedTriple(RDFTerm, RDFTerm, RDFTerm)
@@ -345,6 +365,10 @@ public final class JenaRDF implements RDF {
      * {@link JenaRDF} instance in combination with
      * {@link Node#getBlankNodeId()} for the purpose of its
      * {@link BlankNode#uniqueReference()}.
+     * <p>
+     * If the provided quad {@link org.apache.jena.sparql.core.Quad#isDefaultGraph()},
+     * the returned {@link JenaQuadLike} has a {@link JenaQuadLike#getGraphName()} 
+     * of {@link Optional#empty()}.
      *
      * @see #asQuad(org.apache.jena.sparql.core.Quad)
      * @see #asGeneralizedTriple(org.apache.jena.graph.Triple)
@@ -407,6 +431,10 @@ public final class JenaRDF implements RDF {
      * {@link BlankNode} will use a {@link UUID} salt from this {@link JenaRDF}
      * instance in combination with {@link Node#getBlankNodeId()} for the
      * purpose of its {@link BlankNode#uniqueReference()}.
+     * <p>
+     * If the provided quad {@link org.apache.jena.sparql.core.Quad#isDefaultGraph()},
+     * the returned {@link JenaQuad} has a {@link Quad#getGraphName()} 
+     * of {@link Optional#empty()}.
      * 
      * @param quad
      *            Jena quad
@@ -510,6 +538,10 @@ public final class JenaRDF implements RDF {
      * factory's {@link RDF#createBlankNode(String)} will be used, meaning that
      * care should be taken if reusing an {@link RDF} instance for multiple
      * conversion sessions.
+     * <p>
+     * If the provided quad {@link org.apache.jena.sparql.core.Quad#isDefaultGraph()},
+     * the returned {@link JenaQuadLike} has a {@link JenaQuadLike#getGraphName()} 
+     * of {@link Optional#empty()}.
      * 
      * @see #asQuad(org.apache.jena.sparql.core.Quad)
      * @see #asGeneralizedQuad(org.apache.jena.sparql.core.Quad)


Mime
View raw message