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 2014/10/23 13:07:48 UTC
[2/5] git commit: Remove dev files
Remove dev files
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/760be423
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/760be423
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/760be423
Branch: refs/heads/master
Commit: 760be4233cb02d2bab9bcdae9bc604f251394e8f
Parents: b5fc5cd
Author: Andy Seaborne <an...@apache.org>
Authored: Thu Oct 23 12:03:38 2014 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Thu Oct 23 12:03:38 2014 +0100
----------------------------------------------------------------------
.../dev/BackwardForwardDescribeFactory.java | 95 -------------------
jena-fuseki2/src-dev/dev/PROJECT.java | 80 ----------------
jena-fuseki2/src-dev/dev/RunAsWebapp.java | 50 ----------
jena-fuseki2/src-dev/dev/RunFuseki2.java | 96 --------------------
4 files changed, 321 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/760be423/jena-fuseki2/src-dev/dev/BackwardForwardDescribeFactory.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src-dev/dev/BackwardForwardDescribeFactory.java b/jena-fuseki2/src-dev/dev/BackwardForwardDescribeFactory.java
deleted file mode 100644
index 2322929..0000000
--- a/jena-fuseki2/src-dev/dev/BackwardForwardDescribeFactory.java
+++ /dev/null
@@ -1,95 +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 dev;
-
-import com.hp.hpl.jena.query.Dataset;
-import com.hp.hpl.jena.rdf.model.Model;
-import com.hp.hpl.jena.rdf.model.ModelFactory;
-import com.hp.hpl.jena.rdf.model.RDFNode;
-import com.hp.hpl.jena.rdf.model.Resource;
-import com.hp.hpl.jena.sparql.ARQConstants;
-import com.hp.hpl.jena.sparql.core.Quad;
-import com.hp.hpl.jena.sparql.core.describe.DescribeHandler;
-import com.hp.hpl.jena.sparql.core.describe.DescribeHandlerFactory;
-import com.hp.hpl.jena.sparql.core.describe.DescribeHandlerRegistry;
-import com.hp.hpl.jena.sparql.util.Context;
-import com.hp.hpl.jena.tdb.TDB ;
-import com.hp.hpl.jena.util.iterator.ExtendedIterator;
-import com.hp.hpl.jena.vocabulary.RDFS;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class BackwardForwardDescribeFactory implements DescribeHandlerFactory {
-
- final static Logger log = LoggerFactory.getLogger(BackwardForwardDescribeFactory.class);
-
- static {
- TDB.init();
- log.info("Attaching replacement describe handler");
- DescribeHandlerRegistry reg = DescribeHandlerRegistry.get();
- log.info("Clearing existing describe handlers");
- reg.clear();
- reg.add(new BackwardForwardDescribeFactory());
- log.info("Attached");
- }
-
- @Override
- public DescribeHandler create() {
- return new BackwardForwardDescribe();
- }
-
- public static class BackwardForwardDescribe implements DescribeHandler {
-
- private Dataset dataset;
- private Model result;
- private Model defaultModel;
- private Model unionModel;
-
- @Override
- public void start(Model accumulateResultModel, Context qContext) {
- this.result = accumulateResultModel;
- this.dataset = (Dataset) qContext.get(ARQConstants.sysCurrentDataset);
- this.defaultModel = dataset.getDefaultModel();
- this.unionModel = dataset.getNamedModel(Quad.unionGraph.getURI());
- }
-
- @Override
- public void describe(Resource resource) {
- result.add(defaultModel.listStatements(resource, null, (RDFNode) null));
- result.add(defaultModel.listStatements(null, null, resource));
- result.add(unionModel.listStatements(resource, null, (RDFNode) null));
- result.add(unionModel.listStatements(null, null, resource));
-
- // Gather labels for dangling refs
- Model labels = ModelFactory.createDefaultModel();
- ExtendedIterator<RDFNode> it = result.listObjects().andThen(result.listSubjects());
- while (it.hasNext()) {
- RDFNode node = it.next();
- if (node.isLiteral() || resource.equals(node)) continue;
- labels.add(defaultModel.listStatements((Resource) node, RDFS.label, (RDFNode) null));
- labels.add(unionModel.listStatements((Resource) node, RDFS.label, (RDFNode) null));
- }
- result.add(labels);
- }
-
- @Override
- public void finish() {
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/760be423/jena-fuseki2/src-dev/dev/PROJECT.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src-dev/dev/PROJECT.java b/jena-fuseki2/src-dev/dev/PROJECT.java
deleted file mode 100644
index ec5b386..0000000
--- a/jena-fuseki2/src-dev/dev/PROJECT.java
+++ /dev/null
@@ -1,80 +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 dev;
-
-public class PROJECT {
-
- // URI parsed during execCommonWorker and again in uber dispatch
- // --> do once. Info in action (context path, dataset name, operation) + admin
-
- // UI "reset" to reread configuration
- // And poll read configuration files.
-
- // Refindable backups
- // Name of backup in the response to back up starting.
- // Task specific return as well?
-
- // Use void for the system DB - drive service description from this.
- // RDF Patch (logging and as mime type)
- // POM changes from jena-fuseki.??
-
- // Convert FmtLog to own logging.
-
- // Use Action(Container)Item for ActionStats
-
- // Assembler file mgt
-
- // Tests for DataServiceDesc and configuration.
- // Other DataServiceDesc
- // -- contains a DS and can't put it down (update/in-memory) (+file)
- // -- TDB various
-
- // --set affects the system DB!
-
- // Backup task + polling
- // Generalize to queries, updates, etc
- // /dataset/operation/1234
- // /dataset/query/1234
-
- // Create dataset - check for existing.
- // Timeouts
- // Check variable names on DataAccessPoint, DataService, Endpoint
- // Per HTTP operation counters
- // Per service timeouts. e.g.
- // Per service context setting e.g. timeouts, tdb:unionDefaultGraph
- // SPARQL_Query.setAnyTimeouts
-
- // Shiro - log failures?
-
- /* Use of:
-<context-param>
- <param-name>org.apache.jena.fuseki.config</param-name>
- <param-value>{webapp}/WEB-INF/app.conf</param-value>
-</context-param>
- */
- // TDB : insert a lock file?
-
- // async operations e.g. backup, stats
-
- // RDF patch
- // /ds/patch service to apply a patch.
- // All TODO and XXX
- // Document (write/update) all protocol modes.
-}
-
http://git-wip-us.apache.org/repos/asf/jena/blob/760be423/jena-fuseki2/src-dev/dev/RunAsWebapp.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src-dev/dev/RunAsWebapp.java b/jena-fuseki2/src-dev/dev/RunAsWebapp.java
deleted file mode 100644
index 586a5e6..0000000
--- a/jena-fuseki2/src-dev/dev/RunAsWebapp.java
+++ /dev/null
@@ -1,50 +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 dev;
-
-import java.nio.file.Paths ;
-
-import org.apache.jena.fuseki.FusekiLogging ;
-import org.apache.jena.fuseki.jetty.JettyFuseki ;
-import org.apache.jena.fuseki.server.FusekiServer ;
-import org.apache.jena.fuseki.server.FusekiServletContextListener ;
-import org.eclipse.jetty.server.Server ;
-
-public class RunAsWebapp
-{
- // See also http://www.eclipse.org/jetty/documentation/current/embedded-examples.html#embedded-one-webapp
- public static void main(String[] args) //throws Exception
- {
- FusekiServer.FUSEKI_HOME = Paths.get("").toAbsolutePath() ;
- FusekiServer.FUSEKI_BASE = Paths.get("run") ;
- FusekiLogging.setLogging() ;
- // No command line.
- FusekiServletContextListener.initialSetup = null ;
- // Create a basic jetty-hosted Fuseki server
- Server server = JettyFuseki.create("/fuseki", 3030) ;
- try {
- server.start();
- server.join();
- } catch (Exception ex) {
- System.out.flush() ;
- ex.printStackTrace(System.err);
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/jena/blob/760be423/jena-fuseki2/src-dev/dev/RunFuseki2.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src-dev/dev/RunFuseki2.java b/jena-fuseki2/src-dev/dev/RunFuseki2.java
deleted file mode 100644
index 86364bc..0000000
--- a/jena-fuseki2/src-dev/dev/RunFuseki2.java
+++ /dev/null
@@ -1,96 +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 dev;
-
-import java.nio.file.Paths ;
-
-import org.apache.jena.fuseki.FusekiCmd ;
-import org.apache.jena.fuseki.server.FusekiServer ;
-
-public class RunFuseki2
-{
- public static void main(String[] args) throws Exception {
- //demo() ;
- //FusekiCmd.main("--config=config.ttl") ; System.exit(0) ;
- main1() ;
- }
-
- public static void demo() {
- String DIR="DemoServer" ;
- FusekiCmd.main("--config="+name(DIR,"config.ttl"), "--pages="+name(DIR, "demo-pages")) ;
- System.exit(0) ;
- }
-
- public static String name(String DIR, String filename) {
- StringBuilder sb = new StringBuilder() ;
- if ( ! filename.startsWith("/") )
- {
- sb.append(DIR) ;
- if ( ! DIR.endsWith("/") )
- sb.append("/") ;
- }
- sb.append(filename) ;
- return sb.toString() ;
- }
-
- private static void main1() {
- FusekiServer.FUSEKI_HOME = Paths.get("").toAbsolutePath() ;
- FusekiServer.FUSEKI_BASE = Paths.get("run") ;
- FusekiServer.init() ;
-
- String tmpdir = System.getenv("TMPDIR") ;
- if ( tmpdir == null )
- tmpdir = System.getenv("TMP") ;
- if ( tmpdir == null )
- tmpdir = System.getenv("HOME")+"/tmp" ;
- if ( ! tmpdir.endsWith("/") )
- tmpdir = tmpdir+"/" ;
-
- FusekiCmd.main(
- // "-v",
- //"--update", "--memtdb", "--mgt", "/ds"
-
- "--strict", "--update", "--mem", "/ds"
-
- //"--update", "--loc="+tmpdir+"DB", "--set=tdb:unionDefaultGraph=true", "/ds"
- //"--update", "--mem", "/ds"
-
- //"--update", "--memtdb", "--set=tdb:unionDefaultGraph=true", "/ds"
-
- //"--debug",
- //"--update",
- //"--timeout=1000,5000",
- //"--set=arq:queryTimeout=1000",
- //"--port=3030",
- //"--mgtPort=3031",
- //"--mem",
- //"--home=/home/afs/Projects/Fuseki",
- //"--loc=DB",
- //"--file=D.nt",
- //"--gzip=no",
- //"--desc=desc.ttl",
- //--pages=
- //"--jetty-config=jetty-fuseki.xml",
- //"--config=config-tdb.ttl"
- // "/ds"
- ) ;
- System.exit(0) ;
- }
-
-}