Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
moved all servlets from htroot/xml to htroot/api the file server contains a patch that temporary matches all xml paths to api, that means all interfaces still work. Please adopt all your interfaces to the new path.
orbiterb423d0a03677
diff --git a/.classpath b/.classpathindex 5f581035a..c8ae866ba 100644--- a/.classpath+++ b/.classpath@@ -1,11 +1,16 @@<?xml version="1.0" encoding="UTF-8"?><classpath>- <classpathentry excluding="env/|htdocsdefault/|proxymsg/|yacy/|env/|yacy/user/|yacy/user/|yacy/ui/|processing/domaingraph/applet/|processing/domaingraph/|api/" kind="src" path="htroot"/>+ <classpathentry excluding="env/|htdocsdefault/|proxymsg/|yacy/|env/|yacy/user/|yacy/user/|yacy/ui/|processing/domaingraph/applet/|processing/domaingraph/|api/|api/bookmarks/posts/|api/bookmarks/|api/util/|api/bookmarks/xbel/|api/bookmarks/tags/" kind="src" path="htroot"/><classpathentry excluding="user/|user/|ui/" kind="src" path="htroot/yacy"/><classpathentry kind="src" path="htroot/env"/><classpathentry kind="src" path="source"/><classpathentry kind="src" path="htroot/yacy/ui"/>- <classpathentry kind="src" path="htroot/api"/>+ <classpathentry excluding="bookmarks/posts/|bookmarks/|util/|bookmarks/xbel/|bookmarks/tags/" kind="src" path="htroot/api"/>+ <classpathentry kind="src" path="htroot/api/bookmarks/posts"/>+ <classpathentry excluding="posts/|xbel/|tags/" kind="src" path="htroot/api/bookmarks"/>+ <classpathentry kind="src" path="htroot/api/util"/>+ <classpathentry kind="src" path="htroot/api/bookmarks/xbel"/>+ <classpathentry kind="src" path="htroot/api/bookmarks/tags"/><classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/><classpathentry kind="lib" path="lib/tar.jar"/><classpathentry kind="lib" path="libx/bzip2.jar"/>diff --git a/htroot/WatchCrawler_p.java b/htroot/WatchCrawler_p.javaindex 804b9de0c..612e5a1d8 100644--- a/htroot/WatchCrawler_p.java+++ b/htroot/WatchCrawler_p.java@@ -36,7 +36,6 @@ import java.util.Set;import java.util.regex.Pattern;import java.util.regex.PatternSyntaxException;-import xml.queues_p;import de.anomic.crawler.CrawlEntry;import de.anomic.crawler.CrawlProfile;import de.anomic.crawler.SitemapImporter;diff --git a/htroot/xml/blacklists.java b/htroot/api/blacklists.javasimilarity index 69%rename from htroot/xml/blacklists.javarename to htroot/api/blacklists.javaindex d0d924266..c56f76c76 100644--- a/htroot/xml/blacklists.java+++ b/htroot/api/blacklists.java@@ -1,24 +1,4 @@-// /xml/blacklists.java-// --------------------------------// based on /xml/blacklists_p.java (C) 2006 Alexander Schier, changes by Marc Nause-// part of YaCy-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US--package xml;import java.io.File;import java.util.List;diff --git a/htroot/xml/blacklists.xml b/htroot/api/blacklists.xmlsimilarity index 100%rename from htroot/xml/blacklists.xmlrename to htroot/api/blacklists.xmldiff --git a/htroot/xml/blacklists_p.java b/htroot/api/blacklists_p.javasimilarity index 76%rename from htroot/xml/blacklists_p.javarename to htroot/api/blacklists_p.javaindex 937c1d1a1..7ad23a615 100644--- a/htroot/xml/blacklists_p.java+++ b/htroot/api/blacklists_p.java@@ -1,24 +1,4 @@-// /xml/blacklists_p.java-// --------------------------------// (C) 2006 Alexander Schier, changes by Marc Nause-// part of YaCy-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US--package xml;import java.io.File;import java.util.List;diff --git a/htroot/xml/blacklists_p.xml b/htroot/api/blacklists_p.xmlsimilarity index 100%rename from htroot/xml/blacklists_p.xmlrename to htroot/api/blacklists_p.xmldiff --git a/htroot/xml/bookmarks/get_bookmarks.java b/htroot/api/bookmarks/get_bookmarks.javasimilarity index 92%rename from htroot/xml/bookmarks/get_bookmarks.javarename to htroot/api/bookmarks/get_bookmarks.javaindex 47cf9cbce..8774a75eb 100644--- a/htroot/xml/bookmarks/get_bookmarks.java+++ b/htroot/api/bookmarks/get_bookmarks.java@@ -1,23 +1,4 @@-// /xml/bookmarks/get_bookmarks.java-// --------------------------------// (C) 2009 Stefan Förster (apfelmaennchen)-// part of yacy-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA-package xml.bookmarks;import java.util.Date;import java.util.Iterator;diff --git a/htroot/xml/bookmarks/get_bookmarks.json b/htroot/api/bookmarks/get_bookmarks.jsonsimilarity index 100%rename from htroot/xml/bookmarks/get_bookmarks.jsonrename to htroot/api/bookmarks/get_bookmarks.jsondiff --git a/htroot/xml/bookmarks/get_bookmarks.xml b/htroot/api/bookmarks/get_bookmarks.xmlsimilarity index 100%rename from htroot/xml/bookmarks/get_bookmarks.xmlrename to htroot/api/bookmarks/get_bookmarks.xmldiff --git a/htroot/xml/bookmarks/posts/add_p.java b/htroot/api/bookmarks/posts/add_p.javaold mode 100644new mode 100755similarity index 74%rename from htroot/xml/bookmarks/posts/add_p.javarename to htroot/api/bookmarks/posts/add_p.javaindex c5e5aeea6..e23c49e55--- a/htroot/xml/bookmarks/posts/add_p.java+++ b/htroot/api/bookmarks/posts/add_p.java@@ -1,28 +1,4 @@-// /xml/bookmarks/posts/add_p.java-// --------------------------------// part of the AnomicHTTPD caching proxy-// (C) by Michael Peter Christen; [email protected]-// first published on http://www.anomic.de-// Frankfurt, Germany, 2004, 2005-//-// last major change: 16.09.2008-// this file is contributed by Stefan Förster-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA-package xml.bookmarks.posts;import java.util.HashMap;import java.util.Set;diff --git a/htroot/xml/bookmarks/posts/add_p.xml b/htroot/api/bookmarks/posts/add_p.xmlsimilarity index 100%rename from htroot/xml/bookmarks/posts/add_p.xmlrename to htroot/api/bookmarks/posts/add_p.xmldiff --git a/htroot/xml/bookmarks/posts/all.java b/htroot/api/bookmarks/posts/all.javaold mode 100644new mode 100755similarity index 65%rename from htroot/xml/bookmarks/posts/all.javarename to htroot/api/bookmarks/posts/all.javaindex 6985111a7..d85ee1fcc--- a/htroot/xml/bookmarks/posts/all.java+++ b/htroot/api/bookmarks/posts/all.java@@ -1,31 +1,4 @@-// /xml/bookmarks/posts/all.java-// --------------------------------// part of the AnomicHTTPD caching proxy-// (C) by Michael Peter Christen; [email protected]-// first published on http://www.anomic.de-// Frankfurt, Germany, 2004, 2005-//-// last major change: 27.12.2005-// this file is contributed by Alexander Schier-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA-// You must compile this file with-// javac -classpath .:../classes IndexCreate_p.java-// if the shell's current path is HTROOT-package xml.bookmarks.posts;import java.util.Date;import java.util.Iterator;diff --git a/htroot/xml/bookmarks/posts/all.xml b/htroot/api/bookmarks/posts/all.xmlsimilarity index 100%rename from htroot/xml/bookmarks/posts/all.xmlrename to htroot/api/bookmarks/posts/all.xmldiff --git a/htroot/xml/bookmarks/posts/delete_p.java b/htroot/api/bookmarks/posts/delete_p.javaold mode 100644new mode 100755similarity index 59%rename from htroot/xml/bookmarks/posts/delete_p.javarename to htroot/api/bookmarks/posts/delete_p.javaindex 284df2091..5241ee859--- a/htroot/xml/bookmarks/posts/delete_p.java+++ b/htroot/api/bookmarks/posts/delete_p.java@@ -1,28 +1,4 @@-// /xml/bookmarks/posts/delete_p.java-// --------------------------------// part of the AnomicHTTPD caching proxy-// (C) by Michael Peter Christen; [email protected]-// first published on http://www.anomic.de-// Frankfurt, Germany, 2004, 2005-//-// last major change: 05.02.2006-// this file is contributed by Alexander Schier-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA-package xml.bookmarks.posts;import java.net.MalformedURLException;import de.anomic.http.httpRequestHeader;diff --git a/htroot/xml/bookmarks/posts/delete_p.xml b/htroot/api/bookmarks/posts/delete_p.xmlsimilarity index 100%rename from htroot/xml/bookmarks/posts/delete_p.xmlrename to htroot/api/bookmarks/posts/delete_p.xmldiff --git a/htroot/xml/bookmarks/posts/get.java b/htroot/api/bookmarks/posts/get.javaold mode 100644new mode 100755similarity index 77%rename from htroot/xml/bookmarks/posts/get.javarename to htroot/api/bookmarks/posts/get.javaindex 756face1a..12d83e427--- a/htroot/xml/bookmarks/posts/get.java+++ b/htroot/api/bookmarks/posts/get.java@@ -1,23 +1,4 @@-// /xml/bookmarks/posts/all.java-// --------------------------------// (C) 2006 Alexander Schier-// part of yacy-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA-package xml.bookmarks.posts;import java.text.ParseException;import java.util.ArrayList;diff --git a/htroot/xml/bookmarks/posts/get.xml b/htroot/api/bookmarks/posts/get.xmlsimilarity index 100%rename from htroot/xml/bookmarks/posts/get.xmlrename to htroot/api/bookmarks/posts/get.xmldiff --git a/htroot/xml/bookmarks/tags/get.java b/htroot/api/bookmarks/tags/getTag.javaold mode 100644new mode 100755similarity index 66%rename from htroot/xml/bookmarks/tags/get.javarename to htroot/api/bookmarks/tags/getTag.javaindex fd36d6b2f..0483f8f67--- a/htroot/xml/bookmarks/tags/get.java+++ b/htroot/api/bookmarks/tags/getTag.java@@ -1,33 +1,4 @@-// /xml.bookmarks/tags/get.java-// --------------------------------// part of the AnomicHTTPD caching proxy-// (C) by Michael Peter Christen; [email protected]-// first published on http://www.anomic.de-// Frankfurt, Germany, 2004, 2005-//-// last major change: 27.12.2005-// this file is contributed by Alexander Schier-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA-// You must compile this file with-// javac -classpath .:../classes IndexCreate_p.java-// if the shell's current path is HTROOT--//package xml.bookmarks.tags;-package xml.bookmarks.tags;import java.util.Iterator;import de.anomic.data.bookmarksDB;@@ -37,7 +8,7 @@ import de.anomic.plasma.plasmaSwitchboard;import de.anomic.server.serverObjects;import de.anomic.server.serverSwitch;-public class get {+public class getTag {final static int SORT_ALPHA = 1;final static int SORT_SIZE = 2;final static int SHOW_ALL = -1;diff --git a/htroot/xml/bookmarks/tags/get.xml b/htroot/api/bookmarks/tags/getTag.xmlsimilarity index 100%rename from htroot/xml/bookmarks/tags/get.xmlrename to htroot/api/bookmarks/tags/getTag.xmldiff --git a/htroot/api/bookmarks/tags/rename_p.java b/htroot/api/bookmarks/tags/rename_p.javanew file mode 100755index 000000000..7d9009f5a--- /dev/null+++ b/htroot/api/bookmarks/tags/rename_p.java@@ -0,0 +1,22 @@++import de.anomic.http.httpRequestHeader;+import de.anomic.plasma.plasmaSwitchboard;+import de.anomic.server.serverObjects;+import de.anomic.server.serverSwitch;++public class rename_p {+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {+ // return variable that accumulates replacements+ final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;+ final serverObjects prop = new serverObjects();+ prop.put("result", "0");//error+ //rename tags+ if(post != null && post.containsKey("old") && post.containsKey("new")){+ if(switchboard.bookmarksDB.renameTag(post.get("old"), post.get("new")))+ prop.put("result", "1");//success+ }+ // return rewrite properties+ return prop;+ }++}diff --git a/htroot/xml/bookmarks/tags/rename_p.xml b/htroot/api/bookmarks/tags/rename_p.xmlsimilarity index 100%rename from htroot/xml/bookmarks/tags/rename_p.xmlrename to htroot/api/bookmarks/tags/rename_p.xmldiff --git a/htroot/xml/bookmarks/xbel/xbel.java b/htroot/api/bookmarks/xbel/xbel.javaold mode 100644new mode 100755similarity index 99%rename from htroot/xml/bookmarks/xbel/xbel.javarename to htroot/api/bookmarks/xbel/xbel.javaindex 1256da0bf..4c2f1df74--- a/htroot/xml/bookmarks/xbel/xbel.java+++ b/htroot/api/bookmarks/xbel/xbel.java@@ -1,4 +1,4 @@-package xml.bookmarks.xbel;+import java.util.Date;import java.util.Iterator;diff --git a/htroot/xml/bookmarks/xbel/xbel.xml b/htroot/api/bookmarks/xbel/xbel.xmlsimilarity index 100%rename from htroot/xml/bookmarks/xbel/xbel.xmlrename to htroot/api/bookmarks/xbel/xbel.xmldiff --git a/htroot/xml/config_p.java b/htroot/api/config_p.javasimilarity index 62%rename from htroot/xml/config_p.javarename to htroot/api/config_p.javaindex 17c78a8bd..7bbce682d 100644--- a/htroot/xml/config_p.java+++ b/htroot/api/config_p.java@@ -1,27 +1,4 @@-// /xml/config_p.java-// --------------------------------// (C) 2006 Alexander Schier-// part of YaCy-//-// last major change: 06.02.2006-// this file is contributed by Alexander Schier-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US--package xml;import java.util.ArrayList;import java.util.Collections;import java.util.Iterator;diff --git a/htroot/xml/config_p.xml b/htroot/api/config_p.xmlsimilarity index 100%rename from htroot/xml/config_p.xmlrename to htroot/api/config_p.xmldiff --git a/htroot/xml/feed.java b/htroot/api/feed.javasimilarity index 78%rename from htroot/xml/feed.javarename to htroot/api/feed.javaindex 0e33475aa..134f43376 100755--- a/htroot/xml/feed.java+++ b/htroot/api/feed.java@@ -1,30 +1,4 @@-// feed.java-// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany-// first published 25.04.2008 on http://yacy.net-//-// This is a part of YaCy, a peer-to-peer based web search engine-//-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $-// $LastChangedRevision: 1986 $-// $LastChangedBy: orbiter $-//-// LICENSE-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA-package xml;import java.util.Date;diff --git a/htroot/xml/feed.rss b/htroot/api/feed.rsssimilarity index 100%rename from htroot/xml/feed.rssrename to htroot/api/feed.rssdiff --git a/htroot/xml/queues_p.java b/htroot/api/queues_p.javasimilarity index 85%rename from htroot/xml/queues_p.javarename to htroot/api/queues_p.javaindex 0a24f3f9a..3deda768a 100644--- a/htroot/xml/queues_p.java+++ b/htroot/api/queues_p.java@@ -1,32 +1,4 @@-// /xml.queues/indexing_p.java-// --------------------------------// part of the AnomicHTTPD caching proxy-// (C) by Michael Peter Christen; [email protected]-// first published on http://www.anomic.de-// Frankfurt, Germany, 2004, 2005-// last major change: 28.10.2005-// this file is contributed by Alexander Schier-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA-// You must compile this file with-// javac -classpath .:../classes IndexCreate_p.java-// if the shell's current path is HTROOT--//package xml.queues;-package xml;import java.text.SimpleDateFormat;import java.util.ArrayList;diff --git a/htroot/xml/queues_p.xml b/htroot/api/queues_p.xmlsimilarity index 100%rename from htroot/xml/queues_p.xmlrename to htroot/api/queues_p.xmldiff --git a/htroot/xml/status_p.java b/htroot/api/status_p.javasimilarity index 69%rename from htroot/xml/status_p.javarename to htroot/api/status_p.javaindex 6af88171d..ebe601031 100644--- a/htroot/xml/status_p.java+++ b/htroot/api/status_p.java@@ -1,25 +1,4 @@-// /xml.queues/status_p.java-// --------------------------------// part of the yacy-//-// (C) 2006 Alexander Schier-// last major change: 03.11.2006-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software Foundation, Inc.,-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.-package xml;import de.anomic.http.httpRequestHeader;import de.anomic.http.httpdByteCountInputStream;diff --git a/htroot/xml/status_p.xml b/htroot/api/status_p.xmlsimilarity index 100%rename from htroot/xml/status_p.xmlrename to htroot/api/status_p.xmldiff --git a/htroot/xml/util/getpageinfo_p.java b/htroot/api/util/getpageinfo_p.javaold mode 100644new mode 100755similarity index 80%rename from htroot/xml/util/getpageinfo_p.javarename to htroot/api/util/getpageinfo_p.javaindex 8559a1f57..883bbb1c0--- a/htroot/xml/util/getpageinfo_p.java+++ b/htroot/api/util/getpageinfo_p.java@@ -1,31 +1,4 @@-// /xml/util/gettitle_p.java-// --------------------------------// part of the AnomicHTTPD caching proxy-// (C) by Michael Peter Christen; [email protected]-// first published on http://www.anomic.de-// Frankfurt, Germany, 2004, 2005-//-// last major change: 29.12.2005-// this file is contributed by Alexander Schier-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA-// You must compile this file with-// javac -classpath .:../classes IndexCreate_p.java-// if the shell's current path is HTROOT-package xml.util;import java.io.IOException;import java.io.Writer;import java.net.MalformedURLException;diff --git a/htroot/xml/util/getpageinfo_p.xml b/htroot/api/util/getpageinfo_p.xmlsimilarity index 100%rename from htroot/xml/util/getpageinfo_p.xmlrename to htroot/api/util/getpageinfo_p.xmldiff --git a/htroot/xml/util/ynetSearch.java b/htroot/api/util/ynetSearch.javaold mode 100644new mode 100755similarity index 63%rename from htroot/xml/util/ynetSearch.javarename to htroot/api/util/ynetSearch.javaindex 08334ef6d..b5f179445--- a/htroot/xml/util/ynetSearch.java+++ b/htroot/api/util/ynetSearch.java@@ -1,29 +1,4 @@-///xml/util/ynetSearch.java-//(C) 2008 by Stefan Foerster; [email protected], Hamburg, Germany-//first published 15.05.2008 on http://yacy.net-//-//This is a part of YaCy, a peer-to-peer based web search engine-//-//$LastChangedDate: 2008-05-16 00:44:07 +0200 (Fr, 16 May 2008) $-//$LastChangedRevision: 4806 $-//$LastChangedBy: apfelmaennchen $-//-//LICENSE-//-//This program is free software; you can redistribute it and/or modify-//it under the terms of the GNU General Public License as published by-//the Free Software Foundation; either version 2 of the License, or-//(at your option) any later version.-//-//This program 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 General Public License for more details.-//-//You should have received a copy of the GNU General Public License-//along with this program; if not, write to the Free Software-//Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA-package xml.util;+import java.io.IOException;import java.io.InputStream;diff --git a/htroot/xml/util/ynetSearch.xml b/htroot/api/util/ynetSearch.xmlsimilarity index 100%rename from htroot/xml/util/ynetSearch.xmlrename to htroot/api/util/ynetSearch.xmldiff --git a/htroot/api/version.java b/htroot/api/version.javanew file mode 100644index 000000000..67b421dad--- /dev/null+++ b/htroot/api/version.java@@ -0,0 +1,23 @@+++import de.anomic.http.httpRequestHeader;+import de.anomic.server.serverObjects;+import de.anomic.server.serverSwitch;++public class version {++ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {+ // return variable that accumulates replacements+ final serverObjects prop = new serverObjects();++ prop.put("version", env.getConfig("version", "0.0"));+ prop.put("svnRev", env.getConfig("svnRevision", "0"));+ prop.put("buildDate", env.getConfig("vdate", "19700101"));+ // return rewrite properties+ return prop;+ }++}+++diff --git a/htroot/xml/version.xml b/htroot/api/version.xmlsimilarity index 100%rename from htroot/xml/version.xmlrename to htroot/api/version.xmldiff --git a/htroot/xml/webstructure.java b/htroot/api/webstructure.javasimilarity index 66%rename from htroot/xml/webstructure.javarename to htroot/api/webstructure.javaindex 20a0fbcf1..67fe37f65 100644--- a/htroot/xml/webstructure.java+++ b/htroot/api/webstructure.java@@ -1,32 +1,5 @@-// webstructure.java-// (C) 2007 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany-// first published 22.05.2007 on http://yacy.net-//-// This is a part of YaCy, a peer-to-peer based web search engine-//-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $-// $LastChangedRevision: 1986 $-// $LastChangedBy: orbiter $-//-// LICENSE-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA-package xml;-import java.util.Iterator;import java.util.Map;diff --git a/htroot/xml/webstructure.xml b/htroot/api/webstructure.xmlsimilarity index 100%rename from htroot/xml/webstructure.xmlrename to htroot/api/webstructure.xmldiff --git a/htroot/xml/bookmarks/tags/rename_p.java b/htroot/xml/bookmarks/tags/rename_p.javadeleted file mode 100644index 8c60cbb4f..000000000--- a/htroot/xml/bookmarks/tags/rename_p.java+++ /dev/null@@ -1,50 +0,0 @@-// /xml.bookmarks/tags/rename_p.java-// --------------------------------// part of the AnomicHTTPD caching proxy-// (C) by Michael Peter Christen; [email protected]-// first published on http://www.anomic.de-// Frankfurt, Germany, 2004, 2005-// last major change: 28.12.2005-// this file is contributed by Alexander Schier-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA--// You must compile this file with-// javac -classpath .:../classes IndexCreate_p.java-// if the shell's current path is HTROOT--//package xml.bookmarks.tags;-package xml.bookmarks.tags;-import de.anomic.http.httpRequestHeader;-import de.anomic.plasma.plasmaSwitchboard;-import de.anomic.server.serverObjects;-import de.anomic.server.serverSwitch;--public class rename_p {- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {- // return variable that accumulates replacements- final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;- final serverObjects prop = new serverObjects();- prop.put("result", "0");//error- //rename tags- if(post != null && post.containsKey("old") && post.containsKey("new")){- if(switchboard.bookmarksDB.renameTag(post.get("old"), post.get("new")))- prop.put("result", "1");//success- }- // return rewrite properties- return prop;- }--}diff --git a/htroot/xml/version.java b/htroot/xml/version.javadeleted file mode 100644index 3df6f30bc..000000000--- a/htroot/xml/version.java+++ /dev/null@@ -1,45 +0,0 @@-// /xml/version.java-// --------------------------------// (C) 2006 Alexander Schier-// part of YaCy-//-// last major change: 06.02.2006-// this file is contributed by Alexander Schier-//-// This program is free software; you can redistribute it and/or modify-// it under the terms of the GNU General Public License as published by-// the Free Software Foundation; either version 2 of the License, or-// (at your option) any later version.-//-// This program 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 General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US--package xml;--import de.anomic.http.httpRequestHeader;-import de.anomic.server.serverObjects;-import de.anomic.server.serverSwitch;--public class version {-- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {- // return variable that accumulates replacements- final serverObjects prop = new serverObjects();-- prop.put("version", env.getConfig("version", "0.0"));- prop.put("svnRev", env.getConfig("svnRevision", "0"));- prop.put("buildDate", env.getConfig("vdate", "19700101"));- // return rewrite properties- return prop;- }--}---diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.javaindex c6c73e7c4..3b7f23d51 100644--- a/source/de/anomic/http/httpdFileHandler.java+++ b/source/de/anomic/http/httpdFileHandler.java@@ -296,13 +296,16 @@ public final class httpdFileHandler {if (authorization != null && authorization.length() == 0) authorization = null;final String adminAccountBase64MD5 = switchboard.getConfig(httpd.ADMIN_ACCOUNT_B64MD5, "");- int pos = path.lastIndexOf(".");-+ // a bad patch to map the /xml/ path to /api/+ if (path.startsWith("/xml/")) {+ path = "/api/" + path.substring(5);+ }+final boolean adminAccountForLocalhost = sb.getConfigBool("adminAccountForLocalhost", false);final String refererHost = requestHeader.refererHost();final boolean accessFromLocalhost = serverCore.isLocalhost(clientIP) && (refererHost.length() == 0 || serverCore.isLocalhost(refererHost));final boolean grantedForLocalhost = adminAccountForLocalhost && accessFromLocalhost;- final boolean protectedPage = (path.substring(0,(pos==-1)?path.length():pos)).endsWith("_p");+ final boolean protectedPage = path.indexOf("_p.") > 0;final boolean accountEmpty = adminAccountBase64MD5.length() == 0;if (!grantedForLocalhost && protectedPage && !accountEmpty) {@@ -946,14 +949,14 @@ public final class httpdFileHandler {if (targetMd5File.exists()) {//String description = null;targetMD5 = new String(serverFileUtils.read(targetMd5File));- pos = targetMD5.indexOf('\n');- if (pos >= 0) {- //description = targetMD5.substring(pos + 1);- targetMD5 = targetMD5.substring(0, pos);- }-- // using the checksum as ETAG header- header.put(httpHeader.ETAG, targetMD5);+ int pos = targetMD5.indexOf('\n');+ if (pos >= 0) {+ //description = targetMD5.substring(pos + 1);+ targetMD5 = targetMD5.substring(0, pos);+ }++ // using the checksum as ETAG header+ header.put(httpHeader.ETAG, targetMD5);}} catch (final IOException e) {e.printStackTrace();