commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [46/50] incubator-commonsrdf git commit: Jena* interfaces moved out from .impl
Date Mon, 04 Jul 2016 09:37:50 GMT
Jena* interfaces moved out from .impl


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

Branch: refs/heads/jena
Commit: 3786f921b971f8e6d83f688830d5b717d1574be3
Parents: cb4044a
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Mon Jul 4 10:34:26 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Mon Jul 4 10:34:26 2016 +0100

----------------------------------------------------------------------
 .../org/apache/commons/rdf/jena/JenaGraph.java  | 26 ++++++++
 .../org/apache/commons/rdf/jena/JenaNode.java   | 27 ++++++++
 .../org/apache/commons/rdf/jena/JenaTriple.java | 26 ++++++++
 .../commons/rdf/jena/impl/JCR_BlankNode.java    |  1 +
 .../commons/rdf/jena/impl/JCR_Factory.java      |  4 ++
 .../apache/commons/rdf/jena/impl/JCR_Graph.java |  1 +
 .../apache/commons/rdf/jena/impl/JCR_IRI.java   |  1 +
 .../apache/commons/rdf/jena/impl/JCR_Term.java  |  1 +
 .../commons/rdf/jena/impl/JCR_Triple.java       |  1 +
 .../apache/commons/rdf/jena/impl/JenaGraph.java | 26 --------
 .../apache/commons/rdf/jena/impl/JenaNode.java  | 26 --------
 .../commons/rdf/jena/impl/JenaTriple.java       | 26 --------
 .../apache/commons/rdf/jena/impl/ToGraph.java   | 68 --------------------
 13 files changed, 88 insertions(+), 146 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/JenaGraph.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/JenaGraph.java b/jena/src/main/java/org/apache/commons/rdf/jena/JenaGraph.java
new file mode 100644
index 0000000..0760f77
--- /dev/null
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/JenaGraph.java
@@ -0,0 +1,26 @@
+/**
+ * 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.jena;
+
+import org.apache.jena.graph.Graph ;
+
+/** Access the Jena graph backing this object */ 
+public interface JenaGraph extends org.apache.commons.rdf.api.Graph {
+    public Graph getGraph() ;
+}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/JenaNode.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/JenaNode.java b/jena/src/main/java/org/apache/commons/rdf/jena/JenaNode.java
new file mode 100644
index 0000000..23085b6
--- /dev/null
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/JenaNode.java
@@ -0,0 +1,27 @@
+/**
+ * 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.jena;
+
+import org.apache.commons.rdf.api.RDFTerm;
+import org.apache.jena.graph.Node ;
+
+/** Access the Jena node backing this object */ 
+public interface JenaNode extends RDFTerm {
+    public Node getNode() ;
+}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/JenaTriple.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/JenaTriple.java b/jena/src/main/java/org/apache/commons/rdf/jena/JenaTriple.java
new file mode 100644
index 0000000..8800887
--- /dev/null
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/JenaTriple.java
@@ -0,0 +1,26 @@
+/**
+ * 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.jena;
+
+import org.apache.jena.graph.Triple ;
+
+/** Access the Jena triple backing this object */ 
+public interface JenaTriple extends org.apache.commons.rdf.api.Triple {
+    public Triple getTriple() ;
+}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_BlankNode.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_BlankNode.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_BlankNode.java
index 8885bb4..dad854b 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_BlankNode.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_BlankNode.java
@@ -19,6 +19,7 @@
 package org.apache.commons.rdf.jena.impl;
 
 import org.apache.commons.rdf.api.BlankNode ;
+import org.apache.commons.rdf.jena.JenaNode;
 import org.apache.jena.graph.Node ;
 
 public class JCR_BlankNode extends JCR_Term implements BlankNode, JenaNode {

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Factory.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Factory.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Factory.java
index e934f70..09c085a 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Factory.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Factory.java
@@ -82,5 +82,9 @@ public class JCR_Factory {
         conversionError("Node is not a concrete RDF Term: "+node) ;
         return null ;
     }
+
+	public static Quad fromJena(org.apache.jena.sparql.core.Quad quad) {
+		 return new JCR_Quad(quad) ;
+	}
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Graph.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Graph.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Graph.java
index f76ea4a..c8bbdca 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Graph.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Graph.java
@@ -24,6 +24,7 @@ import java.util.stream.Stream ;
 
 import org.apache.commons.rdf.api.* ;
 import org.apache.commons.rdf.jena.JenaCommonsRDF;
+import org.apache.commons.rdf.jena.JenaGraph;
 import org.apache.jena.atlas.iterator.Iter ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.riot.Lang ;

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_IRI.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_IRI.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_IRI.java
index fc8e366..b63d6a6 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_IRI.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_IRI.java
@@ -22,6 +22,7 @@ import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.NodeFactory ;
 
 import org.apache.commons.rdf.api.* ;
+import org.apache.commons.rdf.jena.JenaNode;
 
 public class JCR_IRI extends JCR_Term implements IRI, JenaNode {
 

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Term.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Term.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Term.java
index f676001..b52f5ac 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Term.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Term.java
@@ -18,6 +18,7 @@
 
 package org.apache.commons.rdf.jena.impl;
 
+import org.apache.commons.rdf.jena.JenaNode;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.riot.out.NodeFmtLib ;
 import org.apache.jena.shared.PrefixMapping ;

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Triple.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Triple.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Triple.java
index 30b035c..3956771 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Triple.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JCR_Triple.java
@@ -22,6 +22,7 @@ import java.util.Objects ;
 
 import org.apache.commons.rdf.api.* ;
 import org.apache.commons.rdf.jena.JenaCommonsRDF;
+import org.apache.commons.rdf.jena.JenaTriple;
 
 public class JCR_Triple implements Triple, JenaTriple {
     private final BlankNodeOrIRI subject ;

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraph.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraph.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraph.java
deleted file mode 100644
index 9f0b588..0000000
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraph.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.jena.impl;
-
-import org.apache.jena.graph.Graph ;
-
-/** Access the Jena graph backing this object */ 
-public interface JenaGraph {
-    public Graph getGraph() ;
-}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaNode.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaNode.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaNode.java
deleted file mode 100644
index 6e4075d..0000000
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaNode.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.jena.impl;
-
-import org.apache.jena.graph.Node ;
-
-/** Access the Jena node backing this object */ 
-public interface JenaNode {
-    public Node getNode() ;
-}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaTriple.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaTriple.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaTriple.java
deleted file mode 100644
index 0374cf9..0000000
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaTriple.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.jena.impl;
-
-import org.apache.jena.graph.Triple ;
-
-/** Access the Jena triple backing this object */ 
-public interface JenaTriple {
-    public Triple getTriple() ;
-}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/3786f921/jena/src/main/java/org/apache/commons/rdf/jena/impl/ToGraph.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/ToGraph.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/ToGraph.java
deleted file mode 100644
index 45e817c..0000000
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/ToGraph.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.jena.impl;
-
-import org.apache.commons.rdf.api.Graph ;
-import org.apache.commons.rdf.api.RDFTermFactory ;
-import org.apache.commons.rdf.jena.JenaCommonsRDF;
-import org.apache.jena.riot.system.StreamRDF ;
-
-/** Adapter to go from Jena StreamRDF (e.g. a parser output stream) to a CommonsRDF Graph
*/
-public class ToGraph implements StreamRDF {
-
-    private Graph graph;
-    private RDFTermFactory factory;
-
-    public ToGraph(RDFTermFactory factory) {
-        this(factory, factory.createGraph()) ;
-    }
-
-    public ToGraph(RDFTermFactory factory, Graph graph) {
-        this.factory = factory ; 
-        this.graph = graph ;
-    }
-
-    @Override
-    public void start() {}
-
-    @Override
-    public void triple(org.apache.jena.graph.Triple triple) {
-        graph.add(JenaCommonsRDF.fromJena(factory, triple)) ;
-    }
-
-    @Override
-    public void quad(org.apache.jena.sparql.core.Quad quad) {
-        throw new UnsupportedOperationException() ;
-    }
-
-    @Override
-    public void base(String base) {}
-
-    @Override
-    public void prefix(String prefix, String iri) {}
-
-    @Override
-    public void finish() {}
-
-    public Graph getGraph() {
-        return graph;
-    }
-    
-}
-


Mime
View raw message