commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [3/9] incubator-commonsrdf git commit: rdf4j tests
Date Tue, 03 May 2016 22:15:52 GMT
rdf4j tests


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

Branch: refs/heads/rdf4j
Commit: 1fb7e72f500abe8363e3b5c6dfda4965aca84a7a
Parents: 12a6a39
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Tue May 3 22:26:57 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Tue May 3 22:26:57 2016 +0100

----------------------------------------------------------------------
 .../apache/commons/rdf/rdf4j/BlankNodeTest.java | 37 +++++++++++++++
 .../org/apache/commons/rdf/rdf4j/GraphTest.java | 30 ++++++++++++
 .../commons/rdf/rdf4j/MemoryGraphTest.java      | 49 ++++++++++++++++++++
 .../rdf/rdf4j/MemoryRDFTermFactoryTest.java     | 31 +++++++++++++
 .../rdf/rdf4j/Rdf4JRDFTermFactoryTest.java      | 30 ++++++++++++
 5 files changed, 177 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/1fb7e72f/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/BlankNodeTest.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/BlankNodeTest.java b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/BlankNodeTest.java
new file mode 100644
index 0000000..4d52f36
--- /dev/null
+++ b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/BlankNodeTest.java
@@ -0,0 +1,37 @@
+/**
+ * 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.AbstractBlankNodeTest;
+import org.apache.commons.rdf.api.BlankNode;
+
+public class BlankNodeTest extends AbstractBlankNodeTest {
+
+	Rdf4JRDFTermFactory factory = new Rdf4JRDFTermFactory();
+	
+	@Override
+	protected BlankNode getBlankNode() {
+		return factory.createBlankNode();
+	}
+
+	@Override
+	protected BlankNode getBlankNode(String identifier) {
+		return factory.createBlankNode(identifier);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/1fb7e72f/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/GraphTest.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/GraphTest.java b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/GraphTest.java
new file mode 100644
index 0000000..2a66f97
--- /dev/null
+++ b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/GraphTest.java
@@ -0,0 +1,30 @@
+/**
+ * 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.AbstractGraphTest;
+import org.apache.commons.rdf.api.RDFTermFactory;
+
+public class GraphTest extends AbstractGraphTest{
+
+	@Override
+	public RDFTermFactory createFactory() {
+		return new Rdf4JRDFTermFactory();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/1fb7e72f/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryGraphTest.java b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryGraphTest.java
new file mode 100644
index 0000000..4269cb0
--- /dev/null
+++ b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryGraphTest.java
@@ -0,0 +1,49 @@
+/**
+ * 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.AbstractGraphTest;
+import org.apache.commons.rdf.api.Graph;
+import org.apache.commons.rdf.api.RDFTermFactory;
+import org.openrdf.sail.NotifyingSailConnection;
+import org.openrdf.sail.memory.MemoryStore;
+import org.openrdf.sail.memory.model.MemValueFactory;
+import org.openrdf.sail.model.SailModel;
+
+public class MemoryGraphTest extends AbstractGraphTest {
+
+	public static final class MemoryStoreFactory extends Rdf4JRDFTermFactory {
+		MemoryStoreFactory() {
+			super(new MemValueFactory());
+		}
+
+		@Override
+		public Graph createGraph() throws UnsupportedOperationException {
+			MemoryStore x = new MemoryStore();
+			NotifyingSailConnection c = x.getConnection();
+			SailModel model = new SailModel(x.getConnection(), false);
+			return asRDFTermGraph(model);
+		}
+	}
+
+	@Override
+	public RDFTermFactory createFactory() {
+		return new MemoryStoreFactory();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/1fb7e72f/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryRDFTermFactoryTest.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryRDFTermFactoryTest.java
b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryRDFTermFactoryTest.java
new file mode 100644
index 0000000..0d6f153
--- /dev/null
+++ b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryRDFTermFactoryTest.java
@@ -0,0 +1,31 @@
+/**
+ * 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.AbstractRDFTermFactoryTest;
+import org.apache.commons.rdf.api.RDFTermFactory;
+
+public class MemoryRDFTermFactoryTest extends AbstractRDFTermFactoryTest {
+
+	@Override
+	public RDFTermFactory createFactory() {
+		return new MemoryGraphTest.MemoryStoreFactory();
+	}
+	
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/1fb7e72f/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/Rdf4JRDFTermFactoryTest.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/Rdf4JRDFTermFactoryTest.java
b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/Rdf4JRDFTermFactoryTest.java
new file mode 100644
index 0000000..a1020da
--- /dev/null
+++ b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/Rdf4JRDFTermFactoryTest.java
@@ -0,0 +1,30 @@
+/**
+ * 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.AbstractRDFTermFactoryTest;
+import org.apache.commons.rdf.api.RDFTermFactory;
+
+public class Rdf4JRDFTermFactoryTest extends AbstractRDFTermFactoryTest {
+
+	@Override
+	public RDFTermFactory createFactory() {
+		return new Rdf4JRDFTermFactory();
+	}
+
+}


Mime
View raw message