Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 96F25200AEE for ; Wed, 4 May 2016 00:15:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 957471609F7; Wed, 4 May 2016 00:15:55 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B197A1609F5 for ; Wed, 4 May 2016 00:15:54 +0200 (CEST) Received: (qmail 84897 invoked by uid 500); 3 May 2016 22:15:53 -0000 Mailing-List: contact commits-help@commonsrdf.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commonsrdf.incubator.apache.org Delivered-To: mailing list commits@commonsrdf.incubator.apache.org Received: (qmail 84888 invoked by uid 99); 3 May 2016 22:15:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 22:15:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 7DEBB1A50B0 for ; Tue, 3 May 2016 22:15:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id q1tseuHjJf2q for ; Tue, 3 May 2016 22:15:51 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id 14F215F23C for ; Tue, 3 May 2016 22:15:50 +0000 (UTC) Received: (qmail 84645 invoked by uid 99); 3 May 2016 22:15:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 22:15:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4E5D0DFE16; Tue, 3 May 2016 22:15:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: stain@apache.org To: commits@commonsrdf.incubator.apache.org Date: Tue, 03 May 2016 22:15:52 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/9] incubator-commonsrdf git commit: rdf4j tests archived-at: Tue, 03 May 2016 22:15:55 -0000 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 Authored: Tue May 3 22:26:57 2016 +0100 Committer: Stian Soiland-Reyes 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(); + } + +}