commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [3/4] incubator-commonsrdf git commit: Added Resource <> RDF4JBlankNodeOrIRI
Date Mon, 03 Oct 2016 13:36:02 GMT
Added Resource <> RDF4JBlankNodeOrIRI

also removed duplicate asValue() definitions


Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/b792b7b9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/b792b7b9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/b792b7b9

Branch: refs/heads/rdf4j
Commit: b792b7b9dd9c92784e4bc7449dfb1f72daa60af0
Parents: 055c7c9
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Sat Oct 1 20:45:11 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Sat Oct 1 20:45:11 2016 +0100

----------------------------------------------------------------------
 .../commons/rdf/rdf4j/RDF4JBlankNode.java       | 17 +++++------
 .../commons/rdf/rdf4j/RDF4JBlankNodeOrIRI.java  | 32 ++++++++++++++++++++
 .../apache/commons/rdf/rdf4j/RDF4JGraph.java    |  3 +-
 .../org/apache/commons/rdf/rdf4j/RDF4JIRI.java  | 17 ++++-------
 .../apache/commons/rdf/rdf4j/RDF4JLiteral.java  | 16 +++-------
 5 files changed, 52 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b792b7b9/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.java
index c0523e1..a383831 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.java
@@ -17,19 +17,16 @@
  */
 package org.apache.commons.rdf.rdf4j;
 
+import org.apache.commons.rdf.api.BlankNode;
 import org.eclipse.rdf4j.model.BNode;
 
 /**
- * Marker interface for RDF4J implementations of BlankNode.
+ * Marker interface for RDF4J implementations of 
+ * Commons RDF {@link org.apache.commons.rdf.api.BlankNode}.
+ * <p>
+ * The underlying RDF4J {@link BNode} instance can 
+ * be retrieved with {@link #asValue()}.
  * 
  */
-public interface RDF4JBlankNode 
-	extends RDF4JTerm<org.eclipse.rdf4j.model.BNode>, org.apache.commons.rdf.api.BlankNode
{
-
-	/**
-	 * Return the corresponding RDF4J {@link BNode}.
-	 * 
-	 * @return The corresponding RDF4J BNode
-	 */
-	BNode asValue();
+public interface RDF4JBlankNode extends RDF4JBlankNodeOrIRI<BNode>, BlankNode {
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b792b7b9/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNodeOrIRI.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNodeOrIRI.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNodeOrIRI.java
new file mode 100644
index 0000000..5c83b55
--- /dev/null
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNodeOrIRI.java
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.rdf.rdf4j;
+
+import org.apache.commons.rdf.api.BlankNodeOrIRI;
+import org.eclipse.rdf4j.model.Resource;
+
+/**
+ * Marker interface for RDF4J implementations of 
+ * Commons RDF {@link BlankNodeOrIRI}
+ * <p>
+ * The underlying RDF4J {@link org.eclipse.rdf4j.model.Resource} 
+ * instance can be retrieved with {@link #asValue()}.
+ */
+public interface RDF4JBlankNodeOrIRI<T extends Resource> 
+	extends RDF4JTerm<T>, BlankNodeOrIRI {
+}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b792b7b9/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JGraph.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JGraph.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JGraph.java
index 31c6278..aba3f5d 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JGraph.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JGraph.java
@@ -19,6 +19,7 @@ package org.apache.commons.rdf.rdf4j;
 
 import java.util.Optional;
 
+import org.apache.commons.rdf.api.BlankNodeOrIRI;
 import org.apache.commons.rdf.api.Graph;
 import org.apache.commons.rdf.api.Triple;
 import org.apache.commons.rdf.rdf4j.impl.ModelGraphImpl;
@@ -64,6 +65,6 @@ public interface RDF4JGraph extends Graph, RDF4JGraphLike<Triple>
{
 	 *         {@link Optional#empty()} indicating the union graph (any
 	 *         context).
 	 */
-	public Optional<Resource[]> getContextMask();
+	public Optional<BlankNodeOrIRI[]> getContextMask();
 	
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b792b7b9/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JIRI.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JIRI.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JIRI.java
index c29e8b2..95b5359 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JIRI.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JIRI.java
@@ -18,18 +18,13 @@
 package org.apache.commons.rdf.rdf4j;
 
 /**
- * Marker interface for RDF4J implementations of IRI.
+ * Marker interface for RDF4J implementations of 
+ * Commons RDF {@link org.apache.commons.rdf.api.IRI}.
+ * <p>
+ * The underlying RDF4J {@link org.eclipse.rdf4j.model.IRI} 
+ * instance can be retrieved with {@link #asValue()}.
  * 
  */
 public interface RDF4JIRI 
-	extends RDF4JTerm<org.eclipse.rdf4j.model.IRI>, org.apache.commons.rdf.api.IRI {
-	
-	/**
-	 * Return the corresponding RDF4J {@link org.eclipse.rdf4j.model.IRI}.
-	 * 
-	 * @return The corresponding RDF4J IRI
-	 */
-	public org.eclipse.rdf4j.model.IRI asValue();
-	
-	
+	extends RDF4JBlankNodeOrIRI<org.eclipse.rdf4j.model.IRI>, org.apache.commons.rdf.api.IRI
{
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b792b7b9/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JLiteral.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JLiteral.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JLiteral.java
index 838074c..445a892 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JLiteral.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JLiteral.java
@@ -17,19 +17,13 @@
  */
 package org.apache.commons.rdf.rdf4j;
 
-import org.eclipse.rdf4j.model.Literal;
-
 /**
- * Marker interface for RDF4J implementations of Literal.
- * 
+ * Marker interface for RDF4J implementations of 
+ * Commons RDF {@link org.apache.commons.rdf.api.Literal}.
+ * <p>
+ * The underlying RDF4J {@link org.eclipse.rdf4j.model.Literal} 
+ * instance can be retrieved with {@link #asValue()}.
  */
 public interface RDF4JLiteral 
 	extends RDF4JTerm<org.eclipse.rdf4j.model.Literal>, org.apache.commons.rdf.api.Literal
{
-	
-	/**
-	 * Return the corresponding RDF4J {@link org.eclipse.rdf4j.model.Literal}.
-	 * 
-	 * @return The corresponding RDF4J Literal
-	 */
-	Literal asValue();
 }


Mime
View raw message