Merge branch 'master' of ssh://git@gitorious.org/yacy/rc1.git

Conflicts:
	source/net/yacy/document/importer/OAIPMHLoader.java
This commit is contained in:
Michael Peter Christen 2012-06-17 23:50:44 +02:00
commit 26cb1c65c2
7 changed files with 105 additions and 5 deletions

View File

@ -191,6 +191,7 @@ public class Vocabulary_p {
prop.putHTML("edit_editable_file", editable ? vocabulary.getFile().getAbsolutePath() : "");
prop.putHTML("edit_name", vocabulary.getName());
prop.putHTML("edit_namespace", vocabulary.getNamespace());
prop.put("edit_size", vocabulary.size());
prop.putHTML("edit_predicate", vocabulary.getPredicate());
prop.putHTML("edit_prefix", Tagging.DEFAULT_PREFIX);
prop.putHTML("edit_editable_objectspace", vocabulary.getObjectspace() == null ? "" : vocabulary.getObjectspace());

View File

@ -102,7 +102,7 @@ public class getpageinfo {
}
if (scraper != null) {
// put the document title
prop.putXML("title", scraper.dc_title());
prop.putXML("title", removelinebreaks(scraper.dc_title()));
// put the favicon that belongs to the document
prop.put("favicon", (scraper.getFavicon()==null) ? "" : scraper.getFavicon().toString());
@ -119,7 +119,7 @@ public class getpageinfo {
}
prop.put("tags", count);
// put description
prop.putXML("desc", scraper.dc_description());
prop.putXML("desc", removelinebreaks(scraper.dc_description()));
// put language
final Set<String> languages = scraper.getContentLanguages();
prop.putXML("lang", (languages == null) ? "unknown" : languages.iterator().next());
@ -185,6 +185,13 @@ public class getpageinfo {
return prop;
}
private static String removelinebreaks(String dc_title) {
String newtitle = dc_title.replace ("\r", "");
newtitle = newtitle.replace ("\n", "");
newtitle = newtitle.replace ("\r\n", "");
return newtitle;
}
private static String checkOAI(final String url) {
final DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();

View File

@ -0,0 +1,61 @@
<span id="sci_doc_#[hash]#" class="sci_doc" style="display: none;">
<img id="sci_doc_#[hash]#_img" src="/currentyacypeer/interaction_elements/document.png" width="16px" height="16px" alt="0" onclick="/* $('#sci_doc_#[hash]#_box').toggle();*/ return false">&nbsp; <span style="font-size: x-small; position: absolute; margin-top: 4px;"><span id="sci_doc_#[hash]#_title"></span></span>
</span>
<style type="text/css" >
.sci_panel {
font: arial,helvetica,sans-serif;
font-size: 10px;
position: fixed;
right: 0;
background: #ffffff;
border:1px solid #5a346e;
width: 210px;
height: auto;
padding: 30px 110px 30px 30px;
z-index:99998;
color: #5a346e;
}
.sci_document {
font: arial,helvetica,sans-serif;
font-size: 10px;
position: fixed;
right: 100px;
top: 0;
background: #ffffff;
border:0px;
width: 65px;
height: 20px;
padding: 5px 5px 5px 5px;
z-index:99998;
color: #5a346e;
}
</style>
<div id="sci_doc_#[hash]#_box" class="sci_panel" style="top: 50px; display: none;">
<script type="text/javascript" charset="utf-8">
document.getElementById('sci_doc_#[hash]#').style.display = "";
var metajson = getMetadata('#[url]#');
document.getElementById('sci_doc_#[hash]#_title').innerHTML = metajson.item.title;
</script>
</div>

View File

@ -0,0 +1,28 @@
package interaction_elements;
import java.util.Collection;
import net.yacy.cora.lod.vocabulary.Tagging;
import net.yacy.cora.protocol.HeaderFramework;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.document.LibraryProvider;
import net.yacy.search.Switchboard;
import de.anomic.data.UserDB;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
public class Document_part {
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("hash", post.get("hash", ""));
prop.put("url", post.get("url", ""));
return prop;
}
}

View File

@ -179,6 +179,9 @@ z-index:99999;
<div id="sidebar-logo" class="sci_left" style="">
<img src="/currentyacypeer/env/grafics/yacy.png" height="20px" width="36px"/>
<img src="/currentyacypeer/env/grafics/empty.gif" height="20px" width="20px"/>
<!--#include virtual="/currentyacypeer/interaction_elements/Document_part.html?hash=#[urlhash]#&url=#[url]#" -->
<img src="/currentyacypeer/env/grafics/empty.gif" height="20px" width="20px"/>
<!--#include virtual="/currentyacypeer/interaction_elements/Tag_part.html?hash=#[urlhash]#" -->
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -2,7 +2,7 @@
function getMetadata (url) {
var res = {"item": ""};
var res = {"item": {"title": "no title"}};
$.ajaxSetup({async: false});