You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2016/02/06 16:50:58 UTC

[09/34] jena git commit: JENA-1129: Remove GraphStore support classes

JENA-1129: Remove GraphStore support classes


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

Branch: refs/heads/master
Commit: ba181dd6950ad54d71dc3a56c9a695c8321daa5a
Parents: 679e50e
Author: Andy Seaborne <an...@apache.org>
Authored: Thu Feb 4 18:40:52 2016 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri Feb 5 19:14:08 2016 +0000

----------------------------------------------------------------------
 .../core/assembler/DatasetNullAssembler.java    | 41 ---------
 .../jena/sparql/modify/GraphStoreAction.java    | 23 -----
 .../jena/sparql/modify/GraphStoreNull.java      | 97 --------------------
 .../jena/sparql/modify/GraphStoreWrapper.java   | 35 -------
 4 files changed, 196 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/ba181dd6/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetNullAssembler.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetNullAssembler.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetNullAssembler.java
deleted file mode 100644
index 77ad3c1..0000000
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetNullAssembler.java
+++ /dev/null
@@ -1,41 +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.jena.sparql.core.assembler;
-
-import org.apache.jena.assembler.Assembler ;
-import org.apache.jena.assembler.Mode ;
-import org.apache.jena.assembler.assemblers.AssemblerBase ;
-import org.apache.jena.atlas.logging.Log ;
-import org.apache.jena.query.DatasetFactory ;
-import org.apache.jena.rdf.model.Resource ;
-import org.apache.jena.sparql.modify.GraphStoreNull ;
-
-public class DatasetNullAssembler extends AssemblerBase implements Assembler
-{
-    public static Resource getType() { return DatasetAssemblerVocab.tDatasetNull ; }
-    
-    @Override
-    public Object open(Assembler a, Resource root, Mode mode)
-    {
-        // Always (fake) trasnactional
-        if (root.hasProperty(DatasetAssemblerVocab.pTransactional))
-            Log.info(DatasetNullAssembler.class, "DatasetNull is now always transactional") ;
-        return DatasetFactory.wrap(new GraphStoreNull()) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/ba181dd6/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreAction.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreAction.java b/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreAction.java
deleted file mode 100644
index 00621b8..0000000
--- a/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreAction.java
+++ /dev/null
@@ -1,23 +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.jena.sparql.modify;
-
-import org.apache.jena.graph.Graph ;
-
-public interface GraphStoreAction { public void exec(Graph graph) ; }

http://git-wip-us.apache.org/repos/asf/jena/blob/ba181dd6/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreNull.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreNull.java b/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreNull.java
deleted file mode 100644
index 05f8261..0000000
--- a/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreNull.java
+++ /dev/null
@@ -1,97 +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.jena.sparql.modify;
-
-import java.util.Iterator ;
-
-import org.apache.jena.atlas.iterator.Iter ;
-import org.apache.jena.graph.Factory ;
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.sparql.core.DatasetGraphQuad ;
-import org.apache.jena.sparql.core.Quad ;
-import org.apache.jena.sparql.core.Transactional ;
-import org.apache.jena.sparql.core.TransactionalNull ;
-import org.apache.jena.update.GraphStore ;
-
-/**
- * A black hole for Quads, add as many as you want and it will forget them all.  Useful for testing.
- */
-@SuppressWarnings("deprecation")
-public class GraphStoreNull extends DatasetGraphQuad implements GraphStore
-{
-    private final Transactional transaction = new TransactionalNull() ;
-
-    public GraphStoreNull() {}
-
-    @Override
-    public Iterator<Quad> find(Node g, Node s, Node p, Node o) {
-        return Iter.nullIterator();
-    }
-
-    @Override
-    public Iterator<Quad> findNG(Node g, Node s, Node p, Node o) {
-        return Iter.nullIterator();
-    }
-
-    @Override
-    public void add(Quad quad) {}
-
-    @Override
-    public void delete(Quad quad) {}
-
-    @Override
-    public void addGraph(Node graphName, Graph graph) {}
-
-    @Override
-    public Graph getDefaultGraph() {
-        return Factory.empty();
-    }
-
-    @Override
-    public Graph getGraph(Node graphNode) {
-        return Factory.empty();
-    }
-
-    @Override
-    public void begin(ReadWrite readWrite) {
-        transaction.begin(readWrite);
-    }
-
-    @Override
-    public void commit() {
-        transaction.commit();
-    }
-
-    @Override
-    public void abort() {
-        transaction.abort();
-    }
-
-    @Override
-    public boolean isInTransaction() {
-        return transaction.isInTransaction();
-    }
-
-    @Override
-    public void end() {
-        transaction.end();
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/ba181dd6/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreWrapper.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreWrapper.java b/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreWrapper.java
deleted file mode 100644
index d10f1cb..0000000
--- a/jena-arq/src/main/java/org/apache/jena/sparql/modify/GraphStoreWrapper.java
+++ /dev/null
@@ -1,35 +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.jena.sparql.modify;
-
-import org.apache.jena.sparql.core.DatasetGraphWrapper ;
-import org.apache.jena.update.GraphStore ;
-
-@SuppressWarnings("deprecation")
-public class GraphStoreWrapper extends DatasetGraphWrapper implements GraphStore
-{
-    protected final GraphStore graphStore ;
-
-    public GraphStoreWrapper(GraphStore graphStore)
-    { 
-        super(graphStore) ;
-        this.graphStore = graphStore ;
-    } 
-}
-