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 2015/04/26 11:42:01 UTC

[14/50] [abbrv] jena git commit: Reove deprecations.

Reove deprecations.

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

Branch: refs/heads/master
Commit: 4d23f3351ae16dce2a34d8393aa28bd022968098
Parents: 61a91e6
Author: Andy Seaborne <an...@apache.org>
Authored: Fri Apr 24 19:50:24 2015 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri Apr 24 19:50:24 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/jena/tdb/TDBFactory.java    | 110 -------------------
 .../org/apache/jena/tdb/base/file/Location.java |   4 +-
 .../org/apache/jena/tdb/store/GraphTDB.java     |   8 --
 .../java/org/apache/jena/tdb/sys/TDBMaker.java  |  11 +-
 4 files changed, 2 insertions(+), 131 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/4d23f335/jena-tdb/src/main/java/org/apache/jena/tdb/TDBFactory.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/TDBFactory.java b/jena-tdb/src/main/java/org/apache/jena/tdb/TDBFactory.java
index d0cb53b..adfdf6d 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/TDBFactory.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/TDBFactory.java
@@ -18,12 +18,8 @@
 
 package org.apache.jena.tdb;
 
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.NodeFactory ;
 import org.apache.jena.query.Dataset ;
 import org.apache.jena.query.DatasetFactory ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.rdf.model.ModelFactory ;
 import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.core.assembler.AssemblerUtils ;
 import org.apache.jena.tdb.assembler.VocabTDB ;
@@ -82,16 +78,6 @@ public class TDBFactory
         _release(location(dataset)) ;
     }
     
-    /** Reset internal state, releasing all datasets.
-     *  No checking done, do not call while TDB is execution queries or updates.
-     *  Mainly for the tests to have a known clean state.
-     *  @deprecated
-     */
-    @Deprecated
-    public static void reset() {
-        TDBMaker.reset() ;
-    }
-
     private static DatasetGraph _createDatasetGraph(Location location) {
         return TDBMaker.createDatasetGraphTransaction(location) ;
     }
@@ -156,100 +142,4 @@ public class TDBFactory
             throw new IllegalStateException("Location is already active") ;
         StoreConnection.make(location, params) ;
     }
-    
-    /** Read the file and assembler a graph, of type TDB persistent graph
-     *  @deprecated Assemble a Dataset and use the default graph.
-     */
-    @Deprecated 
-    public static Graph assembleGraph(String assemblerFile) {
-        Model m = assembleModel(assemblerFile) ;
-        Graph g = m.getGraph() ;
-        return g ;
-    }
-
-    /** Read the file and assembler a model, of type TDB persistent graph
-     *  @deprecated Assemble a Dataset and use the default model.
-     */
-    @Deprecated 
-    public static Model assembleModel(String assemblerFile) {
-        return (Model)AssemblerUtils.build(assemblerFile, VocabTDB.tGraphTDB) ;
-    }
-
-    /** Create a model, at the given location.
-     *  It is better to create a dataset and get the default model from that.
-     *  This Model is not connected to the TDB transaction system.
-     *  @deprecated Create a Dataset and use the default model.
-     */
-    @Deprecated
-    public static Model createModel(Location loc) {
-        return ModelFactory.createModelForGraph(createGraph(loc)) ;
-    }
-
-    /** Create a model, at the given location 
-     *  It is better to create a dataset and get the default model from that.
-     *  This Model is not connected to the TDB transaction system. 
-     *  @deprecated Create a Dataset and get the default model.
-     */
-    @Deprecated
-    public static Model createModel(String dir) {
-        return ModelFactory.createModelForGraph(createGraph(dir)) ;
-    }
-
-    /** Create a TDB model backed by an in-memory block manager. For testing. */
-    @Deprecated
-    
-    public static Model createModel()
-    { return ModelFactory.createModelForGraph(createGraph()) ; }
-
-    /** Create a TDB model for named model
-     * It is better to create a dataset and get the named model from that.
-     * This Model is not connected to the TDB transaction system.
-     *  @deprecated Create a Dataset and get the name model.
-     */
-    @Deprecated
-    public static Model createNamedModel(String name, String location)
-    { return createDataset(location).getNamedModel(name) ; }
-
-    /** Create a TDB model for named model.
-     * It is better to create a dataset and get the named model from that.
-     * This Model is not connected to the TDB transaction system.
-     *  @deprecated Create a Dataset and get the name model.
-     */  
-    @Deprecated
-    public static Model createNamedModel(String name, Location location)
-    { return createDataset(location).getNamedModel(name) ; }
-
-    /** Create a graph, at the given location 
-     * @deprecated Create a DatasetGraph and use the default graph.
-     */
-    @Deprecated
-    public static Graph createGraph(Location loc)       { return createDatasetGraph(loc).getDefaultGraph() ; }
-
-    /** Create a graph, at the given location 
-     * @deprecated Create a DatasetGraph and use the default graph.
-     */
-    @Deprecated
-    public static Graph createGraph(String dir)
-    {
-        Location loc = Location.create(dir) ;
-        return createGraph(loc) ;
-    }
-    
-    /** Create a TDB graph backed by an in-memory block manager. For testing. */  
-    @Deprecated
-    public static Graph createGraph()   { return createDatasetGraph().getDefaultGraph() ; }
-
-    /** Create a TDB graph for named graph
-     * @deprecated Create a DatasetGraph and get the name graph from that.
-     */  
-    @Deprecated
-    public static Graph createNamedGraph(String name, String location)
-    { return createDatasetGraph(location).getGraph(NodeFactory.createURI(name)) ; }
-    
-    /** Create a TDB graph for named graph
-     * @deprecated Create a DatasetGraph and get the name graph from that.
-     */  
-    @Deprecated
-    public static Graph createNamedGraph(String name, Location location)
-    { return createDatasetGraph(location).getGraph(NodeFactory.createURI(name)) ; }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/4d23f335/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/Location.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/Location.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/Location.java
index d429d00..780ec0d 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/Location.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/Location.java
@@ -83,9 +83,7 @@ public class Location {
         location.lock = new LocationLock(location);
     }
 
-    /** @deprecated Use{@link  Location#create(String)} */
-    @Deprecated
-    public Location(String rootname) {
+    private Location(String rootname) {
         super() ;
         if ( rootname.equals(Names.memName) ) {
             memInit(this, null) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/4d23f335/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
index 2b227bc..17d2e25 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
@@ -61,14 +61,6 @@ public class GraphTDB extends GraphView implements Closeable, Sync {
         return getDSG().chooseNodeTupleTable(getGraphName()) ;
     }
 
-    /**
-     * @deprecated Use DatasetGraphTDB.chooseNodeTupleTable
-     */
-    @Deprecated
-    public static NodeTupleTable chooseNodeTupleTable(DatasetGraphTDB dsg, Node graphNode) {
-        return dsg.chooseNodeTupleTable(graphNode) ;
-    }
-
     @Override
     protected PrefixMapping createPrefixMapping() {
         if ( isDefaultGraph() )

http://git-wip-us.apache.org/repos/asf/jena/blob/4d23f335/jena-tdb/src/main/java/org/apache/jena/tdb/sys/TDBMaker.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/TDBMaker.java b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/TDBMaker.java
index 0fb8db5..d3c7c75 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/TDBMaker.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/TDBMaker.java
@@ -72,21 +72,12 @@ public class TDBMaker
     
     /* The one we are using */
     private static DatasetGraphMakerTDB builder = new BuilderStd() ;
-
     
     public static DatasetGraphTDB createDatasetGraphTDB(Location loc, StoreParams params)
     { return builder.createDatasetGraph(loc, params) ; }
 
-    
-    @Deprecated
-    public static DatasetGraphTDB createDatasetGraphTDB(Location loc) {
-        return createDatasetGraphTDB(loc, null) ;
-    }
-    
-    // -- Different ways of doing it.
-    
     /** Interface to maker of the actual implementations of TDB datasets */ 
-    private interface DatasetGraphMakerTDB 
+    private interface DatasetGraphMakerTDB  
     {
         /** Create a TDB-backed dataset at a given location */
         public DatasetGraphTDB createDatasetGraph(Location location, StoreParams params) ;