removed constants (no connection with yacySeed.dna identifier)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3320 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent fcc11391a8
commit e00e850a98

@ -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 properties
return prop;

@ -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 subject
final 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 peer
if (yacyCore.seedDB.mySeed == null || !yacyCore.seedDB.mySeed.hash.equals(youare)) {

@ -94,7 +94,6 @@ public final class kelondroMScoreCluster {
if (s.length() == shortDateFormatString.length()) {
// try a date
l = ((shortFormatter.parse(s).getTime() - date2000) / minutemillis);
if (l > (60 + ((System.currentTimeMillis() - date2000) / minutemillis))) l = 0; // future date, more than one hour
if (l < 0) l = 0;
} else {
// try a number

@ -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 request
result = 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 peer
if (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 address
String 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()));

@ -144,15 +144,10 @@ public class yacySeed {
public static final String CCOUNT = "CCount"; // Connection Count
public static final String CRWCNT = "CRWCnt"; // Citation Rank (Own) - Count
public 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 variables
public String hash;
private final Map dna;

Loading…
Cancel
Save