added information about inbound, outbound and citation links into

yacydoc api servlet
pull/1/head
Michael Christen 13 years ago
parent 71649a1296
commit 8f89c8ef07

@ -39,6 +39,11 @@ you can validate it with http://validator.w3.org/
<dt>Referrer URL</dt><dd property="yacy:referrer.url">#[yacy_referrer_url]#</dd>
<dt>Document size</dt><dd property="yacy:size">#[yacy_size]#</dd>
<dt>Number of Words</dt><dd property="yacy:words">#[yacy_words]#</dd>
<dt>Inbound Links (anchors)</dt><dd property="yacy:inbound">#[yacy_inbound]#</dd>
<dt>Outbound Links (anchors)</dt><dd property="yacy:outbound">#[yacy_outbound]#</dd>
<dt>Incoming Links (citation)</dt><dd property="yacy:citations">#[yacy_citations]#</dd>
<dt>Location</dt><dd><a href="/osm.png?lon=#[geo_long]#&lat=#[geo_lat]#&zoom=14" onclick="return hs.expand(this)">lat=#[geo_lat]#, lon=#[geo_long]#</a></dd>
</dl>

@ -67,6 +67,18 @@ public class yacydoc {
prop.put("dc_type", "");
prop.put("dc_identifier", "");
prop.put("dc_language", "");
prop.put("geo_lat", "");
prop.put("geo_long", "");
prop.put("yacy_urlhash", "");
prop.putXML("yacy_loaddate", "");
prop.putXML("yacy_referrer_hash", "");
prop.putXML("yacy_referrer_url", "");
prop.put("yacy_size", "");
prop.put("yacy_words", "");
prop.put("yacy_citations", "");
prop.put("yacy_inbound", "");
prop.put("yacy_outbound", "");
if (post == null) return prop;
@ -110,7 +122,10 @@ public class yacydoc {
prop.putXML("yacy_referrer_hash", (le == null) ? "" : ASCII.String(le.hash()));
prop.putXML("yacy_referrer_url", (le == null) ? "" : le.url().toNormalform(false, true));
prop.put("yacy_size", entry.size());
prop.put("yacy_words",entry.wordCount());
prop.put("yacy_words", entry.wordCount());
prop.put("yacy_citations", sb.indexSegments.segment(Segments.Process.PUBLIC).urlCitation().count(entry.hash()));
prop.put("yacy_inbound", entry.llocal());
prop.put("yacy_outbound", entry.lother());
// return rewrite properties
return prop;

@ -29,5 +29,10 @@ you can validate it with http://www.stg.brown.edu/service/xmlvalid/
<yacy:referrer.hash>yacy:urlhash:#[yacy_referrer_hash]#</yacy:referrer.hash>
<yacy:referrer.url>#[yacy_referrer_url]#</yacy:referrer.url>
<yacy:words>#[yacy_words]#</yacy:words>
<yacy:inbound>#[yacy_inbound]#</yacy:inbound>
<yacy:outbound>#[yacy_outbound]#</yacy:outbound>
<yacy:citations>#[yacy_citations]#</yacy:citations>
</record>
</metadata>

Loading…
Cancel
Save