diff --git a/htroot/processing/domaingraph/applet/domaingraph.jar b/htroot/processing/domaingraph/applet/domaingraph.jar
index b3d7de50c..2f95b9070 100755
Binary files a/htroot/processing/domaingraph/applet/domaingraph.jar and b/htroot/processing/domaingraph/applet/domaingraph.jar differ
diff --git a/htroot/processing/domaingraph/applet/domaingraph.java b/htroot/processing/domaingraph/applet/domaingraph.java
index a8a8b588e..bc84521f5 100755
--- a/htroot/processing/domaingraph/applet/domaingraph.java
+++ b/htroot/processing/domaingraph/applet/domaingraph.java
@@ -1,4 +1,4 @@
-import processing.core.*; import traer.physics.*; import traer.animation.*; import processing.net.*; import java.applet.*; import java.awt.*; import java.awt.image.*; import java.awt.event.*; import java.io.*; import java.net.*; import java.text.*; import java.util.*; import java.util.zip.*; import javax.sound.midi.*; import javax.sound.midi.spi.*; import javax.sound.sampled.*; import javax.sound.sampled.spi.*; import java.util.regex.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.sax.*; import javax.xml.transform.stream.*; import org.xml.sax.*; import org.xml.sax.ext.*; import org.xml.sax.helpers.*; public class domaingraph extends PApplet {// Domain visualization graph for YaCy
+import processing.core.*; import traer.physics.*; import traer.animation.*; import processing.net.*; import java.applet.*; import java.awt.*; import java.awt.image.*; import java.awt.event.*; import java.io.*; import java.net.*; import java.text.*; import java.util.*; import java.util.zip.*; public class domaingraph extends PApplet {// Domain visualization graph for YaCy
// by Michael Christen
//
// this applet uses code and the physics engine from
@@ -96,7 +96,7 @@ public void draw() {
public void initRequest(boolean update) {
myClient = new Client(this, host, port);
- myClient.write((update) ? "GET /xml/webstructure.xml?latest= HTTP/1.1\n" : "GET /xml/webstructure.xml HTTP/1.1\n");
+ myClient.write((update) ? "GET /api/webstructure.xml?latest= HTTP/1.1\n" : "GET /xml/webstructure.xml HTTP/1.1\n");
myClient.write("Host: localhost\n\n");
}
@@ -111,8 +111,31 @@ public void processRequestResponse(int steps) {
String line = myClient.readStringUntil((byte) 10);
//println("Line: " + line);
if (line == null) line = ""; else line = line.trim();
- if (line.startsWith("
+ www.catb.org
+ oreilly.com
+ www.oreillynet.com
+
+
+ */
+ int p = line.indexOf("= 0) {
+ //println("domain :" + line.substring(p + 8, line.length() - 1).trim());
+ processDomain(parseProps(line.substring(p + 8, line.length() - 1).trim()));
+ }
+ p = line.indexOf("= 0) {
+ int q = line.indexOf("");
+ if (q > 0) {
+ int r = line.lastIndexOf('>', q);
+ if (r > 0) {
+ String refhost = line.substring(r, q);
+ //println("reference:" + line.substring(p + 11, r).trim());
+ processCitation(refhost, parseProps(line.substring(p + 11, r).trim()));
+ }
+ }
+ }
lastUpdate = System.currentTimeMillis();
} else {
initTime = false;
@@ -135,9 +158,8 @@ public void processDomain(HashMap props) {
addAttraction(h.node);
}
-public void processCitation(HashMap props) {
+public void processCitation(String host, HashMap props) {
//println("Citation: " + props.toString());
- String host = (String) props.get("host"); if (host == null) host = "";
String id = (String) props.get("id"); if (id == null) id = "";
int count = 0;
try {
diff --git a/htroot/processing/domaingraph/applet/domaingraph.pde b/htroot/processing/domaingraph/applet/domaingraph.pde
index 8936c07a3..1dfbb495a 100755
--- a/htroot/processing/domaingraph/applet/domaingraph.pde
+++ b/htroot/processing/domaingraph/applet/domaingraph.pde
@@ -96,7 +96,7 @@ void draw() {
void initRequest(boolean update) {
myClient = new Client(this, host, port);
- myClient.write((update) ? "GET /xml/webstructure.xml?latest= HTTP/1.1\n" : "GET /xml/webstructure.xml HTTP/1.1\n");
+ myClient.write((update) ? "GET /api/webstructure.xml?latest= HTTP/1.1\n" : "GET /xml/webstructure.xml HTTP/1.1\n");
myClient.write("Host: localhost\n\n");
}
@@ -111,8 +111,31 @@ void processRequestResponse(int steps) {
String line = myClient.readStringUntil((byte) 10);
//println("Line: " + line);
if (line == null) line = ""; else line = line.trim();
- if (line.startsWith("
+ www.catb.org
+ oreilly.com
+ www.oreillynet.com
+
+
+ */
+ int p = line.indexOf("= 0) {
+ //println("domain :" + line.substring(p + 8, line.length() - 1).trim());
+ processDomain(parseProps(line.substring(p + 8, line.length() - 1).trim()));
+ }
+ p = line.indexOf("= 0) {
+ int q = line.indexOf("");
+ if (q > 0) {
+ int r = line.lastIndexOf('>', q);
+ if (r > 0) {
+ String refhost = line.substring(r, q);
+ //println("reference:" + line.substring(p + 11, r).trim());
+ processCitation(refhost, parseProps(line.substring(p + 11, r).trim()));
+ }
+ }
+ }
lastUpdate = System.currentTimeMillis();
} else {
initTime = false;
@@ -135,9 +158,8 @@ void processDomain(HashMap props) {
addAttraction(h.node);
}
-void processCitation(HashMap props) {
+void processCitation(String host, HashMap props) {
//println("Citation: " + props.toString());
- String host = (String) props.get("host"); if (host == null) host = "";
String id = (String) props.get("id"); if (id == null) id = "";
int count = 0;
try {
diff --git a/htroot/processing/domaingraph/domaingraph.pde b/htroot/processing/domaingraph/domaingraph.pde
index 8936c07a3..1dfbb495a 100755
--- a/htroot/processing/domaingraph/domaingraph.pde
+++ b/htroot/processing/domaingraph/domaingraph.pde
@@ -96,7 +96,7 @@ void draw() {
void initRequest(boolean update) {
myClient = new Client(this, host, port);
- myClient.write((update) ? "GET /xml/webstructure.xml?latest= HTTP/1.1\n" : "GET /xml/webstructure.xml HTTP/1.1\n");
+ myClient.write((update) ? "GET /api/webstructure.xml?latest= HTTP/1.1\n" : "GET /xml/webstructure.xml HTTP/1.1\n");
myClient.write("Host: localhost\n\n");
}
@@ -111,8 +111,31 @@ void processRequestResponse(int steps) {
String line = myClient.readStringUntil((byte) 10);
//println("Line: " + line);
if (line == null) line = ""; else line = line.trim();
- if (line.startsWith("
+ www.catb.org
+ oreilly.com
+ www.oreillynet.com
+
+
+ */
+ int p = line.indexOf("= 0) {
+ //println("domain :" + line.substring(p + 8, line.length() - 1).trim());
+ processDomain(parseProps(line.substring(p + 8, line.length() - 1).trim()));
+ }
+ p = line.indexOf("= 0) {
+ int q = line.indexOf("");
+ if (q > 0) {
+ int r = line.lastIndexOf('>', q);
+ if (r > 0) {
+ String refhost = line.substring(r, q);
+ //println("reference:" + line.substring(p + 11, r).trim());
+ processCitation(refhost, parseProps(line.substring(p + 11, r).trim()));
+ }
+ }
+ }
lastUpdate = System.currentTimeMillis();
} else {
initTime = false;
@@ -135,9 +158,8 @@ void processDomain(HashMap props) {
addAttraction(h.node);
}
-void processCitation(HashMap props) {
+void processCitation(String host, HashMap props) {
//println("Citation: " + props.toString());
- String host = (String) props.get("host"); if (host == null) host = "";
String id = (String) props.get("id"); if (id == null) id = "";
int count = 0;
try {