Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
removed constants (no connection with yacySeed.dna identifier)
orbitere00e850a9802
diff --git a/htroot/yacy/hello.java b/htroot/yacy/hello.javaindex 2354173dc..e5562bb04 100644--- a/htroot/yacy/hello.java+++ b/htroot/yacy/hello.java@@ -71,7 +71,7 @@ public final class hello {// final String pattern = (String) post.get("pattern", ""); //// final String mytime = (String) post.get(MYTIME, ""); //final String key = post.get("key", ""); // transmission key for response- final String seed = post.get(yacySeed.SEED, "");+ final String seed = post.get("seed", "");final String countStr = post.get("count", "0");int i;int count = 0;@@ -100,7 +100,7 @@ public final class hello {serverCore.checkInterruption();// try first the reportedip, since this may be a connect from a port-forwarding host- prop.putASIS(yacySeed.YOURIP, reportedip);+ prop.putASIS("yourip", reportedip);remoteSeed.put(yacySeed.IP, reportedip);urls = yacyClient.queryUrlCount(remoteSeed);}@@ -117,7 +117,7 @@ public final class hello {if(isNotLocal) {serverCore.checkInterruption();- prop.putASIS(yacySeed.YOURIP, clientip);+ prop.putASIS("yourip", clientip);remoteSeed.put(yacySeed.IP, clientip);urls = yacyClient.queryUrlCount(remoteSeed);}@@ -176,7 +176,7 @@ public final class hello {seeds.ensureCapacity((ySeeds.length + 1) * 768);for (i = 0; i < ySeeds.length; i++) {if ((ySeeds[i] != null) && (ySeeds[i].isProper() == null)) {- seeds.append(yacySeed.SEED).append(count).append(yacySeed.EQUAL).append(ySeeds[i].genSeedStr(key)).append(serverCore.crlfString);+ seeds.append("seed").append(count).append('=').append(ySeeds[i].genSeedStr(key)).append(serverCore.crlfString);count++;}}@@ -186,7 +186,7 @@ public final class hello {seeds.append("seed0=").append(yacyCore.seedDB.mySeed.genSeedStr(key)).append(serverCore.crlfString);}- prop.putASIS(yacySeed.MYTIME, yacyCore.universalDateShortString(new Date()));+ prop.putASIS("mytime", yacyCore.universalDateShortString(new Date()));prop.putASIS("seedlist", seeds.toString());// return rewrite propertiesreturn prop;diff --git a/htroot/yacy/query.java b/htroot/yacy/query.javaindex ecd5bc8b3..835416c81 100644--- a/htroot/yacy/query.java+++ b/htroot/yacy/query.java@@ -53,7 +53,6 @@ import de.anomic.plasma.plasmaSwitchboard;import de.anomic.server.serverObjects;import de.anomic.server.serverSwitch;import de.anomic.yacy.yacyCore;-import de.anomic.yacy.yacySeed;public final class query {@@ -73,7 +72,7 @@ public final class query {final String obj = post.get("object", ""); // keyword for query subjectfinal String env = post.get("env", ""); // argument to query- prop.putASIS(yacySeed.MYTIME, yacyCore.universalDateShortString(new Date()));+ prop.putASIS("mytime", yacyCore.universalDateShortString(new Date()));// check if we are the right target and requester has correct information about this peerif (yacyCore.seedDB.mySeed == null || !yacyCore.seedDB.mySeed.hash.equals(youare)) {diff --git a/source/de/anomic/kelondro/kelondroMScoreCluster.java b/source/de/anomic/kelondro/kelondroMScoreCluster.javaindex 84aa3fbb5..aff658459 100644--- a/source/de/anomic/kelondro/kelondroMScoreCluster.java+++ b/source/de/anomic/kelondro/kelondroMScoreCluster.java@@ -94,7 +94,6 @@ public final class kelondroMScoreCluster {if (s.length() == shortDateFormatString.length()) {// try a datel = ((shortFormatter.parse(s).getTime() - date2000) / minutemillis);- if (l > (60 + ((System.currentTimeMillis() - date2000) / minutemillis))) l = 0; // future date, more than one hourif (l < 0) l = 0;} else {// try a numberdiff --git a/source/de/anomic/yacy/yacyClient.java b/source/de/anomic/yacy/yacyClient.javaindex e7a8c0fb9..d2d957459 100644--- a/source/de/anomic/yacy/yacyClient.java+++ b/source/de/anomic/yacy/yacyClient.java@@ -124,9 +124,9 @@ public final class yacyClient {obj.put("pattern", "");obj.put("count", "20");obj.put("key", key);- obj.put(yacySeed.MYTIME, yacyCore.universalDateShortString(new Date()));+ obj.put("mytime", yacyCore.universalDateShortString(new Date()));obj.put("myUTC", System.currentTimeMillis());- obj.put(yacySeed.SEED, yacyCore.seedDB.mySeed.genSeedStr(key));+ obj.put("seed", yacyCore.seedDB.mySeed.genSeedStr(key));// sending requestresult = nxTools.table(@@ -173,7 +173,7 @@ public final class yacyClient {if (serverCore.portForwardingEnabled || serverCore.useStaticIP) {yacyCore.seedDB.mySeed.put(yacySeed.IP, serverCore.publicIP());} else {- yacyCore.seedDB.mySeed.put(yacySeed.IP, (String) result.get(yacySeed.YOURIP));+ yacyCore.seedDB.mySeed.put(yacySeed.IP, (String) result.get("yourip"));}/* If we have port forwarding enabled but the other peer uses a too old yacy version@@ -237,7 +237,7 @@ public final class yacyClient {int i = 0;int count = 0;String seedStr;- while ((seedStr = (String) result.get(yacySeed.SEED + i++)) != null) {+ while ((seedStr = (String) result.get("seed" + i++)) != null) {// integrate new seed into own database// the first seed, "seed0" is the seed of the responding peerif (yacyCore.peerActions.peerArrival(yacySeed.genRemoteSeed(seedStr, key, true), (i == 1))) count++;@@ -439,7 +439,7 @@ public final class yacyClient {obj.put("maxdist", maxDistance);obj.put("profile", crypt.simpleEncode(rankingProfile.toExternalString()));obj.put("constraint", constraint.exportB64());- obj.put(yacySeed.MYTIME, yacyCore.universalDateShortString(new Date()));+ obj.put("mytime", yacyCore.universalDateShortString(new Date()));if (abstractCache != null) obj.put("abstracts", "auto");//yacyCore.log.logDebug("yacyClient.search url=" + url);@@ -600,7 +600,7 @@ public final class yacyClient {post.put("process", "permission");post.put("iam", yacyCore.seedDB.mySeed.hash);post.put("youare", targetHash);- post.put(yacySeed.MYTIME, yacyCore.universalDateShortString(new Date()));+ post.put("mytime", yacyCore.universalDateShortString(new Date()));// get target addressString address = targetAddress(targetHash);@@ -642,7 +642,7 @@ public final class yacyClient {post.put("myseed", yacyCore.seedDB.mySeed.genSeedStr(key));post.put("youare", targetHash);post.put("subject", subject);- post.put(yacySeed.MYTIME, yacyCore.universalDateShortString(new Date()));+ post.put("mytime", yacyCore.universalDateShortString(new Date()));try {post.put("message", new String(message, "UTF-8"));} catch (UnsupportedEncodingException e) {@@ -813,7 +813,7 @@ public final class yacyClient {post.put("process", "crawl");post.put("iam", yacyCore.seedDB.mySeed.hash);post.put("youare", targetSeed.hash);- post.put(yacySeed.MYTIME, yacyCore.universalDateShortString(new Date()));+ post.put("mytime", yacyCore.universalDateShortString(new Date()));if (url.length == 1) {post.put("url", crypt.simpleEncode(url[0].toString()));post.put("referrer", crypt.simpleEncode((referrer[0] == null) ? "" : referrer[0].toString()));diff --git a/source/de/anomic/yacy/yacySeed.java b/source/de/anomic/yacy/yacySeed.javaindex 689d229cd..4fbf96a03 100644--- a/source/de/anomic/yacy/yacySeed.java+++ b/source/de/anomic/yacy/yacySeed.java@@ -144,15 +144,10 @@ public class yacySeed {public static final String CCOUNT = "CCount"; // Connection Countpublic static final String CRWCNT = "CRWCnt"; // Citation Rank (Own) - Countpublic static final String CRTCNT = "CRTCnt"; // Citation Rank (Other) - Count-public static final String IP = "IP";public static final String PORT = "Port";- public static final String YOURIP = "yourip";- public static final String MYTIME = "mytime";- public static final String SEED = "seed";- public static final String EQUAL = "=";public static final String ZERO = "0";-+// class variablespublic String hash;private final Map dna;