jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/3] jena git commit: Remove functions that use FileManager (which was ignored)
Date Fri, 24 Apr 2015 17:42:13 GMT
Repository: jena
Updated Branches:
  refs/heads/jena3 72fd5768b -> d2afc57c0


Remove functions that use FileManager (which was ignored)

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

Branch: refs/heads/jena3
Commit: 463582a3aeb50244fa30781370d30793bc63f6fc
Parents: 72fd576
Author: Andy Seaborne <andy@apache.org>
Authored: Fri Apr 24 18:12:56 2015 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Fri Apr 24 18:12:56 2015 +0100

----------------------------------------------------------------------
 .../org/apache/jena/query/DatasetFactory.java   | 314 +++++++++----------
 1 file changed, 157 insertions(+), 157 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/463582a3/jena-arq/src/main/java/org/apache/jena/query/DatasetFactory.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/query/DatasetFactory.java b/jena-arq/src/main/java/org/apache/jena/query/DatasetFactory.java
index fd82272..fdd6739 100644
--- a/jena-arq/src/main/java/org/apache/jena/query/DatasetFactory.java
+++ b/jena-arq/src/main/java/org/apache/jena/query/DatasetFactory.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.jena.query;
+package org.apache.jena.query ;
 
 import java.util.List ;
 
@@ -34,235 +34,235 @@ import org.apache.jena.util.FileManager ;
 
 /** Make Datasets and DataSources in various ways */
 
-public class DatasetFactory
-{
+public class DatasetFactory {
     /** Create an in-memory, modifiable Dataset */
-    public static Dataset createMem()       { return create(DatasetGraphFactory.createMem())
; }
-    
-    /** Create an in-memory, modifiable Dataset.
-     * New graphs must be explicitly added using .addGraph.
+    public static Dataset createMem() {
+        return create(DatasetGraphFactory.createMem()) ;
+    }
+
+    /**
+     * Create an in-memory, modifiable Dataset. New graphs must be explicitly
+     * added using .addGraph.
      */
-    public static Dataset createMemFixed()  { return create(DatasetGraphFactory.createMemFixed())
; }
+    public static Dataset createMemFixed() {
+        return create(DatasetGraphFactory.createMemFixed()) ;
+    }
 
-    /** Create an in-memory, modifyable Dataset
-     * @deprecated Use createMem
+    /**
+     * Create a dataset with the given model as the default graph
+     * 
+     * @param model
+     *            The model for the default graph
+     * @return Dataset
      */
-    @Deprecated
-    public static Dataset create()          { return createMem() ; }
-
-    /** Create a dataset with the given model as the default graph
-     * @param model The model for the default graph
-     * @return Dataset 
-     */ 
-    public static Dataset create(Model model)
-    { return new DatasetImpl(model) ; }
-
-    /** Create a dataset: clone the dataset structure of named graohs, and share the graphs
themselves.
-     * @param dataset Dataset to clone structure from.
-     * @return Dataset 
-     */ 
-    public static Dataset create(Dataset dataset)
-    { return new DatasetImpl(dataset) ; }
-
-    /** Wrap a datasetgraph to make a mutable dataset
-     * @param dataset DatasetGraph
-     * @return Dataset 
-     */ 
-    public static Dataset create(DatasetGraph dataset)
-    { return DatasetImpl.wrap(dataset) ; }
-    
-    /** Create a dataset based on a list of URIs : these are merged into the default graph
of the dataset.
+    public static Dataset create(Model model) {
+        return new DatasetImpl(model) ;
+    }
+
+    /**
+     * Create a dataset: clone the dataset structure of named graohs, and share
+     * the graphs themselves.
      * 
-     * @param uriList   URIs merged to form the default dataset 
+     * @param dataset
+     *            Dataset to clone structure from.
      * @return Dataset
      */
-    
-    public static Dataset create(List<String> uriList)
-    { return create(uriList, null, null, null) ; }
-    
-    /** Create a dataset with a default graph and no named graphs
+    public static Dataset create(Dataset dataset) {
+        return new DatasetImpl(dataset) ;
+    }
+
+    /**
+     * Wrap a datasetgraph to make a mutable dataset
      * 
-     * @param uri   URIs merged to form the default dataset 
+     * @param dataset
+     *            DatasetGraph
      * @return Dataset
      */
-    
-    public static Dataset create(String uri)
-    { return create(uri, null, null, null) ; }
+    public static Dataset create(DatasetGraph dataset) {
+        return DatasetImpl.wrap(dataset) ;
+    }
 
-    /** Create a dataset based on a list of URIs : these are merged into the default graph
of the dataset.
+    /**
+     * Create a dataset based on a list of URIs : these are merged into the
+     * default graph of the dataset.
      * 
-     * @param uriList   URIs merged to form the default dataset 
-     * @param fileManager
+     * @param uriList
+     *            URIs merged to form the default dataset
      * @return Dataset
      */
-    
-    public static Dataset create(List<String> uriList, FileManager fileManager)
-    { return create(uriList, null, fileManager, null) ; }
-                                              
-    /** Create a dataset based on a list of URIs : these are merged into the default graph
of the dataset.
+
+    public static Dataset create(List<String> uriList) {
+        return create(uriList, null, null) ;
+    }
+
+    /**
+     * Create a dataset with a default graph and no named graphs
+     * 
+     * @param uri
+     *            URIs merged to form the default dataset
+     * @return Dataset
+     */
+
+    public static Dataset create(String uri) {
+        return create(uri, null, null) ;
+    }
+
+    /**
+     * Create a dataset based on a list of URIs : these are merged into the
+     * default graph of the dataset.
      * 
-     * @param uri              graph to be loaded into the unnamed, default graph
+     * @param uriList
+     *            URIs merged to form the default dataset
      * @param fileManager
      * @return Dataset
      */
-    
-    public static Dataset create(String uri, FileManager fileManager)
-    { return create(uri, null, fileManager, null) ; }
 
-    /** Create a named graph container of graphs based on a list of URIs.
+    /**
+     * Create a named graph container of graphs based on a list of URIs.
      * 
      * @param namedSourceList
-     * @param fileManager
      * @return Dataset
      */
-    
-    public static Dataset createNamed(List<String> namedSourceList, FileManager fileManager)
-    { return create((List<String>)null, namedSourceList, fileManager, null) ; }
-    
-    /** Create a dataset based on two list of URIs.
-     *  The first lists is used to create the background (unnamed graph) by merging, the
-     *  second is used to create the collection of named graphs.
-     *  
-     *  (Jena calls graphs "Models" and triples "Statements")
+
+    public static Dataset createNamed(List<String> namedSourceList) {
+        return create((List<String>)null, namedSourceList, null) ;
+    }
+
+    /**
+     * Create a dataset based on two list of URIs. The first lists is used to
+     * create the background (unnamed graph) by merging, the second is used to
+     * create the collection of named graphs.
+     * 
+     * (Jena calls graphs "Models" and triples "Statements")
      * 
-     * @param uriList          graphs to be loaded into the unnamed, default graph
-     * @param namedSourceList  graphs to be atatched as named graphs
+     * @param uriList
+     *            graphs to be loaded into the unnamed, default graph
+     * @param namedSourceList
+     *            graphs to be atatched as named graphs
      * @return Dataset
      */
-    
-    public static Dataset create(List<String> uriList, List<String> namedSourceList)
-    {
-        return create(uriList, namedSourceList, null, null) ;
+
+    public static Dataset create(List<String> uriList, List<String> namedSourceList)
{
+        return create(uriList, namedSourceList, null) ;
     }
 
-    /** Create a dataset container based on two list of URIs.
-     *  The first is used to create the background (unnamed graph), the
-     *  second is used to create the collection of named graphs.
-     *  
-     *  (Jena calls graphs "Models" and triples "Statements")
+    /**
+     * Create a dataset container based on two list of URIs. The first is used
+     * to create the background (unnamed graph), the second is used to create
+     * the collection of named graphs.
+     * 
+     * (Jena calls graphs "Models" and triples "Statements")
      * 
-     * @param uri              graph to be loaded into the unnamed, default graph
-     * @param namedSourceList  graphs to be attached as named graphs
+     * @param uri
+     *            graph to be loaded into the unnamed, default graph
+     * @param namedSourceList
+     *            graphs to be attached as named graphs
      * @return Dataset
      */
-    
-    public static Dataset create(String uri, List<String> namedSourceList)
-    {
-        return create(uri, namedSourceList, null, null) ;
+
+    public static Dataset create(String uri, List<String> namedSourceList) {
+        return create(uri, namedSourceList, null) ;
     }
 
-    /** Create a named graph container based on two list of URIs.
-     *  The first is used to create the background (unnamed graph), the
-     *  second is used to create the collection of named graphs.
-     *  
-     *  (Jena calls graphs "Models" and triples "Statements")
+    /**
+     * Create a named graph container based on two list of URIs. The first is
+     * used to create the background (unnamed graph), the second is used to
+     * create the collection of named graphs.
      * 
-     * @param uri              graph to be loaded into the unnamed, default graph
-     * @param namedSourceList  graphs to be atatched as named graphs
-     * @param fileManager
-     * @param baseURI          baseURI for relative URI expansion
+     * (Jena calls graphs "Models" and triples "Statements")
+     * 
+     * @param uri
+     *            graph to be loaded into the unnamed, default graph
+     * @param namedSourceList
+     *            graphs to be atatched as named graphs
+     * @param baseURI
+     *            baseURI for relative URI expansion
      * @return Dataset
      */
-    
-    public static Dataset create(String uri, List<String> namedSourceList,
-                                 FileManager fileManager, String baseURI)
-    {
+
+    public static Dataset create(String uri, List<String> namedSourceList, String baseURI)
{
         return DatasetUtils.createDataset(uri, namedSourceList, baseURI) ;
     }
-        
-   
-    /** Create a named graph container based on two list of URIs.
-     *  The first is used to create the background (unnamed graph), the
-     *  second is used to create the collection of named graphs.
-     *  
-     *  (Jena calls graphs "Models" and triples "Statements")
+
+    /**
+     * Create a named graph container based on two list of URIs. The first is
+     * used to create the background (unnamed graph), the second is used to
+     * create the collection of named graphs.
      * 
-     * @param uriList          graphs to be loaded into the unnamed, default graph
-     * @param namedSourceList  graphs to be atatched as named graphs
-     * @param fileManager
-     * @param baseURI          baseURI for relative URI expansion
+     * (Jena calls graphs "Models" and triples "Statements")
+     * 
+     * @param uriList
+     *            graphs to be loaded into the unnamed, default graph
+     * @param namedSourceList
+     *            graphs to be atatched as named graphs
+     * @param baseURI
+     *            baseURI for relative URI expansion
      * @return Dataset
-     * @deprecated FileManager argument has no effect 
      */
-    
-    @Deprecated
-    public static Dataset create(List<String> uriList, List<String> namedSourceList,
-                                 FileManager fileManager, String baseURI)
-    {
+
+    public static Dataset create(List<String> uriList, List<String> namedSourceList,
String baseURI) {
         return DatasetUtils.createDataset(uriList, namedSourceList, baseURI) ;
     }
-    
-//    public static Dataset make(Dataset ds)
-//    {
-//        DataSourceImpl ds2 = new DataSourceImpl(ds) ;
-//        return ds2 ; 
-//    }
-
-//    public static Dataset make(Dataset ds, Graph defaultGraph)
-//    {
-//        DataSourceImpl ds2 = new DataSourceImpl(ds) ;
-//        ds2.setDefaultGraph(defaultGraph) ;
-//        return ds2 ; 
-//    }
-
-    public static Dataset make(Dataset ds, Model defaultModel)
-    {
+
+    public static Dataset make(Dataset ds, Model defaultModel) {
         Dataset ds2 = new DatasetImpl(ds) ;
         ds2.setDefaultModel(defaultModel) ;
-        return ds2 ; 
+        return ds2 ;
     }
-    
+
     // Assembler.
-    /** Assembler a dataset from the model in a file
+    /**
+     * Assembler a dataset from the model in a file
      * 
-     * @param filename      The filename 
+     * @param filename
+     *            The filename
      * @return Dataset
      */
-    public static Dataset assemble(String filename)
-    {
+    public static Dataset assemble(String filename) {
         Model model = FileManager.get().loadModel(filename) ;
         return assemble(model) ;
     }
-    
-    /** Assembler a dataset from the model in a file
+
+    /**
+     * Assembler a dataset from the model in a file
      * 
-     * @param filename      The filename
-     * @param  resourceURI  URI for the dataset to assembler 
+     * @param filename
+     *            The filename
+     * @param resourceURI
+     *            URI for the dataset to assembler
      * @return Dataset
      */
-    public static Dataset assemble(String filename, String resourceURI)
-    {
+    public static Dataset assemble(String filename, String resourceURI) {
         Model model = FileManager.get().loadModel(filename) ;
-        Resource r = model.createResource(resourceURI) ; 
+        Resource r = model.createResource(resourceURI) ;
         return assemble(r) ;
     }
 
-    /** Assembler a dataset from the model
+    /**
+     * Assembler a dataset from the model
      * 
      * @param model
      * @return Dataset
      */
-    public static Dataset assemble(Model model)
-    {
+    public static Dataset assemble(Model model) {
         Resource r = GraphUtils.findRootByType(model, DatasetAssembler.getType()) ;
         if ( r == null )
-            throw new ARQException("No root found for type <"+DatasetAssembler.getType()+">")
;
-        
+            throw new ARQException("No root found for type <" + DatasetAssembler.getType()
+ ">") ;
+
         return assemble(r) ;
     }
-        
-    /** Assembler a dataset from a resource
+
+    /**
+     * Assembler a dataset from a resource
      * 
-     * @param resource  The resource for the dataset
+     * @param resource
+     *            The resource for the dataset
      * @return Dataset
      */
-    
-    public static Dataset assemble(Resource resource)
-    {
+
+    public static Dataset assemble(Resource resource) {
         Dataset ds = (Dataset)Assembler.general.open(resource) ;
         return ds ;
     }
-    
-
 
 }


Mime
View raw message