mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
- added @SuppressWarnings to unused servlet method parameters
- removed unnecessary casts - removed unnecessary throw statements
This commit is contained in:
parent
ea10766bfd
commit
d3964253ae
|
@ -2,7 +2,7 @@
|
|||
* AccessGrid_p
|
||||
* Copyright 2011 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany
|
||||
* First released 18.02.2010 at http://yacy.net
|
||||
*
|
||||
*
|
||||
* $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
|
||||
* $LastChangedRevision: 6922 $
|
||||
* $LastChangedBy: orbiter $
|
||||
|
@ -11,12 +11,12 @@
|
|||
* 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 <http://www.gnu.org/licenses/>.
|
||||
|
@ -28,8 +28,8 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
|
||||
public class AccessGrid_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader requestHeader, final serverObjects post, final serverSwitch switchboard) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader requestHeader, @SuppressWarnings("unused") final serverObjects post, @SuppressWarnings("unused") final serverSwitch switchboard) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
return prop;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public class AccessPicture_p {
|
|||
|
||||
private static int[] times = new int[]{60000, 50000, 40000, 30000, 20000, 10000, 1000};
|
||||
|
||||
public static RasterPlotter respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static RasterPlotter respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
String color_text = "AAAAAA";
|
||||
|
|
|
@ -4,7 +4,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public final class AugmentedBrowsingFilters_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header,
|
||||
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();
|
||||
|
@ -16,31 +16,31 @@ public final class AugmentedBrowsingFilters_p {
|
|||
|
||||
env.setConfig("augmentation.reflect", "on".equals(post
|
||||
.get("augmentedReflect")) ? true : false);
|
||||
|
||||
|
||||
env.setConfig("augmentation.addDoctype", "on".equals(post
|
||||
.get("augmentedAddDoctype")) ? true : false);
|
||||
|
||||
|
||||
env.setConfig("augmentation.reparse", "on".equals(post
|
||||
.get("augmentedReparse")) ? true : false);
|
||||
|
||||
|
||||
env.setConfig("interaction.overlayinteraction.enabled", "on".equals(post
|
||||
.get("overlayInteraction")) ? true : false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
prop.put("augmentedReflect_checked",
|
||||
env.getConfigBool("augmentation.reflect", false) ? "1" : "0");
|
||||
|
||||
|
||||
prop.put("augmentedAddDoctype_checked",
|
||||
env.getConfigBool("augmentation.addDoctype", true) ? "1" : "0");
|
||||
|
||||
|
||||
prop.put("augmentedReparse_checked",
|
||||
env.getConfigBool("augmentation.reparse", true) ? "1" : "0");
|
||||
|
||||
|
||||
prop.put("overlayInteraction_checked",
|
||||
env.getConfigBool("interaction.overlayinteraction.enabled", true) ? "1" : "0");
|
||||
env.getConfigBool("interaction.overlayinteraction.enabled", true) ? "1" : "0");
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
|
|
|
@ -4,7 +4,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public final class AugmentedBrowsing_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header,
|
||||
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();
|
||||
|
@ -20,7 +20,7 @@ public final class AugmentedBrowsing_p {
|
|||
|
||||
env.setConfig("proxyURL",
|
||||
"on".equals(post.get("urlproxyenabled")) ? true : false);
|
||||
|
||||
|
||||
env.setConfig("proxyURL.useforresults",
|
||||
"on".equals(post.get("urlproxyuseforresults")) ? true : false);
|
||||
|
||||
|
@ -43,7 +43,7 @@ public final class AugmentedBrowsing_p {
|
|||
|
||||
prop.put("urlproxyenabled_checked",
|
||||
env.getConfigBool("proxyURL", false) ? "1" : "0");
|
||||
|
||||
|
||||
prop.put("urlproxyuseforresults_checked",
|
||||
env.getConfigBool("proxyURL.useforresults", false) ? "1" : "0");
|
||||
|
||||
|
|
|
@ -4,8 +4,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public final class AugmentedParsing_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header,
|
||||
final serverObjects post, final serverSwitch env) {
|
||||
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();
|
||||
|
||||
|
@ -16,10 +15,10 @@ public final class AugmentedParsing_p {
|
|||
|
||||
env.setConfig("parserAugmentation",
|
||||
"on".equals(post.get("augmentedparserenabled")) ? true : false);
|
||||
|
||||
|
||||
env.setConfig("parserAugmentation.RDFa",
|
||||
"on".equals(post.get("augmentedparserRDFenabled")) ? true : false);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -28,10 +27,10 @@ public final class AugmentedParsing_p {
|
|||
|
||||
prop.put("augmentedparserenabled_checked",
|
||||
env.getConfigBool("parserAugmentation", false) ? "1" : "0");
|
||||
|
||||
|
||||
prop.put("augmentedparserRDFenabled_checked",
|
||||
env.getConfigBool("parserAugmentation.RDFa", false) ? "1" : "0");
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ import de.anomic.server.serverSwitch;
|
|||
public class Banner {
|
||||
|
||||
public static RasterPlotter respond(
|
||||
final RequestHeader header,
|
||||
@SuppressWarnings("unused") final RequestHeader header,
|
||||
final serverObjects post,
|
||||
final serverSwitch env) throws IOException {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
|
|
@ -69,7 +69,7 @@ public class BlacklistCleaner_p {
|
|||
Blacklist.class
|
||||
};
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
// initialize the list manager
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// BlacklistImpExp_p.java
|
||||
// BlacklistImpExp_p.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@yacy.net
|
||||
|
@ -31,31 +31,30 @@
|
|||
|
||||
import java.io.File;
|
||||
import java.util.Iterator;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import de.anomic.data.ListManager;
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.kelondro.util.FileUtils;
|
||||
import net.yacy.peers.Seed;
|
||||
import net.yacy.search.Switchboard;
|
||||
import de.anomic.data.ListManager;
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class BlacklistImpExp_p {
|
||||
private final static String DISABLED = "disabled_";
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
|
||||
// initialize the list manager
|
||||
ListManager.switchboard = (Switchboard) env;
|
||||
ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS"));
|
||||
|
||||
|
||||
// loading all blacklist files located in the directory
|
||||
final List<String> dirlist = FileUtils.getDirListing(ListManager.listsPath);
|
||||
|
||||
|
||||
String blacklistToUse = null;
|
||||
final serverObjects prop = new serverObjects();
|
||||
prop.putHTML("blacklistEngine", Switchboard.urlBlacklist.getEngineInfo());
|
||||
|
@ -99,7 +98,7 @@ public class BlacklistImpExp_p {
|
|||
}
|
||||
}
|
||||
prop.put("blackListNames", count);
|
||||
|
||||
|
||||
return prop;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// BlacklistTest_p.java
|
||||
// BlacklistTest_p.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@yacy.net
|
||||
|
@ -36,23 +36,22 @@ import net.yacy.cora.protocol.RequestHeader;
|
|||
import net.yacy.kelondro.data.meta.DigestURI;
|
||||
import net.yacy.repository.Blacklist.BlacklistType;
|
||||
import net.yacy.search.Switchboard;
|
||||
|
||||
import de.anomic.data.ListManager;
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class BlacklistTest_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
// initialize the list manager
|
||||
ListManager.switchboard = (Switchboard) env;
|
||||
ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS"));
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
prop.putHTML("blacklistEngine", Switchboard.urlBlacklist.getEngineInfo());
|
||||
|
||||
// do all post operations
|
||||
|
||||
// do all post operations
|
||||
if(post != null && post.containsKey("testList")) {
|
||||
prop.put("testlist", "1");
|
||||
String urlstring = post.get("testurl", "");
|
||||
|
|
|
@ -37,7 +37,7 @@ import de.anomic.server.servletProperties;
|
|||
|
||||
public class CacheResource_p {
|
||||
|
||||
public static Object respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static Object respond(final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
final servletProperties prop = new servletProperties();
|
||||
prop.put("resource", new byte[0]);
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class ConfigAccounts_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = Switchboard.getSwitchboard();
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ConfigAppearance_p {
|
|||
|
||||
private final static String SKIN_FILENAME_FILTER = "^.*\\.css$";
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final String skinPath = new File(env.getDataPath(), env.getConfig("skinPath", "DATA/SKINS")).toString();
|
||||
|
|
|
@ -39,7 +39,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class ConfigHTCache_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) throws IOException {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) throws IOException {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// $LastChangedBy: lotus $
|
||||
//
|
||||
// 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
|
||||
|
@ -33,16 +33,16 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class ConfigHeuristics_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
if (post != null) {
|
||||
|
||||
|
||||
// store this call as api call
|
||||
sb.tables.recordAPICall(post, "ConfigHeuristics.html", WorkTables.TABLE_API_TYPE_CONFIGURATION, "heuristic settings");
|
||||
|
||||
|
||||
if (post.containsKey("site_on")) sb.setConfig("heuristic.site", true);
|
||||
if (post.containsKey("site_off")) sb.setConfig("heuristic.site", false);
|
||||
if (post.containsKey("searchresult_on")) sb.setConfig("heuristic.searchresults", true);
|
||||
|
@ -52,7 +52,7 @@ public class ConfigHeuristics_p {
|
|||
if (post.containsKey("blekko_on")) sb.setConfig("heuristic.blekko", true);
|
||||
if (post.containsKey("blekko_off")) sb.setConfig("heuristic.blekko", false);
|
||||
}
|
||||
|
||||
|
||||
prop.put("site.checked", sb.getConfigBool("heuristic.site", false) ? 1 : 0);
|
||||
prop.put("searchresult.checked", sb.getConfigBool("heuristic.searchresults", false) ? 1 : 0);
|
||||
prop.put("searchresultglobal.checked", sb.getConfigBool("heuristic.searchresults.crawlglobal", false) ? 1 : 0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//ConfigLanguage_p.java
|
||||
//ConfigLanguage_p.java
|
||||
//-----------------------
|
||||
//part of YACY
|
||||
//(C) by Michael Peter Christen; mc@yacy.net
|
||||
|
@ -52,7 +52,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class ConfigLanguage_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
Switchboard sb = (Switchboard) env;
|
||||
|
@ -72,7 +72,7 @@ public class ConfigLanguage_p {
|
|||
|
||||
// store this call as api call
|
||||
((Switchboard) env).tables.recordAPICall(post, "ConfigLanguage_p.html", WorkTables.TABLE_API_TYPE_CONFIGURATION, "language settings: " + selectedLanguage);
|
||||
|
||||
|
||||
//change language
|
||||
if (post.containsKey("use_button") && selectedLanguage != null){
|
||||
/* Only change language if filename is contained in list of filesnames
|
||||
|
@ -142,7 +142,7 @@ public class ConfigLanguage_p {
|
|||
final String langName = langNames.get(langKey);
|
||||
prop.put("langlist_" + (count + 1) + "_file", langFile);
|
||||
prop.put("langlist_" + (count + 1) + "_name", ((langName == null) ? langKey : langName));
|
||||
|
||||
|
||||
if(env.getConfig("locale.language", "default").equals(langKey)) {
|
||||
prop.put("langlist_" + (count + 1) + "_selected", "selected=\"selected\"");
|
||||
prop.put("langlist_0_selected", " "); // reset Default
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ConfigLiveSearch.java
|
||||
// ConfigLiveSearch.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@yacy.net
|
||||
|
@ -10,7 +10,7 @@
|
|||
//$LastChangedBy$
|
||||
//
|
||||
// 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
|
||||
|
@ -32,10 +32,10 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class ConfigLiveSearch {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
|
||||
prop.putHTML("ip", sb.peers.mySeed().getIP());
|
||||
prop.putHTML("port", sb.getConfig("port", "8090"));
|
||||
return prop;
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ConfigNetwork_p
|
|||
{
|
||||
|
||||
public static serverObjects respond(
|
||||
final RequestHeader header,
|
||||
@SuppressWarnings("unused") final RequestHeader header,
|
||||
final serverObjects post,
|
||||
final serverSwitch env) throws FileNotFoundException, IOException {
|
||||
|
||||
|
|
|
@ -38,13 +38,12 @@ import java.util.Properties;
|
|||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.peers.NewsPool;
|
||||
import net.yacy.search.Switchboard;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class ConfigProfile_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Properties profile = new Properties();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ConfigProperties_p.java
|
||||
// ConfigProperties_p.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@yacy.net
|
||||
|
@ -34,16 +34,15 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class ConfigProperties_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
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();
|
||||
|
||||
|
||||
String key = "";
|
||||
String value = "";
|
||||
|
||||
|
@ -57,11 +56,11 @@ public class ConfigProperties_p {
|
|||
}
|
||||
prop.putHTML("keyPosted", key);
|
||||
prop.putHTML("valuePosted", value);
|
||||
|
||||
|
||||
Iterator<String> keys = env.configKeys();
|
||||
|
||||
final List<String> list = new ArrayList<String>(250);
|
||||
|
||||
|
||||
while (keys.hasNext()) {
|
||||
list.add(keys.next());
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ConfigRobotsTxt_p.java
|
||||
// ConfigRobotsTxt_p.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@yacy.net
|
||||
|
@ -38,14 +38,14 @@ import de.anomic.server.serverSwitch;
|
|||
import de.anomic.server.servletProperties;
|
||||
|
||||
public class ConfigRobotsTxt_p {
|
||||
|
||||
public static servletProperties respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static servletProperties respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final servletProperties prop = new servletProperties();
|
||||
|
||||
|
||||
final RobotsTxtConfig rbc = ((Switchboard)env).robotstxtConfig;
|
||||
prop.put("clientname", sb.peers.mySeed().getPublicAddress());
|
||||
|
||||
|
||||
if (post != null) {
|
||||
if (post.containsKey("save")) {
|
||||
rbc.setAllDisallowed(post.containsKey(RobotsTxtConfig.ALL));
|
||||
|
@ -64,7 +64,7 @@ public class ConfigRobotsTxt_p {
|
|||
env.setConfig(SwitchboardConstants.ROBOTS_TXT, rbc.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
prop.put(RobotsTxtConfig.ALL + ".checked", (rbc.isAllDisallowed()) ? "1" : "0");
|
||||
prop.put(RobotsTxtConfig.BLOG + ".checked", (rbc.isBlogDisallowed()) ? "1" : "0");
|
||||
prop.put(RobotsTxtConfig.BOOKMARKS + ".checked", (rbc.isBookmarksDisallowed()) ? "1" : "0");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ConfigSearchBox.java
|
||||
// ConfigSearchBox.java
|
||||
// -----------------------
|
||||
// (C) 2009 by Michael Peter Christen; mc@yacy.net
|
||||
// first published 25.09.2009 on http://yacy.net
|
||||
|
@ -8,7 +8,7 @@
|
|||
//$LastChangedBy$
|
||||
//
|
||||
// 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
|
||||
|
@ -30,10 +30,10 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class ConfigSearchBox {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
|
||||
String myaddress = sb.peers.mySeed().getPublicAddress();
|
||||
if (myaddress == null) myaddress = "localhost:" + sb.getConfig("port", "8090");
|
||||
prop.put("myaddress", myaddress);
|
||||
|
|
|
@ -46,7 +46,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class ConfigUpdate_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
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();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
|
|
@ -49,7 +49,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public final class Connections_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// $LastChangedBy$
|
||||
//
|
||||
// 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
|
||||
|
@ -23,6 +23,7 @@
|
|||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.yacy.cora.date.GenericFormatter;
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.document.content.dao.Dao;
|
||||
|
@ -35,16 +36,16 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class ContentIntegrationPHPBB3_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
|
||||
prop.put("check", 0);
|
||||
prop.put("export", 0);
|
||||
prop.put("import", 0);
|
||||
|
||||
|
||||
if (post != null) {
|
||||
|
||||
|
||||
String urlstub = post.get("content.phpbb3.urlstub", "");
|
||||
String dbtype = post.get("content.phpbb3.dbtype", "");
|
||||
String dbhost = post.get("content.phpbb3.dbhost", "");
|
||||
|
@ -55,8 +56,8 @@ public class ContentIntegrationPHPBB3_p {
|
|||
String dbpw = post.get("content.phpbb3.dbpw", "");
|
||||
int ppf = post.getInt("content.phpbb3.ppf", 1000);
|
||||
String dumpfile = post.get("content.phpbb3.dumpfile", "");
|
||||
|
||||
|
||||
|
||||
|
||||
sb.setConfig("content.phpbb3.urlstub", urlstub);
|
||||
sb.setConfig("content.phpbb3.dbtype", dbtype);
|
||||
sb.setConfig("content.phpbb3.dbhost", dbhost);
|
||||
|
@ -67,7 +68,7 @@ public class ContentIntegrationPHPBB3_p {
|
|||
sb.setConfig("content.phpbb3.dbpw", dbpw);
|
||||
sb.setConfig("content.phpbb3.ppf", ppf);
|
||||
sb.setConfig("content.phpbb3.dumpfile", dumpfile);
|
||||
|
||||
|
||||
if (post.containsKey("check")) {
|
||||
try {
|
||||
Dao db = new PhpBB3Dao(
|
||||
|
@ -91,7 +92,7 @@ public class ContentIntegrationPHPBB3_p {
|
|||
prop.put("check_error", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (post.containsKey("export")) {
|
||||
try {
|
||||
Dao db = new PhpBB3Dao(
|
||||
|
@ -104,7 +105,7 @@ public class ContentIntegrationPHPBB3_p {
|
|||
dbuser,
|
||||
dbpw
|
||||
);
|
||||
|
||||
|
||||
int files = db.writeSurrogates(db.query(0, -1, 100), sb.surrogatesInPath, "fullexport-" + GenericFormatter.SHORT_SECOND_FORMATTER.format(), ppf);
|
||||
prop.put("export", 1);
|
||||
prop.put("export_files", files);
|
||||
|
@ -115,7 +116,7 @@ public class ContentIntegrationPHPBB3_p {
|
|||
prop.put("export_error", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (post.containsKey("import")) {
|
||||
File f = new File(dumpfile);
|
||||
if (!f.exists()) {
|
||||
|
@ -130,7 +131,7 @@ public class ContentIntegrationPHPBB3_p {
|
|||
dbuser,
|
||||
dbpw
|
||||
);
|
||||
|
||||
|
||||
importer.imp(f);
|
||||
prop.put("import", 1);
|
||||
importer.close();
|
||||
|
|
|
@ -34,13 +34,12 @@ import java.util.Map;
|
|||
import net.yacy.cora.protocol.HeaderFramework;
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.search.Switchboard;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class CookieMonitorIncoming_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch sb) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch sb) {
|
||||
final Switchboard switchboard = (Switchboard) sb;
|
||||
|
||||
// return variable that accumulates replacements
|
||||
|
@ -54,7 +53,7 @@ public class CookieMonitorIncoming_p {
|
|||
switchboard.setConfig("proxy.monitorCookies", false);
|
||||
switchboard.incomingCookies.clear();
|
||||
switchboard.outgoingCookies.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
prop.put("monitorCookies.on", switchboard.getConfigBool("proxy.monitorCookies", false) ? "1":"0");
|
||||
prop.put("monitorCookies.off", !switchboard.getConfigBool("proxy.monitorCookies", false) ? "1":"0");
|
||||
|
|
|
@ -39,7 +39,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class CookieMonitorOutgoing_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch sb) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch sb) {
|
||||
final Switchboard switchboard = (Switchboard) sb;
|
||||
|
||||
// return variable that accumulates replacements
|
||||
|
@ -53,7 +53,7 @@ public class CookieMonitorOutgoing_p {
|
|||
switchboard.setConfig("proxy.monitorCookies", false);
|
||||
switchboard.incomingCookies.clear();
|
||||
switchboard.outgoingCookies.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
prop.put("monitorCookies.on", switchboard.getConfigBool("proxy.monitorCookies", false) ? "1":"0");
|
||||
prop.put("monitorCookies.off", !switchboard.getConfigBool("proxy.monitorCookies", false) ? "1":"0");
|
||||
|
@ -78,7 +78,7 @@ public class CookieMonitorOutgoing_p {
|
|||
cookies = (Object[]) oa[2];
|
||||
|
||||
// put values in template
|
||||
prop.put("list_" + entCount + "_dark", dark ? "1" : "0" );
|
||||
prop.put("list_" + entCount + "_dark", dark ? "1" : "0" );
|
||||
dark =! dark;
|
||||
prop.put("list_" + entCount + "_host", host);
|
||||
prop.put("list_" + entCount + "_date", HeaderFramework.formatRFC1123(date));
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// $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
|
||||
|
@ -31,19 +31,18 @@ import net.yacy.peers.NewsDB;
|
|||
import net.yacy.peers.NewsPool;
|
||||
import net.yacy.peers.Seed;
|
||||
import net.yacy.search.Switchboard;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class CrawlMonitorRemoteStart {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
boolean dark = true;
|
||||
|
||||
|
||||
boolean dark = true;
|
||||
|
||||
// create other peer crawl table using YaCyNews
|
||||
Iterator<NewsDB.Record> recordIterator = sb.peers.newsPool.recordIterator(NewsPool.INCOMING_DB, true);
|
||||
int showedCrawl = 0;
|
||||
|
@ -73,7 +72,7 @@ public class CrawlMonitorRemoteStart {
|
|||
}
|
||||
}
|
||||
prop.put("otherCrawlStartInProgress", showedCrawl);
|
||||
|
||||
|
||||
// finished remote crawls
|
||||
recordIterator = sb.peers.newsPool.recordIterator(NewsPool.PROCESSED_DB, true);
|
||||
showedCrawl = 0;
|
||||
|
|
|
@ -83,7 +83,7 @@ public class CrawlProfileEditor_p {
|
|||
}
|
||||
|
||||
public static serverObjects respond(
|
||||
final RequestHeader header,
|
||||
@SuppressWarnings("unused") final RequestHeader header,
|
||||
final serverObjects post,
|
||||
final serverSwitch env) {
|
||||
final servletProperties prop = new servletProperties();
|
||||
|
|
|
@ -33,7 +33,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class CrawlStartExpert_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -47,7 +47,7 @@ public class CrawlStartScanner_p
|
|||
private final static int CONCURRENT_RUNNER = 100;
|
||||
|
||||
public static serverObjects respond(
|
||||
final RequestHeader header,
|
||||
@SuppressWarnings("unused") final RequestHeader header,
|
||||
final serverObjects post,
|
||||
final serverSwitch env) {
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public class Crawler_p {
|
|||
// this servlet does NOT create the Crawler servlet page content!
|
||||
// this servlet starts a web crawl. The interface for entering the web crawl parameters is in IndexCreate_p.html
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
// inital values for AJAX Elements (without JavaScript)
|
||||
|
|
|
@ -7,7 +7,7 @@ import de.anomic.server.serverSwitch;
|
|||
public final class DemoServlet {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header,
|
||||
final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
|
||||
// return variable that accumulates replacements
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -4,8 +4,8 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public final class DemoServletInteraction {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header,
|
||||
final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header,
|
||||
@SuppressWarnings("unused") final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public final class DemoServletRDF {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header,
|
||||
final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header,
|
||||
final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class DictionaryLoader_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects(); // return variable that accumulates replacements
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import de.anomic.server.servletProperties;
|
|||
//dummy class
|
||||
public class Help {
|
||||
|
||||
public static servletProperties respond(final RequestHeader requestHeader, final serverObjects post, final serverSwitch env) {
|
||||
public static servletProperties respond(@SuppressWarnings("unused") final RequestHeader requestHeader, @SuppressWarnings("unused") final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
final servletProperties prop = new servletProperties();
|
||||
return prop;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class IndexCleaner_p {
|
|||
private static MetadataRepository.BlacklistCleaner urldbCleanerThread = null;
|
||||
private static Segment.ReferenceCleaner indexCleanerThread = null;
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
prop.put("title", "DbCleanup_p");
|
||||
|
|
|
@ -78,7 +78,7 @@ public class IndexControlRWIs_p
|
|||
{
|
||||
|
||||
public static serverObjects respond(
|
||||
final RequestHeader header,
|
||||
@SuppressWarnings("unused") final RequestHeader header,
|
||||
final serverObjects post,
|
||||
final serverSwitch env) throws IOException {
|
||||
// return variable that accumulates replacements
|
||||
|
|
|
@ -48,7 +48,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class IndexControlURLs_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// $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
|
||||
|
@ -30,17 +30,17 @@ import de.anomic.server.serverObjects;
|
|||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class IndexCreateDomainCrawl_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
//Switchboard sb = (Switchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
// define visible variables
|
||||
prop.put("proxyPrefetchDepth", env.getConfig("proxyPrefetchDepth", "0"));
|
||||
prop.put("crawlingDepth", Math.min(3, env.getConfigLong("crawlingDepth", 0)));
|
||||
prop.put("crawlingFilter", env.getConfig("crawlingFilter", "0"));
|
||||
|
||||
|
||||
int crawlingIfOlder = (int) env.getConfigLong("crawlingIfOlder", -1);
|
||||
prop.put("crawlingIfOlderCheck", (crawlingIfOlder == -1) ? "0" : "1");
|
||||
prop.put("crawlingIfOlderUnitYearCheck", "0");
|
||||
|
@ -78,18 +78,18 @@ public class IndexCreateDomainCrawl_p {
|
|||
prop.put("indexingTextChecked", env.getConfigBool("indexText", false) ? "1" : "0");
|
||||
prop.put("indexingMediaChecked", env.getConfigBool("indexMedia", false) ? "1" : "0");
|
||||
prop.put("crawlOrderChecked", env.getConfigBool("crawlOrder", false) ? "1" : "0");
|
||||
|
||||
|
||||
long LCbusySleep = env.getConfigLong(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL_BUSYSLEEP, 100L);
|
||||
int LCppm = (LCbusySleep == 0) ? 1000 : (int) (60000L / LCbusySleep);
|
||||
prop.put("crawlingSpeedMaxChecked", (LCppm >= 1000) ? "1" : "0");
|
||||
prop.put("crawlingSpeedCustChecked", ((LCppm > 10) && (LCppm < 1000)) ? "1" : "0");
|
||||
prop.put("crawlingSpeedMinChecked", (LCppm <= 10) ? "1" : "0");
|
||||
prop.put("customPPMdefault", ((LCppm > 10) && (LCppm < 1000)) ? Integer.toString(LCppm) : "");
|
||||
|
||||
|
||||
prop.put("xsstopwChecked", env.getConfigBool("xsstopw", false) ? "1" : "0");
|
||||
prop.put("xdstopwChecked", env.getConfigBool("xdstopw", false) ? "1" : "0");
|
||||
prop.put("xpstopwChecked", env.getConfigBool("xpstopw", false) ? "1" : "0");
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
|
|
@ -36,12 +36,12 @@ import de.anomic.server.serverObjects;
|
|||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class IndexCreateLoaderQueue_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
|
||||
if (sb.crawlQueues.workerSize() == 0) {
|
||||
prop.put("loader-set", "0");
|
||||
|
@ -51,22 +51,22 @@ public class IndexCreateLoaderQueue_p {
|
|||
final Request[] w = sb.crawlQueues.activeWorkerEntries();
|
||||
Seed initiator;
|
||||
int count = 0;
|
||||
for (int i = 0; i < w.length; i++) {
|
||||
if (w[i] == null) continue;
|
||||
|
||||
initiator = sb.peers.getConnected((w[i].initiator() == null) ? "" : ASCII.String(w[i].initiator()));
|
||||
for (Request element : w) {
|
||||
if (element == null) continue;
|
||||
|
||||
initiator = sb.peers.getConnected((element.initiator() == null) ? "" : ASCII.String(element.initiator()));
|
||||
prop.put("loader-set_list_"+count+"_dark", dark ? "1" : "0");
|
||||
prop.putHTML("loader-set_list_"+count+"_initiator", ((initiator == null) ? "proxy" : initiator.getName()));
|
||||
prop.put("loader-set_list_"+count+"_depth", w[i].depth());
|
||||
prop.put("loader-set_list_"+count+"_status", w[i].getStatus());
|
||||
prop.putHTML("loader-set_list_"+count+"_url", w[i].url().toNormalform(true, false));
|
||||
prop.put("loader-set_list_"+count+"_depth", element.depth());
|
||||
prop.put("loader-set_list_"+count+"_status", element.getStatus());
|
||||
prop.putHTML("loader-set_list_"+count+"_url", element.url().toNormalform(true, false));
|
||||
dark = !dark;
|
||||
count++;
|
||||
}
|
||||
prop.put("loader-set_list", count);
|
||||
prop.put("loader-set_num", count);
|
||||
}
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
|
|
@ -35,28 +35,28 @@ import de.anomic.server.serverObjects;
|
|||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class IndexCreateParserErrors_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
prop.put("rejected", "0");
|
||||
int showRejectedCount = 100;
|
||||
|
||||
|
||||
if (post != null) {
|
||||
|
||||
|
||||
if (post.containsKey("clearRejected")) {
|
||||
sb.crawlQueues.errorURL.clearStack();
|
||||
}
|
||||
}
|
||||
if (post.containsKey("moreRejected")) {
|
||||
showRejectedCount = post.getInt("showRejected", 10);
|
||||
}
|
||||
}
|
||||
boolean dark;
|
||||
|
||||
|
||||
|
||||
prop.put("indexing-queue", "0"); //is empty
|
||||
|
||||
|
||||
// failure cases
|
||||
if (sb.crawlQueues.errorURL.stackSize() != 0) {
|
||||
if (showRejectedCount > sb.crawlQueues.errorURL.stackSize()) showRejectedCount = sb.crawlQueues.errorURL.stackSize();
|
||||
|
@ -70,7 +70,7 @@ public class IndexCreateParserErrors_p {
|
|||
prop.put("rejected_only-latest", "0");
|
||||
}
|
||||
dark = true;
|
||||
DigestURI url;
|
||||
DigestURI url;
|
||||
byte[] initiatorHash, executorHash;
|
||||
Seed initiatorSeed, executorSeed;
|
||||
int j=0;
|
||||
|
@ -81,7 +81,7 @@ public class IndexCreateParserErrors_p {
|
|||
if (entry == null) continue;
|
||||
url = entry.url();
|
||||
if (url == null) continue;
|
||||
|
||||
|
||||
initiatorHash = entry.initiator();
|
||||
executorHash = entry.executor();
|
||||
initiatorSeed = (initiatorHash == null) ? null : sb.peers.getConnected(ASCII.String(initiatorHash));
|
||||
|
|
|
@ -37,7 +37,7 @@ public class IndexCreateQueues_p {
|
|||
private static final int INITIATOR = 5;
|
||||
private static final int MODIFIED = 6;
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -43,7 +43,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class IndexFederated_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
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();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
|
|
@ -27,13 +27,12 @@ import java.io.File;
|
|||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.document.importer.MediawikiImporter;
|
||||
import net.yacy.search.Switchboard;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class IndexImportMediawiki_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
|
|
|
@ -27,27 +27,26 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.document.parser.html.CharacterCoding;
|
||||
import net.yacy.document.importer.OAIListFriendsLoader;
|
||||
import net.yacy.document.importer.OAIPMHImporter;
|
||||
import net.yacy.document.parser.html.CharacterCoding;
|
||||
import net.yacy.search.Switchboard;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class IndexImportOAIPMHList_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
prop.put("refresh", 0);
|
||||
prop.put("import", 0);
|
||||
prop.put("source", 0);
|
||||
|
||||
|
||||
if (post != null && post.containsKey("source")) {
|
||||
final Set<String> oaiRoots = OAIListFriendsLoader.getListFriends(sb.loader).keySet();
|
||||
|
||||
|
||||
boolean dark = false;
|
||||
int count = 0;
|
||||
for (final String root: oaiRoots) {
|
||||
|
@ -62,13 +61,13 @@ public class IndexImportOAIPMHList_p {
|
|||
prop.put("source_num", count);
|
||||
prop.put("source", 1);
|
||||
}
|
||||
|
||||
|
||||
if (post != null && post.containsKey("import")) {
|
||||
final List<OAIPMHImporter> jobs = new ArrayList<OAIPMHImporter>();
|
||||
for (OAIPMHImporter job: OAIPMHImporter.runningJobs.keySet()) jobs.add(job);
|
||||
for (OAIPMHImporter job: OAIPMHImporter.startedJobs.keySet()) jobs.add(job);
|
||||
for (OAIPMHImporter job: OAIPMHImporter.finishedJobs.keySet()) jobs.add(job);
|
||||
|
||||
|
||||
boolean dark = false;
|
||||
int count = 0;
|
||||
for (final OAIPMHImporter job: jobs) {
|
||||
|
|
|
@ -44,7 +44,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class IndexImportOAIPMH_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class IndexShare_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// $LastChangedBy$
|
||||
//
|
||||
// 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
|
||||
|
@ -31,12 +31,12 @@ import de.anomic.server.serverObjects;
|
|||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class Load_MediawikiWiki {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
// define visible variables
|
||||
String a = sb.peers.mySeed().getPublicAddress();
|
||||
if (a == null) a = "localhost:" + sb.getConfig("port", "8090");
|
||||
|
@ -44,7 +44,7 @@ public class Load_MediawikiWiki {
|
|||
final String repository = "http://" + a + "/repository/";
|
||||
prop.put("starturl", (intranet) ? repository : "http://");
|
||||
prop.put("address", a);
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// $LastChangedBy$
|
||||
//
|
||||
// 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
|
||||
|
@ -31,12 +31,12 @@ import de.anomic.server.serverObjects;
|
|||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class Load_PHPBB3 {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
// define visible variables
|
||||
String a = sb.peers.mySeed().getPublicAddress();
|
||||
if (a == null) a = "localhost:" + sb.getConfig("port", "8090");
|
||||
|
@ -44,7 +44,7 @@ public class Load_PHPBB3 {
|
|||
final String repository = "http://" + a + "/repository/";
|
||||
prop.put("starturl", (intranet) ? repository : "http://");
|
||||
prop.put("address", a);
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class Load_RSS_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard)env;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//MessageSend_p.java
|
||||
//MessageSend_p.java
|
||||
//-----------------------
|
||||
//part of the AnomicHTTPD caching proxy
|
||||
//(C) by Michael Peter Christen; mc@yacy.net
|
||||
|
@ -35,7 +35,6 @@ import net.yacy.cora.protocol.RequestHeader;
|
|||
import net.yacy.peers.Protocol;
|
||||
import net.yacy.peers.Seed;
|
||||
import net.yacy.search.Switchboard;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
|
@ -47,7 +46,7 @@ public class MessageSend_p {
|
|||
}
|
||||
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class PeerLoadPicture {
|
||||
|
||||
public static Image respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static Image respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
int width = 800;
|
||||
int height = 600;
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
// (C) by Michael Peter Christen; mc@yacy.net
|
||||
// first published on http:// www.yacy.net
|
||||
// Frankfurt, Germany, 19.12.2008
|
||||
//
|
||||
//
|
||||
// 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
|
||||
|
@ -23,13 +23,12 @@ import java.util.Iterator;
|
|||
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.kelondro.workflow.WorkflowProcessor;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class PerformanceConcurrency_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch sb) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch sb) {
|
||||
// return variable that accumulates replacements
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
@ -42,11 +41,11 @@ public class PerformanceConcurrency_p {
|
|||
blocktime_total += p.getBlockTime();
|
||||
exectime_total += p.getExecTime();
|
||||
passontime_total += p.getPassOnTime();
|
||||
}
|
||||
}
|
||||
if (blocktime_total == 0) blocktime_total = 1;
|
||||
if (exectime_total == 0) exectime_total = 1;
|
||||
if (passontime_total == 0) passontime_total = 1;
|
||||
|
||||
|
||||
// set templates for latest news from the threads
|
||||
long blocktime, exectime, passontime;
|
||||
threads = WorkflowProcessor.processes();
|
||||
|
@ -56,7 +55,7 @@ public class PerformanceConcurrency_p {
|
|||
p = threads.next();
|
||||
cycles = p.getExecCount();
|
||||
if (cycles == 0) cycles = 1; // avoid division by zero
|
||||
|
||||
|
||||
// set values to templates
|
||||
prop.put("table_" + c + "_threadname", p.getName());
|
||||
prop.putHTML("table_" + c + "_longdescr", p.getDescription());
|
||||
|
@ -64,7 +63,7 @@ public class PerformanceConcurrency_p {
|
|||
prop.put("table_" + c + "_queuesizemax", p.queueSizeMax());
|
||||
prop.put("table_" + c + "_concurrency", p.concurrency());
|
||||
prop.putHTML("table_" + c + "_childs", p.getChilds());
|
||||
|
||||
|
||||
blocktime = p.getBlockTime();
|
||||
exectime = p.getExecTime();
|
||||
passontime = p.getPassOnTime();
|
||||
|
@ -75,7 +74,7 @@ public class PerformanceConcurrency_p {
|
|||
prop.putNum("table_" + c + "_blockwritetime", passontime / cycles);
|
||||
prop.putNum("table_" + c + "_blockwritepercent", 100 * passontime / passontime_total);
|
||||
prop.putNum("table_" + c + "_totalcycles", p.getExecCount());
|
||||
|
||||
|
||||
// set a color for the line to show problems
|
||||
boolean problem = false;
|
||||
boolean warning = false;
|
||||
|
|
|
@ -33,7 +33,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class PerformanceGraph {
|
||||
|
||||
public static RasterPlotter respond(final RequestHeader header, serverObjects post, final serverSwitch env) {
|
||||
public static RasterPlotter respond(@SuppressWarnings("unused") final RequestHeader header, serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
if (post == null) post = new serverObjects();
|
||||
|
|
|
@ -49,7 +49,7 @@ public class PerformanceMemory_p {
|
|||
private static final long MB = 1024 * KB;
|
||||
private static Map<String, String> defaultSettings = null;
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
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 (defaultSettings == null) {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// $LastChangedBy$
|
||||
//
|
||||
// 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
|
||||
|
@ -30,16 +30,15 @@ import java.util.Iterator;
|
|||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.peers.graphics.ProfilingGraph;
|
||||
import net.yacy.search.EventTracker;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class PerformanceSearch_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch sb) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch sb) {
|
||||
// return variable that accumulates replacements
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
final Iterator<EventTracker.Event> events = EventTracker.getHistory(EventTracker.EClass.SEARCH);
|
||||
int c = 0;
|
||||
if (events != null) {
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ProxyIndexingMonitor_p {
|
|||
// if (date == null) return ""; else return dayFormatter.format(date);
|
||||
// }
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -140,7 +140,7 @@ public class Ranking_p {
|
|||
}
|
||||
}
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
// clean up all search events
|
||||
|
|
|
@ -42,7 +42,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class RemoteCrawl_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -36,7 +36,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class SearchEventPicture {
|
||||
|
||||
public static RasterPlotter respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static RasterPlotter respond(final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final String eventID = header.get("event", SearchEventCache.lastEventID);
|
||||
if (eventID == null) return null;
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
* 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 <http://www.gnu.org/licenses/>.
|
||||
|
@ -30,15 +30,14 @@ import net.yacy.cora.protocol.Scanner.Access;
|
|||
import net.yacy.kelondro.data.meta.DigestURI;
|
||||
import net.yacy.kelondro.logging.Log;
|
||||
import net.yacy.search.Switchboard;
|
||||
|
||||
import de.anomic.data.WorkTables;
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class ServerScannerList {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard)env;
|
||||
|
||||
|
@ -46,12 +45,12 @@ public class ServerScannerList {
|
|||
prop.put("servertable_edit", edit ? 1 : 0);
|
||||
prop.put("embedded", post == null ? 0 : post.containsKey("embedded") ? 1 : 0);
|
||||
prop.put("servertable", 0);
|
||||
|
||||
|
||||
// write scan table
|
||||
if (Scanner.scancacheSize() > 0) {
|
||||
// make a comment cache
|
||||
final Map<byte[], String> apiCommentCache = WorkTables.commentCache(sb);
|
||||
|
||||
|
||||
// show scancache table
|
||||
prop.put("servertable", 1);
|
||||
String urlString;
|
||||
|
@ -93,5 +92,5 @@ public class ServerScannerList {
|
|||
}
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class Table_API_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import de.anomic.server.serverObjects;
|
|||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class Table_RobotsTxt_p {
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
return new serverObjects();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
|
||||
public class Table_YMark_p {
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class Tables_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class Threaddump_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
serverObjects prop = new serverObjects();
|
||||
Switchboard sb = (Switchboard) env;
|
||||
|
|
|
@ -6,7 +6,7 @@ import de.anomic.server.servletProperties;
|
|||
//dummy class
|
||||
public class Trails {
|
||||
|
||||
public static servletProperties respond(final RequestHeader requestHeader, final serverObjects post, final serverSwitch env) {
|
||||
public static servletProperties respond(@SuppressWarnings("unused") final RequestHeader requestHeader, @SuppressWarnings("unused") final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
final servletProperties prop = new servletProperties();
|
||||
return prop;
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class Triple_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header,
|
||||
final serverObjects post, final serverSwitch env) {
|
||||
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
|
||||
|
|
|
@ -5,7 +5,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public final class Triplestore_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header,
|
||||
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();
|
||||
|
@ -16,7 +16,7 @@ public final class Triplestore_p {
|
|||
|
||||
env.setConfig("triplestore.persistent",
|
||||
"on".equals(post.get("tspersistentenabled")) ? true : false);
|
||||
|
||||
|
||||
// env.setConfig("interaction.feedback.accept",
|
||||
// "on".equals(post.get("acceptfeedbackenabled")) ? true : false);
|
||||
|
||||
|
@ -27,7 +27,7 @@ public final class Triplestore_p {
|
|||
|
||||
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());
|
||||
|
|
|
@ -42,7 +42,7 @@ import de.anomic.server.servletProperties;
|
|||
|
||||
public class User{
|
||||
|
||||
public static servletProperties respond(final RequestHeader requestHeader, final serverObjects post, final serverSwitch env) {
|
||||
public static servletProperties respond(final RequestHeader requestHeader, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
final servletProperties prop = new servletProperties();
|
||||
final Switchboard sb = Switchboard.getSwitchboard();
|
||||
UserDB.Entry entry=null;
|
||||
|
|
|
@ -40,13 +40,12 @@ import net.yacy.cora.protocol.RequestHeader;
|
|||
import net.yacy.kelondro.logging.GuiHandler;
|
||||
import net.yacy.kelondro.logging.Log;
|
||||
import net.yacy.kelondro.logging.LogalizerHandler;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class ViewLog_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
String[] log = new String[0];
|
||||
boolean reversed = false;
|
||||
|
@ -58,7 +57,7 @@ public class ViewLog_p {
|
|||
* interface.
|
||||
*/
|
||||
String filter = ".*.*";
|
||||
|
||||
|
||||
if(post != null){
|
||||
reversed = (post.containsKey("mode") && "reversed".equals(post.get("mode")));
|
||||
json = post.containsKey("json");
|
||||
|
@ -84,13 +83,13 @@ public class ViewLog_p {
|
|||
displaySubmenu = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
prop.put("submenu", displaySubmenu ? "1" : "0");
|
||||
prop.put("reverseChecked", reversed ? "1" : "0");
|
||||
prop.put("lines", lines);
|
||||
prop.put("maxlines",maxlines);
|
||||
prop.putHTML("filter", filter);
|
||||
|
||||
|
||||
// trying to compile the regular expression filter expression
|
||||
Matcher filterMatcher = null;
|
||||
try {
|
||||
|
@ -133,7 +132,7 @@ public class ViewLog_p {
|
|||
lc++;
|
||||
}
|
||||
prop.put("log", lc);
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class Vocabulary_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
Collection<Tagging> vocs = LibraryProvider.autotagging.getVocabularies();
|
||||
|
|
|
@ -14,7 +14,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
|
||||
public class WatchWebStructure_p {
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public class WebStructurePicture_p {
|
|||
|
||||
private static final double maxlongd = Long.MAX_VALUE;
|
||||
|
||||
public static RasterPlotter respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static RasterPlotter respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
String color_text = "888888";
|
||||
|
|
|
@ -33,7 +33,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class WikiHelp {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
//final plasmaSwitchboard sb = (plasmaSwitchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
return prop;
|
||||
|
|
|
@ -21,7 +21,7 @@ public class YBRFetch_p
|
|||
{
|
||||
|
||||
public static servletProperties respond(
|
||||
final RequestHeader requestHeader,
|
||||
@SuppressWarnings("unused") final RequestHeader requestHeader,
|
||||
final serverObjects post,
|
||||
final serverSwitch env) {
|
||||
final servletProperties prop = new servletProperties();
|
||||
|
|
|
@ -6,7 +6,7 @@ import de.anomic.server.serverObjects;
|
|||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class YMarks {
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
final UserDB.Entry user = sb.userDB.getUser(header);
|
||||
|
|
|
@ -4,14 +4,13 @@ import java.util.List;
|
|||
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.kelondro.util.FileUtils;
|
||||
|
||||
import de.anomic.data.ListManager;
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class blacklists {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS"));
|
||||
|
@ -19,7 +18,7 @@ public class blacklists {
|
|||
int blacklistCount = 0;
|
||||
|
||||
final String blackListName = (post == null) ? "" : post.get("listname", "");
|
||||
|
||||
|
||||
if (dirlist != null) {
|
||||
for (final String element : dirlist) {
|
||||
if ("".equals(blackListName) || element.equals(blackListName)) {
|
||||
|
@ -53,5 +52,5 @@ public class blacklists {
|
|||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,17 +5,16 @@ import java.util.List;
|
|||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.kelondro.util.FileUtils;
|
||||
import net.yacy.repository.Blacklist.BlacklistType;
|
||||
|
||||
import de.anomic.data.ListManager;
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class blacklists_p {
|
||||
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS"));
|
||||
final List<String> dirlist = FileUtils.getDirListing(ListManager.listsPath);
|
||||
int blacklistCount=0;
|
||||
|
@ -62,10 +61,10 @@ public class blacklists_p {
|
|||
}
|
||||
}
|
||||
prop.put("lists", blacklistCount);
|
||||
|
||||
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,17 +5,16 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class config_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
//plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
//change a Key
|
||||
if(post != null && post.containsKey("key") && post.containsKey("value")) {
|
||||
final String key = post.get("key");
|
||||
|
@ -24,9 +23,9 @@ public class config_p {
|
|||
env.setConfig(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final Iterator<String> keys = env.configKeys();
|
||||
|
||||
|
||||
final List<String> list = new ArrayList<String>(250);
|
||||
|
||||
while (keys.hasNext()) {
|
||||
|
@ -34,18 +33,18 @@ public class config_p {
|
|||
}
|
||||
|
||||
Collections.sort(list);
|
||||
|
||||
|
||||
int count=0;
|
||||
|
||||
|
||||
for (final String key : list) {
|
||||
prop.putHTML("options_" + count + "_key", key);
|
||||
prop.putHTML("options_" + count + "_value", env.getConfig(key, "ERROR"));
|
||||
count++;
|
||||
count++;
|
||||
}
|
||||
prop.put("options", count);
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class getpageinfo {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class getpageinfo_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -28,15 +28,15 @@ import java.util.Map;
|
|||
import net.yacy.cora.date.GenericFormatter;
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import de.anomic.crawler.Latency;
|
||||
import de.anomic.crawler.NoticedURL;
|
||||
import de.anomic.crawler.Latency.Host;
|
||||
import de.anomic.crawler.NoticedURL;
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class latency_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
//final plasmaSwitchboard sb = (plasmaSwitchboard) env;
|
||||
final Iterator<Map.Entry<String, Host>> i = Latency.iterator();
|
||||
|
@ -56,9 +56,9 @@ public class latency_p {
|
|||
c++;
|
||||
}
|
||||
prop.put("domains", c);
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class schema_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
@ -50,7 +50,7 @@ public class schema_p {
|
|||
}
|
||||
}
|
||||
prop.put("fields", c);
|
||||
|
||||
|
||||
prop.put("solruniquekey",SolrField.id.getSolrFieldName());
|
||||
prop.put("solrdefaultsearchfield",SolrField.text_t.getSolrFieldName());
|
||||
// return rewrite properties
|
||||
|
|
|
@ -40,7 +40,7 @@ public class status_p {
|
|||
public static final String STATE_RUNNING = "running";
|
||||
public static final String STATE_PAUSED = "paused";
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -37,7 +37,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class termlist_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final Log log = new Log("TERMLIST");
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// $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
|
||||
|
@ -31,11 +31,11 @@ import de.anomic.server.serverObjects;
|
|||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class trail_p {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
int c = 0;
|
||||
for (String t: sb.trail) {
|
||||
prop.put("trails_" + c++ + "_trail", t); // don't put in putHTML or putXML in, this is wrong!
|
||||
|
@ -43,5 +43,5 @@ public class trail_p {
|
|||
prop.put("trails", c);
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -7,17 +7,17 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class version {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
prop.put("versionstring", yacyBuildProperties.getLongVersion());
|
||||
prop.put("svnRev", yacyBuildProperties.getSVNRevision());
|
||||
prop.put("buildDate", yacyBuildProperties.getBuildDate());
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
9
htroot/env/style.java
vendored
9
htroot/env/style.java
vendored
|
@ -20,13 +20,12 @@
|
|||
import java.util.Iterator;
|
||||
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class style {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
Iterator<String> i = env.configKeys();
|
||||
String key;
|
||||
|
@ -34,9 +33,9 @@ public class style {
|
|||
key = i.next();
|
||||
if (key.startsWith("color_")) prop.put(key, env.getConfig(key, "#000000"));
|
||||
}
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// imagetest.java
|
||||
// imagetest.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@yacy.net
|
||||
|
@ -31,22 +31,22 @@ import de.anomic.server.serverObjects;
|
|||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class imagetest {
|
||||
|
||||
public static RasterPlotter respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
public static RasterPlotter respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
/*
|
||||
BufferedImage bi = new BufferedImage(640, 400, BufferedImage.TYPE_INT_RGB);
|
||||
BufferedImage bi = new BufferedImage(640, 400, BufferedImage.TYPE_INT_RGB);
|
||||
Graphics2D g = bi.createGraphics();
|
||||
g.setBackground(Color.white);
|
||||
g.clearRect(0, 0, 640, 400);
|
||||
|
||||
|
||||
g.setColor(new Color(200, 200, 0));
|
||||
g.drawRect(100, 50, 40, 30);
|
||||
|
||||
|
||||
g.setColor(new Color(0, 0, 200));
|
||||
try {
|
||||
Class[] pType = {Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE};
|
||||
Object[] pParam = new Integer[]{new Integer(66), new Integer(55), new Integer(80), new Integer(80)};
|
||||
|
||||
|
||||
String com = "drawRect";
|
||||
Method m = g.getClass().getMethod(com, pType);
|
||||
Object result = m.invoke(g, pParam);
|
||||
|
@ -57,7 +57,7 @@ public class imagetest {
|
|||
} catch (InvocationTargetException e) {
|
||||
Log.logException(e);
|
||||
}
|
||||
|
||||
|
||||
WritableRaster r = bi.getRaster();
|
||||
for (int i = 20; i < 100; i++) r.setPixel(i, 30, new int[]{255, 0, 0});
|
||||
for (int i = 20; i < 100; i++) r.setPixel(i, 32, new int[]{0, 255, 0});
|
||||
|
@ -112,7 +112,7 @@ public class imagetest {
|
|||
PrintTool.arcPrint(img, 550, 400, 100, angle, "ANGLE" + angle + ":" + (char) c);
|
||||
}
|
||||
return img;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class GetRDF {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class PutRDF {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
|
|
@ -6,7 +6,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class Document_part {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -2,34 +2,31 @@ package interaction_elements;
|
|||
|
||||
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.search.Switchboard;
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
|
||||
public class Footer {
|
||||
|
||||
public static serverObjects respond(final RequestHeader requestHeader, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader requestHeader, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
||||
prop.put("enabled_color", env.getConfig("color_tableheader", ""));
|
||||
|
||||
|
||||
int count = 0;
|
||||
|
||||
|
||||
prop.put("enabled_userlogonenabled", env.getConfigBool("interaction.userlogon.enabled", false) ? "1" : "0");
|
||||
if (env.getConfigBool("interaction.userlogon.enabled", false)) count++;
|
||||
|
||||
if (count > 0) {
|
||||
|
||||
if (count > 0) {
|
||||
prop.put("enabled", "1");
|
||||
prop.put("enabled_userlogonenabled_ratio", Math.round(100/count)-1);
|
||||
|
||||
|
||||
} else {
|
||||
prop.put("enabled", "0");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return prop;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package interaction_elements;
|
||||
|
||||
//ViewLog_p.java
|
||||
//ViewLog_p.java
|
||||
//-----------------------
|
||||
//part of the AnomicHTTPD caching proxy
|
||||
//(C) by Michael Peter Christen; mc@yacy.net
|
||||
|
@ -38,27 +38,27 @@ import de.anomic.server.serverSwitch;
|
|||
import de.anomic.server.servletProperties;
|
||||
|
||||
public class Loginstatus_part {
|
||||
|
||||
public static serverObjects respond(final RequestHeader requestHeader, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
|
||||
public static serverObjects respond(final RequestHeader requestHeader, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
|
||||
final servletProperties prop = new servletProperties();
|
||||
|
||||
|
||||
prop.put("enabled", env.getConfigBool("interaction.userlogon.enabled", false) ? "1" : "0");
|
||||
|
||||
|
||||
prop.put("enabled_color", env.getConfig("color_tableheader", ""));
|
||||
|
||||
prop.put("enabled_logged-in_registrationenabled", env.getConfigBool("interaction.userselfregistration.enabled", false) ? "1" : "0");
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
// final String address = sb.peers.mySeed().getPublicAddress();
|
||||
|
||||
|
||||
prop.put("enabled_peer", sb.peers.myName());
|
||||
|
||||
|
||||
prop.put("enabled_logged-in_returnto", "/index.html");
|
||||
|
||||
|
||||
|
||||
|
||||
UserDB.Entry entry=null;
|
||||
|
||||
//default values
|
||||
|
@ -82,7 +82,7 @@ public class Loginstatus_part {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//identified via userDB
|
||||
if(entry != null){
|
||||
prop.put("enabled_logged-in", "1");
|
||||
|
@ -106,9 +106,9 @@ public class Loginstatus_part {
|
|||
//identified via form-login
|
||||
//TODO: this does not work for a static admin, yet.
|
||||
}
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class OverlayInteraction {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
@ -15,10 +15,10 @@ public class OverlayInteraction {
|
|||
prop.put("enabled_url", post.get("url", ""));
|
||||
|
||||
prop.put("enabled_urlhash", post.get("urlhash", ""));
|
||||
|
||||
|
||||
prop.put("enabled_action", post.get("action", ""));
|
||||
|
||||
prop.put("enabled_color", env.getConfig("color_tableheader", ""));
|
||||
|
||||
prop.put("enabled_color", env.getConfig("color_tableheader", ""));
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class Tag_part {
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
|
||||
final serverObjects prop = new serverObjects();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import de.anomic.server.serverSwitch;
|
|||
public class mediawiki_p {
|
||||
|
||||
//http://localhost:8090/mediawiki_p.html?dump=wikipedia.de.xml&title=Kartoffel
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) throws IOException {
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) throws IOException {
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
final serverObjects prop = new serverObjects();
|
||||
prop.put("title", "");
|
||||
|
|
|
@ -12,14 +12,14 @@ import de.anomic.server.serverSwitch;
|
|||
|
||||
public class osm {
|
||||
|
||||
public static RasterPlotter respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
public static RasterPlotter respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||||
|
||||
int zoom = 10;
|
||||
float lat = 50.11670f;
|
||||
float lon = 8.68333f;
|
||||
int width = 3;
|
||||
int height = 3;
|
||||
|
||||
|
||||
if (post != null) {
|
||||
zoom = post.getInt("zoom", zoom);
|
||||
lat = post.getFloat("lat", lat);
|
||||
|
@ -27,7 +27,7 @@ public class osm {
|
|||
width = post.getInt("width", width);
|
||||
height = post.getInt("height", height);
|
||||
}
|
||||
|
||||
|
||||
final OSMTile.tileCoordinates coord = new OSMTile.tileCoordinates(lat, lon, zoom);
|
||||
return OSMTile.getCombinedTiles(coord, width, height);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user