diff --git a/.classpath b/.classpath index 7086707d5..ff94779e0 100644 --- a/.classpath +++ b/.classpath @@ -70,7 +70,6 @@ - diff --git a/addon/YaCy.app/Contents/Info.plist b/addon/YaCy.app/Contents/Info.plist index d2cb91a5a..a7815a42f 100644 --- a/addon/YaCy.app/Contents/Info.plist +++ b/addon/YaCy.app/Contents/Info.plist @@ -64,8 +64,7 @@ $JAVAROOT/lib/jcifs-1.3.17.jar $JAVAROOT/lib/jcl-over-slf4j-1.7.2.jar $JAVAROOT/lib/jempbox-1.8.3.jar - $JAVAROOT/lib/jena-2.6.4.jar - $JAVAROOT/lib/jetty-client-8.1.14.v20131031.jar + $JAVAROOT/lib/jetty-client-8.1.14.v20131031.jar $JAVAROOT/lib/jetty-continuation-8.1.14.v20131031.jar $JAVAROOT/lib/jetty-http-8.1.14.v20131031.jar $JAVAROOT/lib/jetty-io-8.1.14.v20131031.jar diff --git a/build.xml b/build.xml index 1173e1eea..4512e6b0d 100644 --- a/build.xml +++ b/build.xml @@ -188,7 +188,6 @@ - diff --git a/defaults/yacy.init b/defaults/yacy.init index 8dc36d1f2..ce109aab7 100644 --- a/defaults/yacy.init +++ b/defaults/yacy.init @@ -1143,10 +1143,6 @@ core.service.fulltext = true core.service.rwi.tmp = true core.service.citation.tmp = true core.service.webgraph.tmp = false -core.service.jena.tmp = false - -# RDF triplestore settings -triplestore.persistent = true # Augmentation settings parserAugmentation = false diff --git a/htroot/DictionaryLoader_p.html b/htroot/DictionaryLoader_p.html index 58e868a6b..2a0e2e409 100644 --- a/htroot/DictionaryLoader_p.html +++ b/htroot/DictionaryLoader_p.html @@ -14,51 +14,7 @@ included in the main release of YaCy because they would increase the application file too much. You can download additional files here.

- - -
-
- Persons - Person dictionaries will help YaCy to identify Person names in input documents. As a result, a person Navigator is presented - -

PND (Personennamendatei) identifiers from dbPedia - wikipedia extraction

-

This file provides 150000 person names as an extraction from wikipedia where a PND from the Deutsche Nationalbibliothek is mentioned. It is not the 'raw' PND from d-dnb.de which is much larger but not available in the public.

- -
-
-
#[pnd0URL]#
-
-
#[pnd0Storage]#
-
-
#(pnd0Status)#
not loaded
::
loaded
::deactivated#(/pnd0Status)#
-
Action
-
#(pnd0Status)# - :: - - :: - - - #(/pnd0Status)#
- #(pnd0ActionLoaded)#:: -
Result
loaded and activated dictionary file
:: -
Result
loading of dictionary file failed: #[error]#
- #(/pnd0ActionLoaded)# - #(pnd0ActionRemoved)#:: -
Result
deactivated and removed dictionary file
:: -
Result
cannot remove dictionary file: #[error]#
- #(/pnd0ActionRemoved)# - #(pnd0ActionDeactivated)#:: -
Result
deactivated dictionary file
:: -
Result
cannot deactivate dictionary file: #[error]#
- #(/pnd0ActionDeactivated)# - #(pnd0ActionActivated)#:: -
Result
activated dictionary file
:: -
Result
cannot activate dictionary file: #[error]#
- #(/pnd0ActionActivated)# -
-
-
- +
Geolocalization diff --git a/htroot/DictionaryLoader_p.java b/htroot/DictionaryLoader_p.java index 2749a00b1..7cfbb5a40 100644 --- a/htroot/DictionaryLoader_p.java +++ b/htroot/DictionaryLoader_p.java @@ -275,46 +275,6 @@ public class DictionaryLoader_p { prop.put("drw0ActionActivated", 1); } - // PND0 - if (post.containsKey("pnd0Load")) { - // load from the net - try { - final Response response = sb.loader.load(sb.loader.request(new DigestURL(LibraryProvider.Dictionary.PND0.url), false, true), CacheStrategy.NOCACHE, Integer.MAX_VALUE, null, ClientIdentification.yacyInternetCrawlerAgent); - final byte[] b = response.getContent(); - FileUtils.copy(b, LibraryProvider.Dictionary.PND0.file()); - LibraryProvider.activatePND(); - prop.put("pnd0Status", LibraryProvider.Dictionary.PND0.file().exists() ? 1 : 0); - prop.put("pnd0ActionLoaded", 1); - } catch (final MalformedURLException e) { - ConcurrentLog.logException(e); - prop.put("pnd0ActionLoaded", 2); - prop.put("pnd0ActionLoaded_error", e.getMessage()); - } catch (final IOException e) { - ConcurrentLog.logException(e); - prop.put("pnd0ActionLoaded", 2); - prop.put("pnd0ActionLoaded_error", e.getMessage()); - } - } - - if (post.containsKey("pnd0Remove")) { - LibraryProvider.deactivatePND(); - FileUtils.deletedelete(LibraryProvider.Dictionary.PND0.file()); - FileUtils.deletedelete(LibraryProvider.Dictionary.PND0.fileDisabled()); - prop.put("pnd0ActionRemoved", 1); - } - - if (post.containsKey("pnd0Deactivate")) { - LibraryProvider.deactivatePND(); - LibraryProvider.Dictionary.PND0.file().renameTo(LibraryProvider.Dictionary.PND0.fileDisabled()); - prop.put("pnd0ActionDeactivated", 1); - } - - if (post.containsKey("pnd0Activate")) { - LibraryProvider.Dictionary.PND0.fileDisabled().renameTo(LibraryProvider.Dictionary.PND0.file()); - LibraryProvider.activatePND(); - prop.put("pnd0ActionActivated", 1); - } - // check status again boolean keepPlacesTagging = false; for (final LibraryProvider.Dictionary dictionary: LibraryProvider.Dictionary.values()) { diff --git a/htroot/IndexControlURLs_p.html b/htroot/IndexControlURLs_p.html index 54cfd1ae2..eb6d34ad5 100644 --- a/htroot/IndexControlURLs_p.html +++ b/htroot/IndexControlURLs_p.html @@ -88,13 +88,12 @@ function updatepage(str) {
Index Deletion

#(solr)#::
#(/solr)# #(rwi)#::
#(/rwi)# #(citation)#::
#(/citation)#
-




diff --git a/htroot/IndexControlURLs_p.java b/htroot/IndexControlURLs_p.java index a57cc79fd..732fe6376 100644 --- a/htroot/IndexControlURLs_p.java +++ b/htroot/IndexControlURLs_p.java @@ -40,7 +40,6 @@ import net.yacy.cora.date.GenericFormatter; import net.yacy.cora.document.encoding.ASCII; import net.yacy.cora.document.id.DigestURL; import net.yacy.cora.federate.yacy.CacheStrategy; -import net.yacy.cora.lod.JenaTripleStore; import net.yacy.cora.protocol.ClientIdentification; import net.yacy.cora.protocol.RequestHeader; import net.yacy.cora.sorting.ReversibleScoreMap; @@ -166,9 +165,6 @@ public class IndexControlURLs_p { sb.crawlStacker.clear(); ResultURLs.clearStacks(); } - if ( post.get("deleteTriplestore", "").equals("on") ) { - JenaTripleStore.clear(); - } if ( post.get("deleteCache", "").equals("on") ) { Cache.clear(); } diff --git a/htroot/IndexFederated_p.html b/htroot/IndexFederated_p.html index 2f4c2682c..2039cca15 100644 --- a/htroot/IndexFederated_p.html +++ b/htroot/IndexFederated_p.html @@ -97,24 +97,6 @@
- -
diff --git a/htroot/IndexFederated_p.java b/htroot/IndexFederated_p.java index 51b3d6d10..082800b36 100644 --- a/htroot/IndexFederated_p.java +++ b/htroot/IndexFederated_p.java @@ -73,11 +73,6 @@ public class IndexFederated_p { sb.index.fulltext().setUseWebgraph(webgraph); env.setConfig(SwitchboardConstants.CORE_SERVICE_WEBGRAPH, webgraph); } - - if (post != null && post.containsKey("setjena")) { - boolean jena = post.getBoolean(SwitchboardConstants.CORE_SERVICE_JENA); - env.setConfig(SwitchboardConstants.CORE_SERVICE_JENA, jena); - } if (post != null && post.containsKey("setsolr")) { boolean post_core_fulltext = post.getBoolean(SwitchboardConstants.CORE_SERVICE_FULLTEXT); @@ -179,7 +174,6 @@ public class IndexFederated_p { prop.put(SwitchboardConstants.CORE_SERVICE_RWI + ".checked", env.getConfigBool(SwitchboardConstants.CORE_SERVICE_RWI, false) ? 1 : 0); prop.put(SwitchboardConstants.CORE_SERVICE_CITATION + ".checked", env.getConfigBool(SwitchboardConstants.CORE_SERVICE_CITATION, false) ? 1 : 0); prop.put(SwitchboardConstants.CORE_SERVICE_WEBGRAPH + ".checked", env.getConfigBool(SwitchboardConstants.CORE_SERVICE_WEBGRAPH, false) ? 1 : 0); - prop.put(SwitchboardConstants.CORE_SERVICE_JENA + ".checked", env.getConfigBool(SwitchboardConstants.CORE_SERVICE_JENA, false) ? 1 : 0); prop.put("solr.indexing.solrremote.checked", env.getConfigBool(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_ENABLED, false) ? 1 : 0); prop.put("solr.indexing.url", env.getConfig(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_URL, "http://127.0.0.1:8983/solr").replace(",", "\n")); prop.put("solr.indexing.sharding", env.getConfig(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_SHARDING, "modulo-host-md5")); diff --git a/htroot/Triple_p.csv b/htroot/Triple_p.csv deleted file mode 100644 index f02195fc5..000000000 --- a/htroot/Triple_p.csv +++ /dev/null @@ -1,2 +0,0 @@ -#{entries}##[s]#;#[p]#;#[o]# -#{/entries}# \ No newline at end of file diff --git a/htroot/Triple_p.html b/htroot/Triple_p.html deleted file mode 100644 index b04fa999b..000000000 --- a/htroot/Triple_p.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - YaCy '#[clientname]#': Triplestore - #%env/templates/metas.template%# - - #%env/templates/jqueryheader.template%# - - - - - #%env/templates/header.template%# - #%env/templates/submenuSemantic.template%# - - - #(mode)# -
- -

Search RDF

- - - - - -
- - - - - - -
- - - -
-

or import RDF from local filesystem

-
- - - - - -
-
- - -
-

Query

-
- - - - - -
-
-

- - - #{entries}# - - - #{/entries}# - - - - -
-

Result

- - #[rdfdump]# -
-
- - #{output}##[caption]# - #{/output}# -
- - :: - -

Access denied

-

To edit or create experiment entries you need to be logged in as Administrator.

- - - #(/mode)# - #%env/templates/footer.template%# - - diff --git a/htroot/Triple_p.java b/htroot/Triple_p.java deleted file mode 100644 index aea54eb25..000000000 --- a/htroot/Triple_p.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Triple_p - * Copyright 2012 by Michael Peter Christen, mc@yacy.net, Frankfurt am Main, Germany - * First released 14.09.2011 at http://yacy.net - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program in the file lgpl21.txt - * If not, see . - */ - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.net.MalformedURLException; - -import net.yacy.cora.document.id.DigestURL; -import net.yacy.cora.lod.JenaTripleStore; -import net.yacy.cora.protocol.RequestHeader; -import net.yacy.cora.util.ConcurrentLog; -import net.yacy.server.serverObjects; -import net.yacy.server.serverSwitch; -import net.yacy.server.http.HTTPDemon; - -import com.hp.hpl.jena.query.QueryExecution; -import com.hp.hpl.jena.query.QueryExecutionFactory; -import com.hp.hpl.jena.query.QueryFactory; -import com.hp.hpl.jena.query.QuerySolution; -import com.hp.hpl.jena.query.ResultSet; -import com.hp.hpl.jena.query.ResultSetFormatter; - - -public class Triple_p { - - public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, - final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) { - final serverObjects prop = new serverObjects(); - - prop.put("display", 1); // Fixed to 1 - prop.putHTML("mode_output", "no query performed"); - - String q = "PREFIX lln: \n"+ -"PREFIX rdf: \n"+ -"PREFIX xsd: \n"+ -"SELECT ?resource ?pa\n"+ -"WHERE {\n"+ - "?resource lln:hasvalue ?pa .\n"+ -"FILTER (xsd:float (?pa) > 21.000)\n"+ -"}"; - - if (post != null) { - - if (post.containsKey("submit")) { - // - System.out.println (post.get("submit")); - } - - if (post.containsKey("rdffileslist")) { - - String list = post.get("rdffileslist"); - - for (String s: list.split("\n")) { - String newurl = s; - try { - DigestURL d = new DigestURL (s); - - if (d.getHost().endsWith(".yacy")) { - newurl = d.getProtocol()+"://"+HTTPDemon.getAlternativeResolver().resolve(d.getHost())+d.getPath(); - System.out.println (newurl); - } - JenaTripleStore.load(newurl); - } catch (final MalformedURLException e) { - ConcurrentLog.logException(e); - } catch (final IOException e) { - ConcurrentLog.logException(e); - } - } - - } - - if (post.containsKey("rdffile")) { - - JenaTripleStore.addFile(post.get("rdffile$file")); - } - - if (post.containsKey("query")) { - - // Create a new query - String queryString = post.get("query"); - - q = queryString; - - int count = 0; - - try { - - com.hp.hpl.jena.query.Query query = QueryFactory.create(queryString); - - // Execute the query and obtain results - QueryExecution qe = QueryExecutionFactory.create(query, JenaTripleStore.model); - ResultSet resultSet = qe.execSelect(); - - ByteArrayOutputStream sos = new ByteArrayOutputStream(); - - ResultSetFormatter.outputAsRDF(sos, "", resultSet); - - prop.putHTML("mode_rdfdump", sos.toString()); - - int scount = 0; - while (resultSet.hasNext()) { - QuerySolution s = resultSet.next(); - prop.put("entries_"+scount+"_s", s.getResource(null).getURI()); - prop.put("entries_"+scount+"_p", s.getResource(null).getURI()); - prop.put("entries_"+scount+"_o", s.getResource(null).getURI()); - scount ++; - } - - prop.putHTML("entries", ""+scount); - - for (String s: resultSet.getResultVars()) { - - prop.putHTML("mode_output_"+count+"_caption", s); - count ++; - } - - - } catch (final Exception e) { - prop.putHTML("mode_rdfdump", "error"); - } - - - - prop.putHTML("mode_output", ""+count); - - } - - - } - - prop.putHTML("mode_query", q); - - - // return rewrite properties - return prop; - } - -} diff --git a/htroot/Triplestore_p.html b/htroot/Triplestore_p.html deleted file mode 100644 index 6f8b054d9..000000000 --- a/htroot/Triplestore_p.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - YaCy '#[clientname]#': Triplestore - #%env/templates/metas.template%# - - - -
-API -The information that is presented on this page can also be retrieved as XML -Click the API icon to see the Triplestore. -To see a list of all APIs, please visit the API wiki page. -
- - #%env/templates/header.template%# - #%env/templates/submenuSemantic.template%# -

Triplestore

- -
-
Triplestore -

- With this settings you change the behavior of the jena-based Triplestore. -

- -
- -
Triplestore size:
-
- #[size]# -
- -
-
- Enabled
-

- If enabled, the Triplestore will save its content on shutdown on the filesystem and load it again on startup. -

-
- - - - -
- - - -
-
- - - #%env/templates/footer.template%# - - diff --git a/htroot/Triplestore_p.java b/htroot/Triplestore_p.java deleted file mode 100644 index 1ace02fd1..000000000 --- a/htroot/Triplestore_p.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Triplestore_p - * Copyright 2012 by Michael Peter Christen, mc@yacy.net, Frankfurt am Main, Germany - * First released 14.09.2011 at http://yacy.net - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program in the file lgpl21.txt - * If not, see . - */ - -import net.yacy.cora.lod.JenaTripleStore; -import net.yacy.cora.protocol.RequestHeader; -import net.yacy.server.serverObjects; -import net.yacy.server.serverSwitch; - -public final class Triplestore_p { - - public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, - final serverObjects post, final serverSwitch env) { - // return variable that accumulates replacements - final serverObjects prop = new serverObjects(); - - if (post != null) { - - if (post.containsKey("tsSettings")) { - - env.setConfig("triplestore.persistent", - "on".equals(post.get("tspersistentenabled")) ? true : false); - -// env.setConfig("interaction.feedback.accept", -// "on".equals(post.get("acceptfeedbackenabled")) ? true : false); - - } - - - } - - prop.put("tspersistentenabled_checked", - env.getConfigBool("triplestore.persistent", false) ? "1" : "0"); - -// prop.put("acceptfeedbackenabled_checked", -// env.getConfigBool("interaction.feedback.accept", false) ? "1" : "0"); - prop.put("size", JenaTripleStore.size()); - - // return rewrite properties - return prop; - } - -} diff --git a/htroot/ViewFile.html b/htroot/ViewFile.html index 2442aefd3..fb4402096 100644 --- a/htroot/ViewFile.html +++ b/htroot/ViewFile.html @@ -103,7 +103,6 @@ function updatepage(str) {
Size:
#[size]# Bytes
#(mimeTypeAvailable)#::
MimeType:
#[mimeType]#
#(/mimeTypeAvailable)#
Collections:
#[collections]#
-
Triplestore:
#[triples]#
:
- - - - - diff --git a/htroot/interaction_elements/Tag_part.java b/htroot/interaction_elements/Tag_part.java deleted file mode 100644 index 68a593849..000000000 --- a/htroot/interaction_elements/Tag_part.java +++ /dev/null @@ -1,36 +0,0 @@ -package interaction_elements; - - -import java.util.Collection; - -import net.yacy.cora.lod.vocabulary.Tagging; -import net.yacy.cora.protocol.RequestHeader; -import net.yacy.document.LibraryProvider; -import net.yacy.server.serverObjects; -import net.yacy.server.serverSwitch; - -public class Tag_part { - - public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) { - - final serverObjects prop = new serverObjects(); - - prop.put("hash", post.get("hash", "")); - prop.put("url", post.get("url", "")); - prop.put("action", post.get("action", "")); - - String vocabularies = ""; - - Collection vocs = LibraryProvider.autotagging.getVocabularies(); - - for (Tagging v: vocs) { - vocabularies += v.getName()+","; - } - - vocabularies += "manual"; - - prop.put("vocabularies", vocabularies); - - return prop; - } -} diff --git a/htroot/interaction_elements/document.png b/htroot/interaction_elements/document.png deleted file mode 100644 index f61fec3f6..000000000 Binary files a/htroot/interaction_elements/document.png and /dev/null differ diff --git a/htroot/interaction_elements/interaction.js b/htroot/interaction_elements/interaction.js deleted file mode 100644 index 52cd3d82c..000000000 --- a/htroot/interaction_elements/interaction.js +++ /dev/null @@ -1,202 +0,0 @@ - -function newload (name, div) { - -$.ajaxSetup({async: false}); - -$.get(name, function(data) { -document.getElementById(div).innerHTML = data; -}); - -} - -function xmlToString (xmlData) { - - var xmlString; - - if (window.ActiveXObject) { - xmlString = xmlData.xml; - } - - else { - xmlString = (new XMLSerializer()).serializeToString(xmlData); - } - - return xmlString; - -} - -function rdfload (datastore) { - -$.ajax({ - type : "GET", - url: "/currentyacypeer/interaction/GetRDF.xml?global=true", - dataType: "xml", - success: function(xml) { - datastore.load(xml); - - } - - -}); - - - -} - - -function feedback (url, comment, from) { - - $.getJSON('/currentyacypeer/interaction/Feedback.json?url='+url+'&comment='+comment+'&from='+from, function(data) { - - }); - -} - -function suggest (url) { - - $.getJSON('/currentyacypeer/interaction/Suggest.json?url='+url, function(data) { - - - }); - -} - -function contribution (url, comment, username) { - - $.getJSON('/currentyacypeer/interaction/Contribution.json?url='+url+'&comment='+comment+'&from='+username, function(data) { - - - }); - -} - -function triple (url, s, p, o, username) { - - $.getJSON('/currentyacypeer/interaction/Triple.json?url='+url+'&s='+s+'&p='+p+'&o='+o+'&from='+username, function(data) { - - - }); - -} - -function storevalue_t (s, p, o) { - - $.getJSON('/currentyacypeer/interaction/Table.json?url='+document.location.href+'&s='+s+'&p='+p+'&o='+o, function(data) { - - - }); - -} - -function storevalueglobal_t (s, p, o) { - - $.getJSON('/currentyacypeer/interaction/Table.json?global=true&url='+s+'&s='+s+'&p='+p+'&o='+o, function(data) { - - - }); - -} - -function storevalue (s, p, o) { - - $.getJSON('/currentyacypeer/interaction/Triple.json?url='+document.location.href+'&s='+s+'&p='+p+'&o='+o, function(data) { - - - }); - -} - -function storevalueglobal (s, p, o) { - - $.getJSON('/currentyacypeer/interaction/Triple.json?global=true&url='+document.location.href+'&s='+s+'&p='+p+'&o='+o, function(data) { - - - }); - -} - -function loadvalue (s, p) { - - var res = {result: ""}; - - $.ajaxSetup({async: false}); - - $.getJSON('/currentyacypeer/interaction/Triple.json?s='+s+'&p='+p+'&load=true', function (data) { - - res = data; - - }); - - - return res.result; - -} - -function loadvalue_t (s, p) { - - var res = {result: ""}; - - $.ajaxSetup({async: false}); - - $.getJSON('/currentyacypeer/interaction/Table.json?s='+s+'&p='+p+'&load=true', function (data) { - - res = data; - - }); - - - return res.result; - -} - -function loadvalueglobal_t (s, p) { - - var res = {result: ""}; - - $.ajaxSetup({async: false}); - - $.getJSON('/currentyacypeer/interaction/Table.json?global=true&s='+s+'&p='+p+'&load=true', function (data) { - - res = data; - - }); - - - return res.result; - -} - -function loadvalueglobal (s, p) { - - var res = {result: ""}; - - $.ajaxSetup({async: false}); - - $.getJSON('/currentyacypeer/interaction/Triple.json?global=true&s='+s+'&p='+p+'&load=true', function (data) { - - res = data; - - }); - - - return res.result; - -} - - -function triple_get_prefix (sp, s, pp, p) { - - var res = {result: ""}; - - $.ajaxSetup({async: false}); - - $.getJSON('/currentyacypeer/interaction/Triple.json?sep=true&global=true&sp='+sp+'&s='+s+'&pp='+pp+'&p='+p+'&load=true', function (data) { - - res = data; - - }); - - - return res.result; - -} \ No newline at end of file diff --git a/htroot/interaction_elements/interaction_metadata.js b/htroot/interaction_elements/interaction_metadata.js deleted file mode 100644 index 59b7aab31..000000000 --- a/htroot/interaction_elements/interaction_metadata.js +++ /dev/null @@ -1,21 +0,0 @@ - -function getMetadata (url) { - - - var res = {"item": {"title": "no title"}}; - - $.ajaxSetup({async: false}); - - $.getJSON('/currentyacypeer/api/getpageinfo.json?url='+url, function(data) { - - res = data; - - - }); - - - return res; - - -} - diff --git a/htroot/interaction_elements/login_admin.png b/htroot/interaction_elements/login_admin.png deleted file mode 100644 index f54109ae9..000000000 Binary files a/htroot/interaction_elements/login_admin.png and /dev/null differ diff --git a/htroot/interaction_elements/login_empty.png b/htroot/interaction_elements/login_empty.png deleted file mode 100644 index bcaaeb4f3..000000000 Binary files a/htroot/interaction_elements/login_empty.png and /dev/null differ diff --git a/htroot/interaction_elements/login_user.png b/htroot/interaction_elements/login_user.png deleted file mode 100644 index 770e29c4e..000000000 Binary files a/htroot/interaction_elements/login_user.png and /dev/null differ diff --git a/htroot/interaction_elements/tag.png b/htroot/interaction_elements/tag.png deleted file mode 100644 index 1ff3a8013..000000000 Binary files a/htroot/interaction_elements/tag.png and /dev/null differ diff --git a/lib/jena-2.6.4.jar b/lib/jena-2.6.4.jar deleted file mode 100644 index efc64a94f..000000000 Binary files a/lib/jena-2.6.4.jar and /dev/null differ diff --git a/source/net/yacy/cora/lod/JenaTripleStore.java b/source/net/yacy/cora/lod/JenaTripleStore.java deleted file mode 100644 index a4f93b60f..000000000 --- a/source/net/yacy/cora/lod/JenaTripleStore.java +++ /dev/null @@ -1,332 +0,0 @@ -// Author: DL - -package net.yacy.cora.lod; - -import java.io.BufferedOutputStream; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Iterator; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; - -import net.yacy.cora.document.encoding.UTF8; -import net.yacy.cora.lod.vocabulary.DCTerms; -import net.yacy.cora.lod.vocabulary.Geo; -import net.yacy.cora.lod.vocabulary.HttpHeader; -import net.yacy.cora.lod.vocabulary.Tagging; -import net.yacy.cora.lod.vocabulary.YaCyMetadata; -import net.yacy.cora.util.ConcurrentLog; -import net.yacy.search.Switchboard; - -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.rdf.model.ModelFactory; -import com.hp.hpl.jena.rdf.model.Property; -import com.hp.hpl.jena.rdf.model.RDFNode; -import com.hp.hpl.jena.rdf.model.ResIterator; -import com.hp.hpl.jena.rdf.model.Resource; -import com.hp.hpl.jena.rdf.model.Selector; -import com.hp.hpl.jena.rdf.model.SimpleSelector; -import com.hp.hpl.jena.rdf.model.StmtIterator; -import com.hp.hpl.jena.util.FileManager; - - -public class JenaTripleStore { - - private final static ConcurrentLog log = new ConcurrentLog(JenaTripleStore.class.getName()); - - public static Model model = ModelFactory.createDefaultModel(); - static { - init(model); - - } - private final static void init(Model model) { - model.setNsPrefix(YaCyMetadata.PREFIX, YaCyMetadata.NAMESPACE); - model.setNsPrefix(Tagging.DEFAULT_PREFIX, Tagging.DEFAULT_NAMESPACE); - model.setNsPrefix(HttpHeader.PREFIX, HttpHeader.NAMESPACE); - model.setNsPrefix(Geo.PREFIX, Geo.NAMESPACE); - model.setNsPrefix("pnd", "http://dbpedia.org/ontology/individualisedPnd"); - model.setNsPrefix(DCTerms.PREFIX, DCTerms.NAMESPACE); - } - - public static long size() { - return model.size(); - } - - public static ConcurrentHashMap privatestorage = null; - - public static void load(String filename) throws IOException { - if (filename.endsWith(".nt")) LoadNTriples(filename); - else loadRDF(filename); - } - - private static void loadRDF(String fileNameOrUri) throws IOException { - Model tmp = ModelFactory.createDefaultModel(); - log.info("Loading from " + fileNameOrUri); - InputStream is = FileManager.get().open(fileNameOrUri); - if (is != null) { - // read the RDF/XML file - tmp.read(is, null); - log.info("loaded " + tmp.size() + " triples from " + fileNameOrUri); - model = model.union(tmp); - } else { - throw new IOException("cannot read " + fileNameOrUri); - } - } - - private static void LoadNTriples(String fileNameOrUri) throws IOException { - log.info("Loading N-Triples from " + fileNameOrUri); - InputStream is = FileManager.get().open(fileNameOrUri); - LoadNTriples(is); - } - - public static void LoadNTriples(InputStream is) throws IOException { - Model tmp = ModelFactory.createDefaultModel(); - if (is != null) { - tmp.read(is, null, "N-TRIPLE"); - log.info("loaded " + tmp.size() + " triples"); - model = model.union(tmp); - //model.write(System.out, "TURTLE"); - } else { - throw new IOException("cannot read input stream"); - } - } - - public static void addFile(String rdffile) { - Model tmp = ModelFactory.createDefaultModel(); - try { - InputStream in = new ByteArrayInputStream(UTF8.getBytes(rdffile)); - - // read the RDF/XML file - tmp.read(in, null); - } finally { - model = model.union(tmp); - } - } - - private static void saveFile(String filename) { - saveFile(filename, model); - } - - private static void saveFile(String filename, Model model) { - File f = new File(filename); - File ftmp = new File(filename + "." + System.currentTimeMillis()); - if (model.isEmpty() && !f.exists()) { - // we don't store zero-size models if they did not exist before - log.info("NOT saving triplestore with " + model.size() + " triples to " + filename); - return; - } - log.info("Saving triplestore with " + model.size() + " triples to " + filename); - OutputStream fout; - try { - fout = new BufferedOutputStream(new FileOutputStream(ftmp)); - model.write(fout); - fout.close(); - // if something went wrong until here, the original file is not overwritten - // since we are happy here, we can remove the old file and replace it with the new one - f.delete(); - if (!f.exists()) { - ftmp.renameTo(f); - } - log.info("Saved triplestore with " + model.size() + " triples to " + filename); - } catch (final Exception e) { - log.warn("Saving to " + filename+" failed"); - } - } - - /** - * clear the triplestore - */ - public static void clear() { - model = ModelFactory.createDefaultModel(); - init(model); - } - - /** - * Return a Resource instance with the given URI in this model. - * @param uri - * @return - */ - private static Resource getResource(String uri) { - return model.getResource(uri); - } - - public static void deleteObjects(String subject, String predicate) { - Resource r = subject == null ? null : getResource(subject); - Property pr = model.getProperty(predicate); - JenaTripleStore.model.removeAll(r, pr, (Resource) null); - } - - public static void addTriple(String subject, String predicate, String object, String username) { - if (privatestorage != null && privatestorage.containsKey(username)) { - addTriple (subject, predicate, object, privatestorage.get(username)); - } - } - - public static void addTriple(String subject, String predicate, String object) { - addTriple (subject, predicate, object, model); - } - - private static void addTriple(String subject, String predicate, String object, Model model) { - Resource r = model.getResource(subject); - Property pr = model.getProperty(predicate); - r.addProperty(pr, object); - log.info("ADD " + subject + " - " + predicate + " - " + object); - } - - public static String getObject(final String subject, final String predicate) { - Iterator ni = JenaTripleStore.getObjects(subject, predicate); - String object = ""; - if (ni.hasNext()) object = ni.next().toString(); - log.info("GET " + subject + " - " + predicate + " - " + object); - return object; - } - - public static Iterator getObjects(final String subject, final String predicate) { - final Resource r = subject == null ? null : JenaTripleStore.getResource(subject); - return getObjects(r, predicate); - } - - public static String getPrivateObject(final String subject, final String predicate, final String username) { - Iterator ni = JenaTripleStore.getPrivateObjects(subject, predicate, username); - String object = ""; - if (ni.hasNext()) object = ni.next().toString(); - log.info("GET (" + username + ") " + subject + " - " + predicate + " - " + object); - return object; - } - - private static Iterator getPrivateObjects(final String subject, final String predicate, final String username) { - if (privatestorage != null && privatestorage.containsKey(username)) { - return getObjects(privatestorage.get(username).getResource(subject), predicate, privatestorage.get(username)); - } - return null; - } - - private static Iterator getObjects(final Resource r, final String predicate) { - return getObjects(r, predicate, model); - } - - private static Iterator getObjects(final Resource r, final String predicate, final Model model) { - final Property pr = model.getProperty(predicate); - final StmtIterator iter = model.listStatements(r, pr, (Resource) null); - - return new Iterator() { - @Override - public boolean hasNext() { - return iter.hasNext(); - } - @Override - public RDFNode next() { - return iter.nextStatement().getObject(); - } - @Override - public void remove() { - iter.remove(); - } - }; - } - - public static Iterator getSubjects(final String predicate) { - return getSubjects(predicate, model); - } - - private static Iterator getSubjects(final String predicate, final Model model) { - final Property pr = model.getProperty(predicate); - final ResIterator iter = model.listSubjectsWithProperty(pr); - - return new Iterator() { - @Override - public boolean hasNext() { - return iter.hasNext(); - } - @Override - public Resource next() { - return iter.nextResource(); - } - @Override - public void remove() { - iter.remove(); - } - }; - } - - public static Model getSubmodelBySubject(String subject) { - Selector q = new SimpleSelector(model.getResource(subject), (Property) null, (RDFNode) null); - final Model m = model.query(q); - m.setNsPrefix(Tagging.DEFAULT_PREFIX, Tagging.DEFAULT_NAMESPACE); - m.setNsPrefix(DCTerms.PREFIX, DCTerms.NAMESPACE); - return m; - } - - public static String getRDFByModel(Model model) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - model.write(baos, "RDF/XML-ABBREV"); - return UTF8.String(baos.toByteArray()); - } - - public static void initPrivateStores() { - Switchboard switchboard = Switchboard.getSwitchboard(); - log.info("Init private stores"); - if (privatestorage == null) privatestorage = new ConcurrentHashMap(); - if (privatestorage != null) privatestorage.clear(); - - try { - Iterator it = switchboard.userDB.iterator(true); - while (it.hasNext()) { - net.yacy.data.UserDB.Entry e = it.next(); - String username = e.getUserName(); - File triplestore = new File(switchboard.getConfig("triplestore", new File(switchboard.getDataPath(), "DATA/TRIPLESTORE").getAbsolutePath())); - File currentuserfile = new File(triplestore, "private_store_"+username+".rdf"); - log.info("Init " + username + " from "+currentuserfile.getAbsolutePath()); - Model tmp = ModelFactory.createDefaultModel(); - init (tmp); - - if (currentuserfile.exists()) { - log.info("Loading from " + currentuserfile.getAbsolutePath()); - InputStream is = FileManager.get().open(currentuserfile.getAbsolutePath()); - if (is != null) { - // read the RDF/XML file - tmp.read(is, null); - log.info("loaded " + tmp.size() + " triples from " + currentuserfile.getAbsolutePath()); - } else { - throw new IOException("cannot read " + currentuserfile.getAbsolutePath()); - } - } - - if (tmp != null) { - privatestorage.put(username, tmp); - } - } - } catch (final Exception anyex) { - log.warn(anyex); - } - } - - private static void savePrivateStores() { - Switchboard switchboard = Switchboard.getSwitchboard(); - log.info("Saving user triplestores"); - if (privatestorage == null) return; - for (Entry s : privatestorage.entrySet()) { - File triplestore = new File(switchboard.getConfig("triplestore", new File(switchboard.getDataPath(), "DATA/TRIPLESTORE").getAbsolutePath())); - File currentuserfile = new File(triplestore, "private_store_"+s.getKey()+".rdf"); - saveFile (currentuserfile.getAbsolutePath(), s.getValue()); - } - } - - private static long lastModelSizeStored = -1; - - public static void saveAll() { - Switchboard sb = Switchboard.getSwitchboard(); - File triplestore = new File(sb.getConfig("triplestore", new File(sb.dataPath, "DATA/TRIPLESTORE").getAbsolutePath())); - if (model.size() != lastModelSizeStored){ - JenaTripleStore.saveFile(new File(triplestore, "local.rdf").getAbsolutePath()); - lastModelSizeStored = model.size(); - } - JenaTripleStore.savePrivateStores(); - } - -} diff --git a/source/net/yacy/data/ymark/YMarkRDF.java b/source/net/yacy/data/ymark/YMarkRDF.java deleted file mode 100644 index 95b4371e4..000000000 --- a/source/net/yacy/data/ymark/YMarkRDF.java +++ /dev/null @@ -1,161 +0,0 @@ -package net.yacy.data.ymark; - -import java.io.ByteArrayOutputStream; -import java.io.UnsupportedEncodingException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import net.yacy.cora.document.encoding.UTF8; -import net.yacy.cora.lod.vocabulary.AnnoteaA; -import net.yacy.cora.lod.vocabulary.AnnoteaB; -import net.yacy.cora.lod.vocabulary.DCElements; -import net.yacy.cora.lod.vocabulary.Rdf; -import net.yacy.kelondro.blob.Tables; - -import com.hp.hpl.jena.rdf.model.Bag; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.rdf.model.ModelFactory; -import com.hp.hpl.jena.rdf.model.Property; -import com.hp.hpl.jena.rdf.model.Resource; - -public class YMarkRDF { - - public final Model model; - - public final static String USER = "USER"; - public final static String TYPE = "TYPE"; - public final static String SUBTOPIC = "SUBTOPIC"; - - private final Map property; - - public final static String BOOKMARK = "/YMarks.rdf?id="; - private final StringBuilder resourceURI; - private final int len; - - public YMarkRDF(final String peerURI) { - this.model = ModelFactory.createDefaultModel(); - this.property = new HashMap(); - - this.len = peerURI.length()+BOOKMARK.length(); - this.resourceURI = new StringBuilder(len+20); - this.resourceURI.append(peerURI); - this.resourceURI.append(BOOKMARK); - - model.setNsPrefix(Rdf.PREFIX, Rdf.IDENTIFIER); - model.setNsPrefix(DCElements.PREFIX, DCElements.IDENTIFIER); - model.setNsPrefix(AnnoteaA.PREFIX, AnnoteaA.NAMESPACE); - model.setNsPrefix(AnnoteaB.PREFIX, AnnoteaB.NAMESPACE); - - this.property.put(YMarkEntry.BOOKMARK.URL.key(), this.model.createProperty(AnnoteaB.recalls.getNamespace(), AnnoteaB.recalls.name())); - this.property.put(YMarkEntry.BOOKMARK.FOLDERS.key(), this.model.createProperty(AnnoteaB.hasTopic.getNamespace(), AnnoteaB.hasTopic.name())); - this.property.put(YMarkEntry.BOOKMARK.TITLE.key(), this.model.createProperty(DCElements.title.getNamespace(), DCElements.title.name())); - this.property.put(YMarkEntry.BOOKMARK.DESC.key(), this.model.createProperty(DCElements.description.getNamespace(), DCElements.description.name())); - this.property.put(YMarkEntry.BOOKMARK.DATE_ADDED.key(), this.model.createProperty(AnnoteaA.created.getNamespace(), AnnoteaA.created.name())); - this.property.put(YMarkEntry.BOOKMARK.DATE_MODIFIED.key(), this.model.createProperty(DCElements.date.getNamespace(), DCElements.date.name())); - this.property.put(YMarkEntry.BOOKMARK.TAGS.key(), this.model.createProperty(DCElements.subject.getNamespace(), DCElements.subject.name())); - - this.property.put(USER, this.model.createProperty(DCElements.creator.getNamespace(), DCElements.creator.name())); - this.property.put(TYPE, this.model.createProperty(Rdf.type.getNamespace(), Rdf.type.name())); - this.property.put(SUBTOPIC, this.model.createProperty(AnnoteaB.subTopicOf.getNamespace(), AnnoteaB.subTopicOf.name())); - } - - /** - * @param format {RDF/XML, RDF/XML-ABBREV, N-TRIPLE, N3, N3-PP, N3-PLAIN, N3-TRIPLE, TURTLE} - * @return RDF - */ - public String getRDF(final String format) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - this.model.write(baos, format); - try { - return baos.toString("UTF-8"); - } catch (final UnsupportedEncodingException e) { - return new String(); - } - } - - public void addTopic(final String bmk_user, final String folder) { - this.resourceURI.append(bmk_user); - this.resourceURI.append(":f:"); - this.resourceURI.append(UTF8.String(YMarkUtil.getKeyId(folder))); - final Resource topic = this.model.createResource(this.resourceURI.toString()); - this.resourceURI.setLength(this.len); - - topic.addProperty(this.property.get(YMarkEntry.BOOKMARK.DATE_MODIFIED.key()), YMarkUtil.EMPTY_STRING); - topic.addProperty(this.property.get(YMarkEntry.BOOKMARK.DATE_ADDED.key()), YMarkUtil.EMPTY_STRING); - topic.addProperty(this.property.get(USER), bmk_user); - topic.addProperty(this.property.get(YMarkEntry.BOOKMARK.DESC.key()), YMarkUtil.EMPTY_STRING); - final int i = folder.lastIndexOf(YMarkUtil.FOLDERS_SEPARATOR); - if(i>0) - topic.addProperty(this.property.get(SUBTOPIC), folder.substring(0, i)); - topic.addProperty(this.property.get(YMarkEntry.BOOKMARK.TITLE.key()), folder); - topic.addProperty(this.property.get(TYPE), AnnoteaB.Topic.getPredicate()); - } - - public void addBookmark (final String bmk_user, final Tables.Row bmk_row) { - if(bmk_row == null || bmk_row.get(YMarkEntry.BOOKMARK.PUBLIC.key(), YMarkEntry.BOOKMARK.PUBLIC.deflt()).equals("false")) - return; - // create an annotea bookmark resource - this.resourceURI.append(bmk_user); - this.resourceURI.append(":b:"); - this.resourceURI.append(UTF8.String(bmk_row.getPK())); - final Resource bmk = this.model.createResource(this.resourceURI.toString()); - this.resourceURI.setLength(this.len); - - // add properties - bmk.addProperty(this.property.get(USER), bmk_user); - for (final YMarkEntry.BOOKMARK b : YMarkEntry.BOOKMARK.values()) { - switch(b) { - case FOLDERS: - final String[] folders = bmk_row.get(b.key(), b.deflt()).split(b.seperator()); - if(folders.length > 1) { - Bag topics = this.model.createBag(); - for(String folder : folders) { - topics.add(folder); - this.addTopic(bmk_user, folder); - } - bmk.addProperty(this.property.get(b.key()), topics); - } else { - bmk.addProperty(this.property.get(b.key()), folders[0]); - this.addTopic(bmk_user, folders[0]); - } - break; - case TAGS: - final String[] tags = bmk_row.get(b.key(), b.deflt()).split(b.seperator()); - if(tags.length > 1) { - Bag subjects = this.model.createBag(); - for(String tag : tags) { - subjects.add(tag); - } - bmk.addProperty(this.property.get(b.key()), subjects); - } else { - bmk.addProperty(this.property.get(b.key()), tags[0]); - } - break; - - case DATE_ADDED: - case DATE_MODIFIED: - final YMarkDate date = new YMarkDate(bmk_row.get(b.key())); - bmk.addProperty(this.property.get(b.key()), date.toISO8601()); - break; - // these cases are inserted for better readable RDF output - case DESC: - case URL: - case TITLE: - bmk.addProperty(this.property.get(b.key()), bmk_row.get(b.key(), b.deflt())); - break; - default: - if(this.property.containsKey(b.key())) { - bmk.addProperty(this.property.get(b.key()), bmk_row.get(b.key(), b.deflt())); - } - } - } - bmk.addProperty(this.property.get(TYPE), AnnoteaB.Bookmark.getPredicate()); - } - - public void addBookmarks(final String bmk_user, final Iterator riter) { - while(riter.hasNext()) { - this.addBookmark(bmk_user, riter.next()); - } - } -} diff --git a/source/net/yacy/document/LibraryProvider.java b/source/net/yacy/document/LibraryProvider.java index 70dfecfdc..668076279 100644 --- a/source/net/yacy/document/LibraryProvider.java +++ b/source/net/yacy/document/LibraryProvider.java @@ -32,11 +32,8 @@ import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.MalformedURLException; import java.util.ArrayList; -import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; import java.util.List; -import java.util.Map; import java.util.Set; import java.util.TreeSet; import java.util.zip.ZipException; @@ -49,16 +46,10 @@ import net.yacy.cora.geo.OpenGeoDBLocation; import net.yacy.cora.geo.OverarchingLocation; import net.yacy.cora.language.synonyms.AutotaggingLibrary; import net.yacy.cora.language.synonyms.SynonymLibrary; -import net.yacy.cora.lod.JenaTripleStore; -import net.yacy.cora.lod.vocabulary.Tagging; -import net.yacy.cora.lod.vocabulary.Tagging.SOTuple; -import net.yacy.cora.storage.Files; import net.yacy.cora.util.ConcurrentLog; import net.yacy.crawler.retrieval.URLRewriterLibrary; import net.yacy.kelondro.util.FileUtils; -import com.hp.hpl.jena.rdf.model.Resource; - public class LibraryProvider { public static final String path_to_source_dictionaries = "source"; @@ -132,7 +123,6 @@ public class LibraryProvider { integrateGeonames0(-1); integrateGeonames1(-1); integrateGeonames2(100000); - activatePND(); Set allTags = new HashSet() ; allTags.addAll(autotagging.allTags()); // we must copy this into a clone to prevent circularity autotagging.addPlaces(geoLoc); @@ -232,60 +222,6 @@ public class LibraryProvider { FileUtils.deletedelete(derewoOutput); } - public static void activatePND() { - // translate input files (once..) - final File dymDict = new File(dictRoot, path_to_did_you_mean_dictionaries); - if ( !dymDict.exists() ) { - dymDict.mkdirs(); - } - // read the pnd file and store it into the triplestore - final File dictInput = LibraryProvider.Dictionary.PND0.file(); - if ( dictInput.exists() ) { - try { - JenaTripleStore.LoadNTriples(Files.read(dictInput)); - } catch (final IOException e ) { - ConcurrentLog.logException(e); - } - } - // read the triplestore and generate a vocabulary - Map map = new HashMap(); - ConcurrentLog.info("LibraryProvider", "retrieving PND data from triplestore"); - Iterator i = JenaTripleStore.getSubjects("http://dbpedia.org/ontology/individualisedPnd"); - ConcurrentLog.info("LibraryProvider", "creating vocabulary map from PND triplestore"); - String objectspace = ""; - while (i.hasNext()) { - Resource resource = i.next(); - String subject = resource.toString(); - - // prepare a proper term from the subject uri - int p = subject.lastIndexOf('/'); - if (p < 0) continue; - String term = subject.substring(p + 1); - objectspace = subject.substring(0, p + 1); - p = term.indexOf('('); - if (p >= 0) term = term.substring(0, p); - term = term.replaceAll("_", " ").trim(); - if (term.isEmpty()) continue; - if (term.indexOf(' ') < 0) continue; // accept only names that have at least two parts - - // store the term into the vocabulary map - map.put(term, new SOTuple(Tagging.normalizeTerm(term), subject)); - } - if (!map.isEmpty()) try { - ConcurrentLog.info("LibraryProvider", "adding vocabulary to autotagging"); - Tagging pndVoc = new Tagging("Persons", null, objectspace, map); - autotagging.addVocabulary(pndVoc); - ConcurrentLog.info("LibraryProvider", "added pnd vocabulary to autotagging"); - } catch (final IOException e) { - } - } - - public static void deactivatePND() { - // remove the PND Triples from the triplestore - JenaTripleStore.deleteObjects(null, "http://dbpedia.org/ontology/individualisedPnd"); - autotagging.deleteVocabulary("Persons"); - } - /* private static ArrayList loadList(final File file, String comment, boolean toLowerCase) { final ArrayList list = new ArrayList(); diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index 45292f4b6..2d3c8f4e9 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -104,7 +104,6 @@ import net.yacy.cora.federate.solr.Ranking; import net.yacy.cora.federate.solr.SchemaConfiguration; import net.yacy.cora.federate.solr.instance.RemoteInstance; import net.yacy.cora.federate.yacy.CacheStrategy; -import net.yacy.cora.lod.JenaTripleStore; import net.yacy.cora.order.Base64Order; import net.yacy.cora.order.Digest; import net.yacy.cora.order.NaturalOrder; @@ -734,9 +733,6 @@ public final class Switchboard extends serverSwitch { ConcurrentLog.logException(e); } - // init user triplestores - JenaTripleStore.initPrivateStores(); - // init html parser evaluation scheme File parserPropertiesPath = new File("defaults/"); String[] settingsList = parserPropertiesPath.list(); @@ -2299,11 +2295,6 @@ public final class Switchboard extends serverSwitch { && this.peers.mySeed().getFlagAcceptRemoteIndex() ) { this.tables.cleanFailURLS(getConfigLong("cleanup.failedSearchURLtimeout", -1)); } - - // periodically store the triple store - if (getConfigBool("triplestore.persistent", false)) { - JenaTripleStore.saveAll(); - } // clean up profiles checkInterruption(); diff --git a/source/net/yacy/search/SwitchboardConstants.java b/source/net/yacy/search/SwitchboardConstants.java index 28b5f2ec5..c9a47347b 100644 --- a/source/net/yacy/search/SwitchboardConstants.java +++ b/source/net/yacy/search/SwitchboardConstants.java @@ -322,13 +322,10 @@ public final class SwitchboardConstants { public static final String FEDERATED_SERVICE_SOLR_INDEXING_TIMEOUT = "federated.service.solr.indexing.timeout"; public static final String FEDERATED_SERVICE_SOLR_INDEXING_WRITEENABLED = "federated.service.solr.indexing.writeEnabled"; - //public static final String CORE_SERVICE_URLDB = "core.service.urldb.tmp"; - //public static final String CORE_SERVICE_SOLR = "core.service.solr.tmp"; public static final String CORE_SERVICE_FULLTEXT = "core.service.fulltext"; public static final String CORE_SERVICE_RWI = "core.service.rwi.tmp"; public static final String CORE_SERVICE_CITATION = "core.service.citation.tmp"; public static final String CORE_SERVICE_WEBGRAPH = "core.service.webgraph.tmp"; - public static final String CORE_SERVICE_JENA = "core.service.jena.tmp"; /** *

public static final String CRAWLER_THREADS_ACTIVE_MAX = "crawler.MaxActiveThreads"

diff --git a/source/net/yacy/yacy.java b/source/net/yacy/yacy.java index 6d7dc12d3..e55af3fdf 100644 --- a/source/net/yacy/yacy.java +++ b/source/net/yacy/yacy.java @@ -42,7 +42,6 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.ExecutionException; import net.yacy.cora.date.GenericFormatter; -import net.yacy.cora.lod.JenaTripleStore; import net.yacy.cora.protocol.ClientIdentification; import net.yacy.cora.protocol.RequestHeader; import net.yacy.cora.protocol.TimeoutRequest; @@ -286,29 +285,6 @@ public final class yacy { // set user-agent HTTPClient.setDefaultUserAgent(ClientIdentification.yacyInternetCrawlerAgent.userAgent); - // initial fill of the triplestore - File triplestore = new File(sb.getConfig("triplestore", new File(dataHome, "DATA/TRIPLESTORE").getAbsolutePath())); - mkdirIfNeseccary(triplestore); - for (String s: triplestore.list()) { - if ((s.endsWith(".rdf") || s.endsWith(".nt")) && !s.equals("local.rdf") && !s.endsWith("_triplestore.rdf") && !s.startsWith("private_store_")) { - try { - JenaTripleStore.load(new File(triplestore, s).getAbsolutePath()); - } catch (final IOException e) { - ConcurrentLog.logException(e); - } - } - } - if (sb.getConfigBool("triplestore.persistent", false)) { - File local = new File(triplestore, "local.rdf"); - if (local.exists()) { - try { - JenaTripleStore.load(local.getAbsolutePath()); - } catch (final IOException e) { - ConcurrentLog.logException(e); - } - } - } - // start main threads final int port = sb.getConfigInt("port", 8090); try { @@ -400,11 +376,6 @@ public final class yacy { } finally { } - // save the triple store - if (sb.getConfigBool("triplestore.persistent", false)) { - JenaTripleStore.saveAll(); - } - ConcurrentLog.config("SHUTDOWN", "goodbye. (this is the last line)"); ConcurrentLog.shutdown(); shutdownSemaphore.release(1000);