From c90f1747990a499516ad4cb7363d9a74094f1cd1 Mon Sep 17 00:00:00 2001 From: cominch Date: Mon, 11 Jun 2012 08:07:53 +0200 Subject: [PATCH] preparation and generalization of augmented browsing methods --- htroot/interaction/Footer.html | 139 ------ htroot/interaction/OverlayInteraction.html | 299 ------------- htroot/interaction/OverlayInteraction.java | 100 ----- htroot/interaction/OverlayReview.html | 304 ------------- htroot/interaction/OverlayReview.java | 100 ----- htroot/interaction/Sidepanel_part.html | 43 -- htroot/interaction/Suggest.html | 23 - htroot/interaction/UploadSingleFile.html | 1 - htroot/interaction/UploadSingleFile.java | 125 ------ htroot/interaction/formdata.js | 37 -- htroot/interaction/interaction_sciety.js | 405 ------------------ .../interaction.js | 0 .../interaction_metadata.js | 0 .../yacy/interaction/AugmentHtmlStream.java | 63 +-- 14 files changed, 8 insertions(+), 1631 deletions(-) delete mode 100644 htroot/interaction/Footer.html delete mode 100644 htroot/interaction/OverlayInteraction.html delete mode 100644 htroot/interaction/OverlayInteraction.java delete mode 100644 htroot/interaction/OverlayReview.html delete mode 100644 htroot/interaction/OverlayReview.java delete mode 100644 htroot/interaction/Sidepanel_part.html delete mode 100644 htroot/interaction/Suggest.html delete mode 100644 htroot/interaction/UploadSingleFile.html delete mode 100644 htroot/interaction/UploadSingleFile.java delete mode 100644 htroot/interaction/formdata.js delete mode 100644 htroot/interaction/interaction_sciety.js rename htroot/{interaction => interaction_elements}/interaction.js (100%) rename htroot/{interaction => interaction_elements}/interaction_metadata.js (100%) diff --git a/htroot/interaction/Footer.html b/htroot/interaction/Footer.html deleted file mode 100644 index 23adeaa94..000000000 --- a/htroot/interaction/Footer.html +++ /dev/null @@ -1,139 +0,0 @@ -#(enabled)#:: - - - -#(feedbackenabled)#::#(/feedbackenabled)# -#(addcontentenabled)#::#(/addcontentenabled)# -#(userlogonenabled)#::#(/userlogonenabled)# - - - - - -#(/enabled)# diff --git a/htroot/interaction/OverlayInteraction.html b/htroot/interaction/OverlayInteraction.html deleted file mode 100644 index 5aba5f85a..000000000 --- a/htroot/interaction/OverlayInteraction.html +++ /dev/null @@ -1,299 +0,0 @@ -#(enabled)#:: - - - - - - -
- - - - - - - - - - - - - - - - -
- -#(/enabled)# diff --git a/htroot/interaction/OverlayInteraction.java b/htroot/interaction/OverlayInteraction.java deleted file mode 100644 index b9b96c77a..000000000 --- a/htroot/interaction/OverlayInteraction.java +++ /dev/null @@ -1,100 +0,0 @@ -package interaction; - -//ViewLog_p.java -//----------------------- -//part of the AnomicHTTPD caching proxy -//(C) by Michael Peter Christen; mc@yacy.net -//first published on http://www.anomic.de -//Frankfurt, Germany, 2004 -// -//This File is contributed by Alexander Schier -//last major change: 14.12.2004 -// -//This program is free software; you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation; either version 2 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program; if not, write to the Free Software -//Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -//You must compile this file with -//javac -classpath .:../classes ViewLog_p.java -//if the shell's current path is HTROOT - -import net.yacy.cora.protocol.HeaderFramework; -import net.yacy.cora.protocol.RequestHeader; -import net.yacy.search.Switchboard; -import de.anomic.data.UserDB; -import de.anomic.server.serverObjects; -import de.anomic.server.serverSwitch; - -public class OverlayInteraction { - - public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) { - - final Switchboard sb = (Switchboard) env; - - final serverObjects prop = new serverObjects(); - - - prop.put("enabled", "1"); - - UserDB.Entry entry=null; - - prop.put("enabled_username", "anonymous"); - - prop.put("enabled_link", post.get("link", "")); - - //identified via HTTPPassword - entry=sb.userDB.proxyAuth((header.get(RequestHeader.AUTHORIZATION, "xxxxxx"))); - if(entry != null){ - prop.put("enabled_logged-in_identified-by", "1"); - //try via cookie - }else{ - entry=sb.userDB.cookieAuth(header.getHeaderCookies()); - prop.put("enabled_logged-in_identified-by", "2"); - //try via ip - if(entry == null){ - entry=sb.userDB.ipAuth((header.get(HeaderFramework.CONNECTION_PROP_CLIENTIP, "xxxxxx"))); - if(entry != null){ - prop.put("enabled_logged-in_identified-by", "0"); - } - } - } - - //identified via userDB - if(entry != null){ - prop.put("enabled_logged-in", "1"); - prop.put("enabled_username", entry.getUserName()); - if(entry.getTimeLimit() > 0){ - prop.put("enabled_logged-in_limit", "1"); - final long limit=entry.getTimeLimit(); - final long used=entry.getTimeUsed(); - prop.put("enabled_logged-in_limit_timelimit", limit); - prop.put("enabled_logged-in_limit_timeused", used); - int percent=0; - if(limit!=0 && used != 0) - percent=(int)((float)used/(float)limit*100); - prop.put("enabled_logged-in_limit_percent", percent/3); - prop.put("enabled_logged-in_limit_percent2", (100-percent)/3); - } - //logged in via static Password - }else if(sb.verifyAuthentication(header)){ - prop.put("enabled_logged-in", "2"); - prop.put("enabled_username", "staticadmin"); - //identified via form-login - //TODO: this does not work for a static admin, yet. - } - - - return prop; - } -} diff --git a/htroot/interaction/OverlayReview.html b/htroot/interaction/OverlayReview.html deleted file mode 100644 index 9269f487b..000000000 --- a/htroot/interaction/OverlayReview.html +++ /dev/null @@ -1,304 +0,0 @@ -#(enabled)#:: - - - - - - -
- - - - - - - - - - - - - - - - -
- -#(/enabled)# diff --git a/htroot/interaction/OverlayReview.java b/htroot/interaction/OverlayReview.java deleted file mode 100644 index 816dd06c5..000000000 --- a/htroot/interaction/OverlayReview.java +++ /dev/null @@ -1,100 +0,0 @@ -package interaction; - -//ViewLog_p.java -//----------------------- -//part of the AnomicHTTPD caching proxy -//(C) by Michael Peter Christen; mc@yacy.net -//first published on http://www.anomic.de -//Frankfurt, Germany, 2004 -// -//This File is contributed by Alexander Schier -//last major change: 14.12.2004 -// -//This program is free software; you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation; either version 2 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program; if not, write to the Free Software -//Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -//You must compile this file with -//javac -classpath .:../classes ViewLog_p.java -//if the shell's current path is HTROOT - -import net.yacy.cora.protocol.HeaderFramework; -import net.yacy.cora.protocol.RequestHeader; -import net.yacy.search.Switchboard; -import de.anomic.data.UserDB; -import de.anomic.server.serverObjects; -import de.anomic.server.serverSwitch; - -public class OverlayReview { - - public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) { - - final Switchboard sb = (Switchboard) env; - - final serverObjects prop = new serverObjects(); - - - prop.put("enabled", env.getConfigBool("interaction.overlayreview.enabled", true) ? "1" : "0"); - - UserDB.Entry entry=null; - - prop.put("enabled_username", "anonymous"); - - prop.put("enabled_link", post.get("link", "")); - - //identified via HTTPPassword - entry=sb.userDB.proxyAuth((header.get(RequestHeader.AUTHORIZATION, "xxxxxx"))); - if(entry != null){ - prop.put("enabled_logged-in_identified-by", "1"); - //try via cookie - }else{ - entry=sb.userDB.cookieAuth(header.getHeaderCookies()); - prop.put("enabled_logged-in_identified-by", "2"); - //try via ip - if(entry == null){ - entry=sb.userDB.ipAuth((header.get(HeaderFramework.CONNECTION_PROP_CLIENTIP, "xxxxxx"))); - if(entry != null){ - prop.put("enabled_logged-in_identified-by", "0"); - } - } - } - - //identified via userDB - if(entry != null){ - prop.put("enabled_logged-in", "1"); - prop.put("enabled_username", entry.getUserName()); - if(entry.getTimeLimit() > 0){ - prop.put("enabled_logged-in_limit", "1"); - final long limit=entry.getTimeLimit(); - final long used=entry.getTimeUsed(); - prop.put("enabled_logged-in_limit_timelimit", limit); - prop.put("enabled_logged-in_limit_timeused", used); - int percent=0; - if(limit!=0 && used != 0) - percent=(int)((float)used/(float)limit*100); - prop.put("enabled_logged-in_limit_percent", percent/3); - prop.put("enabled_logged-in_limit_percent2", (100-percent)/3); - } - //logged in via static Password - }else if(sb.verifyAuthentication(header)){ - prop.put("enabled_logged-in", "2"); - prop.put("enabled_username", "staticadmin"); - //identified via form-login - //TODO: this does not work for a static admin, yet. - } - - - return prop; - } -} diff --git a/htroot/interaction/Sidepanel_part.html b/htroot/interaction/Sidepanel_part.html deleted file mode 100644 index 60b61888e..000000000 --- a/htroot/interaction/Sidepanel_part.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -
-sciety -
\ No newline at end of file diff --git a/htroot/interaction/Suggest.html b/htroot/interaction/Suggest.html deleted file mode 100644 index 9fa206d58..000000000 --- a/htroot/interaction/Suggest.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - #(forward)#::#(/forward)# - YaCy '#[clientname]#': Add to sciety - #%env/templates/metas.template%# - - - - - - -
- -

Suggest

- - - - - #%env/templates/footer.template%# - - - diff --git a/htroot/interaction/UploadSingleFile.html b/htroot/interaction/UploadSingleFile.html deleted file mode 100644 index 5f222d95c..000000000 --- a/htroot/interaction/UploadSingleFile.html +++ /dev/null @@ -1 +0,0 @@ -thanks \ No newline at end of file diff --git a/htroot/interaction/UploadSingleFile.java b/htroot/interaction/UploadSingleFile.java deleted file mode 100644 index 995d43c6d..000000000 --- a/htroot/interaction/UploadSingleFile.java +++ /dev/null @@ -1,125 +0,0 @@ -package interaction; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; - -import net.yacy.yacy; -import net.yacy.cora.protocol.RequestHeader; -import net.yacy.interaction.Interaction; -import net.yacy.kelondro.logging.Log; -import net.yacy.search.Switchboard; -import de.anomic.data.UserDB; -import de.anomic.server.serverObjects; -import de.anomic.server.serverSwitch; - - -public class UploadSingleFile { - - public static serverObjects respond(final RequestHeader header, - final serverObjects post, final serverSwitch env) { - final Switchboard sb = (Switchboard) env; - final serverObjects prop = new serverObjects(); - - - - - if (post != null){ - - - if (post.containsKey("uploadfile") && !post.get("uploadfile").isEmpty()) { - - UserDB.Entry entry = sb.userDB.getEntry(Interaction.GetLoggedOnUser(header)); - - if (entry != null) { - - if (entry.hasRight(UserDB.AccessRight.UPLOAD_RIGHT)) { - - // the user has the upload right - - } - - } - - String targetfilename = post.get("uploadfile", "target.file"); - - String targetfolder = "/upload/"+Interaction.GetLoggedOnUser(header); - - if (post.containsKey("targetfilename")) { - targetfilename = post.get("targetfilename"); - - } - - if (post.containsKey("targetfolder")) { - targetfolder = post.get("targetfolder"); - - if (!targetfolder.startsWith("/")) { - targetfolder = "/" + targetfolder; - } - - } - - File f = new File(yacy.dataHome_g, "DATA/HTDOCS"+targetfolder+"/"); - - yacy.mkdirsIfNeseccary (f); - - f = new File(f, targetfilename); - - Log.logInfo ("FILEUPLOAD", f.toString()); - - - - try { - - ByteArrayInputStream stream = new ByteArrayInputStream(post - .get("uploadfile$file").getBytes()); - - - if (stream != null) { - - OutputStream out; - - - out = new FileOutputStream(f.toString()); - - - byte[] buf = new byte[1024]; - int len; - while ((len = stream.read(buf)) > 0) { - out.write(buf, 0, len); - } - stream.close(); - out.close(); - } - - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - - - } - } - - // return rewrite properties - return prop; - } - - - -} - - - - - - - - - diff --git a/htroot/interaction/formdata.js b/htroot/interaction/formdata.js deleted file mode 100644 index 4eabc4815..000000000 --- a/htroot/interaction/formdata.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Emulate FormData for some browsers - * MIT License - * (c) 2010 François de Metz - */ -(function(w) { - if (w.FormData) - return; - function FormData() { - this.fake = true; - this.boundary = "--------FormData" + Math.random(); - this._fields = []; - } - FormData.prototype.append = function(key, value) { - this._fields.push([key, value]); - } - FormData.prototype.toString = function() { - var boundary = this.boundary; - var body = ""; - this._fields.forEach(function(field) { - body += "--" + boundary + "\r\n"; - // file upload - if (field[1].name) { - var file = field[1]; - body += "Content-Disposition: form-data; name=\""+ field[0] +"\"; filename=\""+ file.name +"\"\r\n"; - body += "Content-Type: "+ file.type +"\r\n\r\n"; - body += file.getAsBinary() + "\r\n"; - } else { - body += "Content-Disposition: form-data; name=\""+ field[0] +"\";\r\n\r\n"; - body += field[1] + "\r\n"; - } - }); - body += "--" + boundary +"--"; - return body; - } - w.FormData = FormData; -})(window); diff --git a/htroot/interaction/interaction_sciety.js b/htroot/interaction/interaction_sciety.js deleted file mode 100644 index 7be248e1f..000000000 --- a/htroot/interaction/interaction_sciety.js +++ /dev/null @@ -1,405 +0,0 @@ -function newload (name, div) { - -$.get(name, function(data) { - -$('#'+div).html(data); -}); - -} - -function xmlToString (xmlData) { - - var xmlString; - - if (window.ActiveXObject) { - xmlString = xmlData.xml; - } - - else { - xmlString = (new XMLSerializer()).serializeToString(xmlData); - } - - return xmlString; - -} - -function rdfload (datastore) { - -$.ajax({ - type : "GET", - url: "/currentyacypeer/interaction/GetRDF.xml?global=true", - dataType: "xml", - success: function(xml) { - datastore.load(xml); - - } - - -}); - - - -} - - -function feedback (url, comment, from) { - - - - $.getJSON('/currentyacypeer/interaction/Feedback.json?url='+url+'&comment='+comment+'&from='+from, function(data) { - - }); - -} - -function suggest (url) { - - $.getJSON('/currentyacypeer/interaction/Suggest.json?url='+url, function(data) { - - - }); - -} - -function contribution (url, comment, username) { - - $.getJSON('/currentyacypeer/interaction/Contribution.json?url='+url+'&comment='+comment+'&from='+username, function(data) { - - - }); - -} - -function triple (url, s, p, o, username) { - - $.getJSON('/currentyacypeer/interaction/Triple.json?url='+url+'&s='+s+'&p='+p+'&o='+o+'&from='+username, function(data) { - - - }); - -} - -function storevalue_t (s, p, o) { - - $.getJSON('/currentyacypeer/interaction/Table.json?url='+s+'&s='+s+'&p='+p+'&o='+o, function(data) { - - - }); - -} - -function storevalueglobal_t (s, p, o) { - - $.getJSON('/currentyacypeer/interaction/Table.json?global=true&url='+s+'&s='+s+'&p='+p+'&o='+o, function(data) { - - - }); - -} - -function storevalue (s, p, o) { - - $.getJSON('/currentyacypeer/interaction/Triple.json?url='+s+'&s='+s+'&p='+p+'&o='+o, function(data) { - - - }); - -} - -function storevalueglobal (s, p, o) { - - $.getJSON('/currentyacypeer/interaction/Triple.json?global=true&url='+s+'&s='+s+'&p='+p+'&o='+o, function(data) { - - - }); - -} - -function loadvalue (s, p) { - - var res = {result: ""}; - - $.ajaxSetup({async: false}); - - $.getJSON('/currentyacypeer/interaction/Triple.json?s='+s+'&p='+p+'&load=true', function (data) { - - res = data; - - }); - - - return res.result; - -} - -function loadvalue_t (s, p) { - - var res = {result: ""}; - - $.ajaxSetup({async: false}); - - $.getJSON('/currentyacypeer/interaction/Table.json?s='+s+'&p='+p+'&load=true', function (data) { - - res = data; - - }); - - - return res.result; - -} - -function loadvalueglobal_t (s, p) { - - var res = {result: ""}; - - $.ajaxSetup({async: false}); - - $.getJSON('/currentyacypeer/interaction/Table.json?global=true&s='+s+'&p='+p+'&load=true', function (data) { - - res = data; - - }); - - - return res.result; - -} - -function loadvalueglobal (s, p) { - - var res = {result: ""}; - - $.ajaxSetup({async: false}); - - $.getJSON('/currentyacypeer/interaction/Triple.json?global=true&s='+s+'&p='+p+'&load=true', function (data) { - - res = data; - - }); - - - return res.result; - -} - -function thing(url, title) -{ - var newItems = []; - - var d = new Date(); - var n = d.getTime(); - - var customItem = { - "itemType": "webpage", - "title": title, - "url": url - }; - - - newItems.push(customItem); - - var payload = JSON.stringify({"overall":{"item":customItem}}, null, "\t"); - - doAuthenticatedPost(payload, payload, function(status) { - if(!status) { - // callback(false, new Error("Save to server failed")); - } else { - - // callback(true, newItems); - } - }, true, true); - - -} - - - -function doAuthenticatedPost (body, body2, callback, docreate, dooverwrite, param, paramval) { - - // process url - // var url = "http://wiki.sciety.org/content/Special:ECC_In"; - // var url = "http://wiki.sciety.org/content/Special:ECC_In"; - var url = "http://141.52.79.141/content/Special:ECC_In"; - - - // do form submit - - doFormSubmit(url, body, body2, function(xmlhttp) { - - if([200, 201, 204].indexOf(xmlhttp.status) !== -1) { - - theResult = JSON.parse(xmlhttp.responseText); - - alert (theResult.username); - - // document.getElementById("sciety_averagerating").value = "Average rating: " + theResult.averagerating; - - // document.getElementById("sciety_username").value = "Current user: " + theResult.username; - // document.getElementById("sciety_uservalue").value = "Your ranking weight: " + theResult.uservalue; - - // update_view(); - - callback(true); - } else { - - theResult = JSON.parse(xmlhttp.responseText); - - // document.getElementById("sciety_averagerating").value = "Average rating: " + theResult.averagerating; - - // document.getElementById("sciety_username").value = "Current user: " + theResult.username; - // document.getElementById("sciety_uservalue").value = "Your ranking weight: " + theResult.uservalue; - - var msg = xmlhttp.responseText; - - alert (theResult.username); - - // update_view(); - - callback(false); - } - }, false, docreate, dooverwrite, param, paramval); - } - - -function doSubmitAdditionalElement (body, body2, callback, docreate, dooverwrite, param, paramval) { - - // process url - // var url = "http://wiki.sciety.org/content/Special:ECC_In"; - var url = "http://wiki.sciety.org/content/Special:ECC_Add"; - - - // do form submit - - doFormSubmit(url, body, body2, function(xmlhttp) { - - if([200, 201, 204].indexOf(xmlhttp.status) !== -1) { - - theResult = JSON.parse(xmlhttp.responseText); - - update_view(); - - callback(true); - } else { - - theResult = JSON.parse(xmlhttp.responseText); - - var msg = xmlhttp.responseText; - - update_view(); - - callback(false); - } - }, false, docreate, dooverwrite, param, paramval); - } - - -function doFormSubmit (url, body, body2, onDone, headers, docreate, dooverwrite, param, paramval) { - - var bodyStart = body.substr(0, 1024); - - var formData = new FormData(); - - formData.append ("create", docreate); - formData.append ("overwrite", dooverwrite); - - formData.append ("item", body); - formData.append ("data", body2); - - - if (param) { - formData.append(param, paramval); - } - - var ie = false; - - if (XDomainRequest) { - ie = true; - - } - - - if (ie) { - var xmlhttp = new XDomainRequest(); - } - else { - var xmlhttp = new XMLHttpRequest(); - } - - try { - - - xmlhttp.open('POST', url, true); - - - xmlhttp.onreadystatechange = function(){ - _stateChange(xmlhttp, onDone); - }; - - // if (formData.fake) - - if (!ie ) { - xmlhttp.setRequestHeader("Content-Type", "multipart/form-data; boundary="+formData.boundary); - xmlhttp.sendAsBinary(formData.toString()); - } else { - - xmlhttp.send(body); - - } - - - } catch(e) { - - alert (e); - - if(onDone) { - window.setTimeout(function() { - try { - onDone({"status":0}); - } catch(e) { - return; - } - }, 0); - } - } - - return xmlhttp; - } - - - - - /** - * Handler for XMLHttpRequest state change - * - * @param {nsIXMLHttpRequest} XMLHttpRequest whose state just changed - * @param {Function} [onDone] Callback for request completion - * @param {String} [responseCharset] Character set to force on the response - * @private - */ - function _stateChange(xmlhttp, callback) { - switch (xmlhttp.readyState){ - // Request not yet made - case 1: - break; - - case 2: - break; - - // Called multiple times while downloading in progress - case 3: - break; - - // Download complete - case 4: - if (callback) { - try { - callback(xmlhttp); - } catch(e) { - - return; - } - } - break; - } - } \ No newline at end of file diff --git a/htroot/interaction/interaction.js b/htroot/interaction_elements/interaction.js similarity index 100% rename from htroot/interaction/interaction.js rename to htroot/interaction_elements/interaction.js diff --git a/htroot/interaction/interaction_metadata.js b/htroot/interaction_elements/interaction_metadata.js similarity index 100% rename from htroot/interaction/interaction_metadata.js rename to htroot/interaction_elements/interaction_metadata.js diff --git a/source/net/yacy/interaction/AugmentHtmlStream.java b/source/net/yacy/interaction/AugmentHtmlStream.java index b293fd234..813357350 100644 --- a/source/net/yacy/interaction/AugmentHtmlStream.java +++ b/source/net/yacy/interaction/AugmentHtmlStream.java @@ -290,23 +290,7 @@ public class AugmentHtmlStream { } catch (Exception e) { } - String SCI_GUID = ""; - String SCI_GUID_DOI = ""; - String SCI_GUID_PMID = ""; - - String SCI_TITLE = ""; - String SCI_CREATOR = ""; - String SCI_DESCRIPTION = ""; - String SCI_IDENTIFIER = ""; - - String SCI_WHITELIST = ""; - - String SCI_URL = ""; - - String SCI_HASH = ""; - - SCI_URL = url.toString(); // System.out.println("Starting augmentation for " + url); // System.out.println("Content: " + Doc); @@ -343,16 +327,15 @@ public class AugmentHtmlStream { if (document.dc_format() == "text/html") { - SCI_TITLE = document.dc_title(); - SCI_CREATOR = document.dc_creator(); - SCI_DESCRIPTION = document.dc_description(); - SCI_IDENTIFIER = document.dc_identifier(); +// SCI_TITLE = document.dc_title(); +// SCI_CREATOR = document.dc_creator(); +// SCI_DESCRIPTION = document.dc_description(); +// SCI_IDENTIFIER = document.dc_identifier(); } } - SCI_HASH = "" + url.hashCode(); // ADD AUGMENTED HEADER INFORMATION @@ -370,9 +353,8 @@ public class AugmentHtmlStream { NodeList headchildren = ht.getChildren(); headchildren.add(new org.htmlparser.nodes.TextNode(loadInternal("env/templates/jqueryheader.template", requestHeader))); - headchildren.add(new org.htmlparser.nodes.TextNode("")); - headchildren.add(new org.htmlparser.nodes.TextNode("")); - headchildren.add(new org.htmlparser.nodes.TextNode("")); + headchildren.add(new org.htmlparser.nodes.TextNode("")); + headchildren.add(new org.htmlparser.nodes.TextNode("")); augmented = true; @@ -395,38 +377,9 @@ public class AugmentHtmlStream { NodeList bodychildren = bt.getChildren(); + bodychildren.add(new org.htmlparser.nodes.TextNode(loadInternal("interaction/Footer.html", requestHeader))); - // bodychildren.add(new org.htmlparser.nodes.TextNode(loadInternal("interaction/Footer.html", requestHeader))); - - bodychildren.add(new org.htmlparser.nodes.TextNode(loadInternal("interaction/OverlayReview.html?link="+url.toNormalform(true, false), requestHeader))); - - bodychildren.add(new org.htmlparser.nodes.TextNode(loadInternal("interaction/Sidepanel_part.html?link="+url.toNormalform(true, false), requestHeader))); - - // bodychildren.add(new org.htmlparser.nodes.TextNode(loadInternal("interaction/Overlay.html?link="+url.toNormalform(true, false), requestHeader))); - - - // ADD AUGMENTED INFO - - org.htmlparser.tags.Div sci_aug = new org.htmlparser.tags.Div(); - - sci_aug.setTagName("div"); - - sci_aug.setAttribute("id", "sciety_augmented"); - sci_aug.setAttribute("style", - "visibility: hidden; position: absolute; overflow: hidden;"); - - org.htmlparser.util.NodeList childr = new org.htmlparser.util.NodeList(); - - - sci_aug.setChildren(childr); - - org.htmlparser.tags.Div sci_aug_endtag = new org.htmlparser.tags.Div(); - - sci_aug_endtag.setTagName("/div"); - - sci_aug.setEndTag(sci_aug_endtag); - - bodychildren.add(sci_aug); + bt.setChildren(bodychildren);