Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix to xml output format

Michael Peter Christene37709219828
diff --git a/htroot/api/webstructure.java b/htroot/api/webstructure.java
index 76aa60a52..7fd33a3d8 100644
--- a/htroot/api/webstructure.java
+++ b/htroot/api/webstructure.java
@@ -42,7 +42,6 @@ import net.yacy.kelondro.rwi.ReferenceContainer;
import net.yacy.peers.graphics.WebStructureGraph;
import net.yacy.search.Switchboard;
import net.yacy.search.index.Segments;
-
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
@@ -110,13 +109,13 @@ public class webstructure {
prop.put("references_documents_0_count", scraper.inboundLinkCount() + scraper.outboundLinkCount());
prop.put("references_documents_0_date", GenericFormatter.SHORT_DAY_FORMATTER.format(new Date()));
prop.put("references_documents_0_urle", url == null ? 0 : 1);
- if (url != null) prop.put("references_documents_0_urle_url", url.toNormalform(true, false));
+ if (url != null) prop.putXML("references_documents_0_urle_url", url.toNormalform(true, false));
int d = 0;
Iterator<MultiProtocolURI> i = scraper.inboundLinks().iterator();
while (i.hasNext()) {
DigestURI refurl = new DigestURI(i.next());
byte[] refhash = refurl.hash();
- prop.put("references_documents_0_anchors_" + d + "_url", refurl.toNormalform(true, false));
+ prop.putXML("references_documents_0_anchors_" + d + "_url", refurl.toNormalform(true, false));
prop.put("references_documents_0_anchors_" + d + "_hash", refhash);
prop.put("references_documents_0_anchors_" + d + "_outbound", 0);
d++;
@@ -125,7 +124,7 @@ public class webstructure {
while (i.hasNext()) {
DigestURI refurl = new DigestURI(i.next());
byte[] refhash = refurl.hash();
- prop.put("references_documents_0_anchors_" + d + "_url", refurl.toNormalform(true, false));
+ prop.putXML("references_documents_0_anchors_" + d + "_url", refurl.toNormalform(true, false));
prop.put("references_documents_0_anchors_" + d + "_hash", refhash);
prop.put("references_documents_0_anchors_" + d + "_outbound", 1);
d++;
@@ -136,7 +135,7 @@ public class webstructure {
prop.put("references_count", 0);
prop.put("references_documents", 0);
}
-
+
// citations
prop.put("citations", 1);
IndexCell<CitationReference> citationReferences = sb.indexSegments.segment(Segments.Process.PUBLIC).urlCitation();
@@ -153,7 +152,7 @@ public class webstructure {
prop.put("citations_documents_0_count", citations.size());
prop.put("citations_documents_0_date", GenericFormatter.SHORT_DAY_FORMATTER.format(new Date(citations.lastWrote())));
prop.put("citations_documents_0_urle", url == null ? 0 : 1);
- if (url != null) prop.put("citations_documents_0_urle_url", url.toNormalform(true, false));
+ if (url != null) prop.putXML("citations_documents_0_urle_url", url.toNormalform(true, false));
int d = 0;
Iterator<CitationReference> i = citations.entries();
while (i.hasNext()) {
@@ -161,7 +160,7 @@ public class webstructure {
byte[] refhash = cr.urlhash();
DigestURI refurl = authenticated ? sb.getURL(Segments.Process.PUBLIC, refhash) : null;
prop.put("citations_documents_0_anchors_" + d + "_urle", refurl == null ? 0 : 1);
- if (refurl != null) prop.put("citations_documents_0_anchors_" + d + "_urle_url", refurl.toNormalform(true, false));
+ if (refurl != null) prop.putXML("citations_documents_0_anchors_" + d + "_urle_url", refurl.toNormalform(true, false));
prop.put("citations_documents_0_anchors_" + d + "_urle_hash", refhash);
prop.put("citations_documents_0_anchors_" + d + "_urle_date", GenericFormatter.SHORT_DAY_FORMATTER.format(new Date(cr.lastModified())));
d++;
@@ -194,7 +193,7 @@ public class webstructure {
}
prop.put("out_maxref", WebStructureGraph.maxref);
prop.put("maxhosts", WebStructureGraph.maxhosts);
-
+
// return rewrite properties
return prop;
}