commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [07/49] incubator-commonsrdf git commit: Deprecated SimpleRDFTermFactory
Date Fri, 28 Oct 2016 13:14:29 GMT
Deprecated SimpleRDFTermFactory


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

Branch: refs/heads/master
Commit: 374bb0f84a60bcaab5813d49bc7427f7441e5c7d
Parents: 08fbb92
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Wed Oct 19 17:43:19 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Wed Oct 19 17:43:19 2016 +0100

----------------------------------------------------------------------
 .../rdf/simple/SimpleRDFTermFactory.java        | 70 ++++++++++++++++++++
 .../org.apache.commons.rdf.api.RDFFactory       |  1 +
 .../org.apache.commons.rdf.api.RDFTermFactory   |  2 +-
 3 files changed, 72 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/374bb0f8/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
b/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
new file mode 100644
index 0000000..5f6f5fe
--- /dev/null
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
@@ -0,0 +1,70 @@
+/**
+ * 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.simple;
+
+import org.apache.commons.rdf.api.BlankNode;
+import org.apache.commons.rdf.api.BlankNodeOrIRI;
+import org.apache.commons.rdf.api.Graph;
+import org.apache.commons.rdf.api.IRI;
+import org.apache.commons.rdf.api.Literal;
+import org.apache.commons.rdf.api.RDFTerm;
+import org.apache.commons.rdf.api.RDFTermFactory;
+import org.apache.commons.rdf.api.Triple;
+
+/**
+ * A Simple implementation of {@link RDFTermFactory}
+ * <p>
+ * This class is <strong>deprecated</strong>, use instead {@link SimpleRDFFactory}.
+ */
+@Deprecated
+public class SimpleRDFTermFactory implements RDFTermFactory {
+
+	private SimpleRDFFactory factory = new SimpleRDFFactory();
+
+	public BlankNode createBlankNode() {
+		return factory.createBlankNode();
+	}
+
+	public BlankNode createBlankNode(String name) {
+		return factory.createBlankNode(name);
+	}
+
+	public Graph createGraph() {
+		return factory.createGraph();
+	}
+
+	public IRI createIRI(String iri) {
+		return factory.createIRI(iri);
+	}
+
+	public Literal createLiteral(String literal) {
+		return factory.createLiteral(literal);
+	}
+
+	public Literal createLiteral(String literal, IRI dataType) {
+		return factory.createLiteral(literal, dataType);
+	}
+
+	public Literal createLiteral(String literal, String language) {
+		return factory.createLiteral(literal, language);
+	}
+
+	public Triple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+		return factory.createTriple(subject, predicate, object);
+	} 
+}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/374bb0f8/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFFactory
----------------------------------------------------------------------
diff --git a/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFFactory
b/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFFactory
new file mode 100644
index 0000000..17d9680
--- /dev/null
+++ b/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFFactory
@@ -0,0 +1 @@
+org.apache.commons.rdf.simple.SimpleRDFFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/374bb0f8/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFTermFactory
----------------------------------------------------------------------
diff --git a/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFTermFactory
b/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFTermFactory
index 17d9680..cc53468 100644
--- a/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFTermFactory
+++ b/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFTermFactory
@@ -1 +1 @@
-org.apache.commons.rdf.simple.SimpleRDFFactory
\ No newline at end of file
+org.apache.commons.rdf.simple.SimpleRDFTermFactory
\ No newline at end of file


Mime
View raw message