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/05/21 13:03:46 UTC
[1/3] jena git commit: Remove unused DataServiceDesc
Repository: jena
Updated Branches:
refs/heads/master fa3d1b750 -> d8018ceec
Remove unused DataServiceDesc
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/d54b70df
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/d54b70df
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/d54b70df
Branch: refs/heads/master
Commit: d54b70df62a67f7cbac25310a54a0a82d38ab909
Parents: 36dcea5
Author: Andy Seaborne <an...@apache.org>
Authored: Thu May 21 11:58:43 2015 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Thu May 21 12:01:01 2015 +0100
----------------------------------------------------------------------
.../org/apache/jena/fuseki/build/Builder.java | 4 +-
.../jena/fuseki/build/DataServiceDesc.java | 106 -------------------
2 files changed, 2 insertions(+), 108 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/d54b70df/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Builder.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Builder.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Builder.java
index dbe24de..ec28af6 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Builder.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Builder.java
@@ -73,7 +73,7 @@ public class Builder
throw new FusekiConfigException("No rdf:type for dataset " + nodeLabel(datasetDesc)) ;
Dataset ds = (Dataset)Assembler.general.open(datasetDesc) ;
// In case the assembler included ja:contents
- DataService dataService = new DataService(null, ds.asDatasetGraph()) ;
+ DataService dataService = new DataService(ds.asDatasetGraph()) ;
addServiceEP(dataService, OperationName.Query, svc, "fu:serviceQuery") ;
addServiceEP(dataService, OperationName.Update, svc, "fu:serviceUpdate") ;
addServiceEP(dataService, OperationName.Upload, svc, "fu:serviceUpload") ;
@@ -99,7 +99,7 @@ public class Builder
/** Build a DataService starting at Resource svc */
public static DataService buildDataService(DatasetGraph dsg, boolean allowUpdate) {
- DataService dataService = new DataService(null, dsg) ;
+ DataService dataService = new DataService(dsg) ;
addServiceEP(dataService, OperationName.Query, "query") ;
addServiceEP(dataService, OperationName.Query, "sparql") ;
if ( ! allowUpdate ) {
http://git-wip-us.apache.org/repos/asf/jena/blob/d54b70df/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
deleted file mode 100644
index a18976c..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
+++ /dev/null
@@ -1,106 +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.fuseki.build;
-
-import java.io.StringReader ;
-import java.util.HashMap ;
-import java.util.Map ;
-
-import org.apache.jena.fuseki.FusekiConfigException ;
-import org.apache.jena.fuseki.server.DataService ;
-import org.apache.jena.fuseki.server.FusekiServer ;
-import org.apache.jena.fuseki.server.FusekiVocab ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.rdf.model.ModelFactory ;
-import org.apache.jena.rdf.model.Resource ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.riot.RDFLanguages ;
-import org.apache.jena.sparql.util.FmtUtils ;
-import org.apache.jena.sparql.util.TypeNotUniqueException ;
-import org.apache.jena.sparql.util.graph.GraphUtils ;
-
-// Check whether this is used or needed
-public abstract class DataServiceDesc
-{
- public static DataServiceDesc createFromTemplate(String templateFile, String dbName) {
- Map<String, String> params = new HashMap<>() ;
- params.put(Template.NAME, dbName) ;
- FusekiServer.addGlobals(params);
- String template = TemplateFunctions.templateFile(templateFile, params, Lang.TTL) ;
- Lang lang = RDFLanguages.filenameToLang(templateFile, Lang.TTL) ;
- StringReader sr = new StringReader(template) ;
- return create(sr, lang) ;
- }
-
- public static DataServiceDesc create(StringReader strReader, Lang lang ) {
- Model model = ModelFactory.createDefaultModel() ;
- RDFDataMgr.read(model, strReader, "http://base/", lang) ;
- Resource root ;
- try {
- root = GraphUtils.findRootByType(model, FusekiVocab.fusekiService) ;
- if ( root == null )
- throw new FusekiConfigException("No root of type "
- + FmtUtils.stringForResource(FusekiVocab.fusekiService) + "found") ;
- } catch (TypeNotUniqueException ex) {
- throw new FusekiConfigException("Multiple items of type: " + FusekiVocab.fusekiService) ;
- }
- return new DataServiceDescResource(root) ;
- }
-
- public static DataServiceDesc create(DataService dataService) {
- return new DataServiceDescPrebuilt(dataService) ;
- }
-
- //public abstract Resource getResource() ;
-
- public abstract DataService build() ;
-// public abstract void unbuild() ;
-
-
- private static class DataServiceDescResource extends DataServiceDesc {
- protected Resource resource ;
-
- protected DataServiceDescResource(Resource resource) {
- this.resource = resource ;
- }
-
- public Resource getResource() { return resource ; }
-
- @Override
- public DataService build() {
- return Builder.buildDataService(resource) ;
- }
- }
-
- private static class DataServiceDescPrebuilt extends DataServiceDesc {
-
- private DataService dataService ;
-
- protected DataServiceDescPrebuilt(DataService dataService) {
- this.dataService = dataService ;
- }
-
- @Override
- public DataService build() {
- return dataService ;
- }
- }
-
-}
[2/3] jena git commit: Use keySet for getOperations.
Posted by an...@apache.org.
Use keySet for getOperations.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/9b3aa364
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/9b3aa364
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/9b3aa364
Branch: refs/heads/master
Commit: 9b3aa364b45184932f79b585555b248c08619678
Parents: d54b70d
Author: Andy Seaborne <an...@apache.org>
Authored: Thu May 21 12:00:32 2015 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Thu May 21 12:01:11 2015 +0100
----------------------------------------------------------------------
.../org/apache/jena/fuseki/server/DataService.java | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/9b3aa364/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
index e4b8793..bf341a2 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
@@ -29,7 +29,6 @@ import org.apache.jena.ext.com.google.common.collect.ArrayListMultimap;
import org.apache.jena.ext.com.google.common.collect.ListMultimap;
import org.apache.jena.fuseki.DEF ;
import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.build.DataServiceDesc ;
import org.apache.jena.query.ReadWrite ;
import org.apache.jena.sparql.core.DatasetGraph ;
import org.apache.jena.sparql.core.DatasetGraphFactory ;
@@ -38,24 +37,21 @@ import org.apache.jena.tdb.StoreConnection ;
import org.apache.jena.tdb.transaction.DatasetGraphTransaction ;
public class DataService { //implements DatasetMXBean {
- // XXX Add a "null model assembler".
-
public static DataService serviceOnlyDataService() {
return dummy ;
}
- public static DataService dummy = new DataService(null, null) ;
+ public static DataService dummy = new DataService(null) ;
static {
dummy.dataset = new DatasetGraphReadOnly(DatasetGraphFactory.createMemFixed()) ;
dummy.addEndpoint(OperationName.Query, DEF.ServiceQuery) ;
dummy.addEndpoint(OperationName.Query, DEF.ServiceQueryAlt) ;
}
- private final DataServiceDesc svcDesc ;
private DatasetGraph dataset = null ; // Only valid if active.
- private ListMultimap<OperationName, Endpoint> operations = ArrayListMultimap.create() ;
- private Map<String, Endpoint> endpoints = new HashMap<>() ;
+ private ListMultimap<OperationName, Endpoint> operations = ArrayListMultimap.create() ;
+ private Map<String, Endpoint> endpoints = new HashMap<>() ;
private volatile DatasetStatus state = UNINITIALIZED ;
@@ -65,8 +61,7 @@ public class DataService { //implements DatasetMXBean {
private final AtomicBoolean offlineInProgress = new AtomicBoolean(false) ;
private final AtomicBoolean acceptingRequests = new AtomicBoolean(true) ;
- public DataService(DataServiceDesc desc, DatasetGraph dataset) {
- this.svcDesc = desc ;
+ public DataService(DatasetGraph dataset) {
this.dataset = dataset ;
counters.add(CounterName.Requests) ;
counters.add(CounterName.RequestsGood) ;
@@ -98,7 +93,7 @@ public class DataService { //implements DatasetMXBean {
* @see #getOperation(OperationName) to ge the endpoint list
*/
public Collection<OperationName> getOperations() {
- return operations.keys() ;
+ return operations.keySet() ;
}
//@Override
[3/3] jena git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/jena
Posted by an...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/jena
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/d8018cee
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/d8018cee
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/d8018cee
Branch: refs/heads/master
Commit: d8018ceec5e2b3dc58e1a6912fefe3f801d53387
Parents: 9b3aa36 fa3d1b7
Author: Andy Seaborne <an...@apache.org>
Authored: Thu May 21 12:03:20 2015 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Thu May 21 12:03:20 2015 +0100
----------------------------------------------------------------------
.../hadoop/rdf/io/input/QuadsInputFormat.java | 5 +---
.../hadoop/rdf/io/input/TriplesInputFormat.java | 5 +---
.../rdf/io/input/TriplesOrQuadsInputFormat.java | 5 +---
.../io/input/jsonld/JsonLDQuadInputFormat.java | 5 +---
.../input/jsonld/JsonLDTripleInputFormat.java | 5 +---
.../input/nquads/BlockedNQuadsInputFormat.java | 5 +---
.../rdf/io/input/nquads/NQuadsInputFormat.java | 5 +---
.../nquads/WholeFileNQuadsInputFormat.java | 5 +---
.../ntriples/BlockedNTriplesInputFormat.java | 5 +---
.../io/input/ntriples/NTriplesInputFormat.java | 5 +---
.../ntriples/WholeFileNTriplesInputFormat.java | 5 +---
.../io/input/rdfjson/RdfJsonInputFormat.java | 5 +---
.../rdf/io/input/rdfxml/RdfXmlInputFormat.java | 5 +---
.../AbstractBlockBasedNodeTupleReader.java | 10 ++++----
.../AbstractLineBasedNodeTupleReader.java | 12 +++++-----
.../AbstractWholeFileNodeTupleReader.java | 10 ++++----
.../io/input/thrift/ThriftQuadInputFormat.java | 5 +---
.../input/thrift/ThriftTripleInputFormat.java | 5 +---
.../rdf/io/input/trig/TriGInputFormat.java | 5 +---
.../rdf/io/input/trix/TriXInputFormat.java | 5 +---
.../rdf/io/input/turtle/TurtleInputFormat.java | 5 +---
.../rdf/io/output/AbstractNodeOutputFormat.java | 4 ++--
.../output/AbstractNodeTupleOutputFormat.java | 4 ++--
.../writers/AbstractBatchedNodeTupleWriter.java | 4 ++--
.../AbstractLineBasedNodeTupleWriter.java | 5 ++--
.../io/output/writers/AbstractNodeWriter.java | 5 ++--
.../AbstractStreamRdfNodeTupleWriter.java | 6 ++---
.../AbstractWholeFileNodeTupleWriter.java | 4 ++--
.../registry/readers/JsonLDReaderFactory.java | 6 ++---
.../registry/readers/NQuadsReaderFactory.java | 4 +---
.../registry/readers/NTriplesReaderFactory.java | 3 +--
.../registry/readers/RdfJsonReaderFactory.java | 4 +---
.../registry/readers/RdfXmlReaderFactory.java | 4 +---
.../registry/readers/ThriftReaderFactory.java | 6 ++---
.../io/registry/readers/TriGReaderFactory.java | 4 +---
.../io/registry/readers/TriXReaderFactory.java | 4 +---
.../registry/readers/TurtleReaderFactory.java | 4 +---
.../registry/writers/JsonLDWriterFactory.java | 7 ++----
.../registry/writers/NQuadsWriterFactory.java | 4 +---
.../registry/writers/NTriplesWriterFactory.java | 4 +---
.../registry/writers/RdfJsonWriterFactory.java | 4 +---
.../registry/writers/RdfXmlWriterFactory.java | 4 +---
.../registry/writers/ThriftWriterFactory.java | 7 ++----
.../io/registry/writers/TriGWriterFactory.java | 4 +---
.../io/registry/writers/TriXWriterFactory.java | 4 +---
.../registry/writers/TurtleWriterFactory.java | 4 +---
.../AbstractNodeTupleInputFormatTests.java | 25 +++++++++-----------
.../AbstractWholeFileQuadInputFormatTests.java | 2 +-
.../io/input/bnodes/AbstractBlankNodeTests.java | 2 --
...CompressedWholeFileQuadInputFormatTests.java | 2 +-
.../apache/jena/hadoop/rdf/stats/RdfStats.java | 17 +++++++------
jena-elephas/pom.xml | 2 +-
52 files changed, 92 insertions(+), 193 deletions(-)
----------------------------------------------------------------------