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

pull/1/head
reger 13 years ago
commit 2fccc4e883

@ -3,7 +3,7 @@ javacSource=1.6
javacTarget=1.6
# Release Configuration
releaseVersion=1.02
releaseVersion=1.03
stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
sourceReleaseFile=yacy_src_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
releaseFileParentDir=yacy

@ -58,6 +58,7 @@
<property name="release_mac" location="${release}/MAC"/>
<property name="git" location=".git"/>
<property name="defaults" location="defaults"/>
<property name="RDFaParser" location="RDFaParser"/>
<!-- pseudo default releaseNr as fallback -->
<property name="releaseNr" value="9000" />
@ -296,6 +297,12 @@
includes="**/*"/>
</copy>
<!-- copy RDFaParser -->
<copy todir="${release_main}/RDFaParser">
<fileset dir="${RDFaParser}"
includes="**/*"/>
</copy>
<!-- copy Unix wrappers -->
<copy todir="${release_main}">
<fileset dir=".">

@ -621,7 +621,7 @@ cleanup.failedSearchURLtimeout = 86400000
# if a high performance for large search indexes is wanted, then setting the values to equal number is recommended
# if YaCy shall be nice in not-only-yacy environments, then the Xms value may be lower
javastart_Xmx=Xmx600m
javastart_Xms=Xms600m
javastart_Xms=Xms90m
# YaCy is able to use RAM copies of database tables. This needs a lot of RAM.
# To switch on copying of file tables int RAM, there must be enough memory

@ -55,35 +55,10 @@
<dd>
<input type="checkbox" name="overlayInteraction" id="overlayInteraction" #(overlayInteraction_checked)#:: checked="checked"#(/overlayInteraction_checked)# />Enabled<br/>
<p class="help">
Show overlay interaction buttons for sciety.
Show overlay interaction buttons.
</p>
</dd>
<!-- <dt><label for="content">Add unique IDs to every node:</label></dt>
<dd>
<input type="checkbox" name="augmentedReparseAdduniqueid" id="augmentedReparseAdduniqueid" #(augmentedReparseAdduniqueid_checked)#:: checked="checked"#(/augmentedReparseAdduniqueid_checked)# />Enabled<br/>
<p class="help">
Requires webpage reparsing.
</p>
</dd>
<dt><label for="content">Add sciencenet domain info:</label></dt>
<dd>
<input type="checkbox" name="augmentedReparseAddserver" id="augmentedReparseAddserver" #(augmentedReparseAddserver_checked)#:: checked="checked"#(/augmentedReparseAddserver_checked)# />Enabled<br/>
<p class="help">
Requires webpage reparsing.
</p>
</dd>
<dt><label for="content">Add RDF from DB:</label></dt>
<dd>
<input type="checkbox" name="augmentedReparseAddrdf" id="augmentedReparseAddrdf" #(augmentedReparseAddrdf_checked)#:: checked="checked"#(/augmentedReparseAddrdf_checked)# />Enabled<br/>
<p class="help">
Requires webpage reparsing.
</p>
</dd> -->
</dl>

@ -26,15 +26,6 @@ public final class AugmentedBrowsingFilters_p {
env.setConfig("interaction.overlayinteraction.enabled", "on".equals(post
.get("overlayInteraction")) ? true : false);
// env.setConfig("augmentation.reparse.adduniqueid", "on".equals(post
// .get("augmentedReparseAdduniqueid")) ? true : false);
//
// env.setConfig("augmentation.reparse.addserverinfo", "on".equals(post
// .get("augmentedReparseAddserver")) ? true : false);
//
// env.setConfig("augmentation.reparse.addrdf", "on".equals(post
// .get("augmentedReparseAddrdf")) ? true : false);
}
}
@ -51,16 +42,6 @@ public final class AugmentedBrowsingFilters_p {
prop.put("overlayInteraction_checked",
env.getConfigBool("interaction.overlayinteraction.enabled", true) ? "1" : "0");
// prop.put("augmentedReparseAdduniqueid_checked",
// env.getConfigBool("augmentation.reparse.adduniqueid", true) ? "1" : "0");
//
// prop.put("augmentedReparseAddserver_checked",
// env.getConfigBool("augmentation.reparse.addserverinfo", true) ? "1" : "0");
//
// prop.put("augmentedReparseAddrdf_checked",
// env.getConfigBool("augmentation.reparse.addrdf", true) ? "1" : "0");
// return rewrite properties
return prop;

@ -57,6 +57,11 @@
<input type="checkbox" name="search.app" value="true" #(search.app)#::checked="checked"#(/search.app)# />Applications
</dd>
<dt>Show additional interaction features in footer</dt>
<dd>
<input type="checkbox" name="interaction.userlogon" value="true" #(interaction.userlogon)#::checked="checked"#(/interaction.userlogon)# />User-Logon&nbsp;
</dd>
<dt>Snippet Fetch Strategy &amp; Link Verification</dt>
<dd>
<img src="env/grafics/idea.png" width="32" height="32" alt="idea" align="center"/>Speed up search results with this option! (use CACHEONLY or FALSE to switch off verification)<br/>

@ -59,7 +59,7 @@ public class ConfigPortal {
} else {
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "Status.html");
}
sb.setConfig(SwitchboardConstants.BROWSER_DEFAULT, sb.getConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "index.html"));
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, sb.getConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "index.html"));
HTTPDFileHandler.initDefaultPath();
}
if (post.containsKey("searchpage_set")) {
@ -81,6 +81,8 @@ public class ConfigPortal {
sb.setConfig("publicSearchpage", post.getBoolean("publicSearchpage", true));
sb.setConfig("search.options", post.getBoolean("search.options", false));
sb.setConfig("interaction.userlogon.enabled", post.getBoolean("interaction.userlogon", false));
sb.setConfig("search.text", post.getBoolean("search.text", false));
sb.setConfig("search.image", post.getBoolean("search.image", false));
sb.setConfig("search.audio", post.getBoolean("search.audio", false));
@ -129,6 +131,7 @@ public class ConfigPortal {
sb.setConfig("publicSearchpage", true);
sb.setConfig("search.navigation", "hosts,authors,namespace,topics");
sb.setConfig("search.options", true);
sb.setConfig("interaction.userlogon.enabled", false);
sb.setConfig("search.text", true);
sb.setConfig("search.image", true);
sb.setConfig("search.audio", false);
@ -160,6 +163,8 @@ public class ConfigPortal {
prop.put("publicSearchpage", sb.getConfigBool("publicSearchpage", false) ? 1 : 0);
prop.put("search.options", sb.getConfigBool("search.options", false) ? 1 : 0);
prop.put("interaction.userlogon", sb.getConfigBool("interaction.userlogon.enabled", false) ? 1 : 0);
prop.put("search.text", sb.getConfigBool("search.text", false) ? 1 : 0);
prop.put("search.image", sb.getConfigBool("search.image", false) ? 1 : 0);
prop.put("search.audio", sb.getConfigBool("search.audio", false) ? 1 : 0);

@ -15,7 +15,7 @@
#%env/templates/submenuCrawlMonitor.template%#
<h2>Crawler</h2>
<noscript><p>(Please enable JavaScript to automatically update this page!)</p></noscript>
<fieldset style="width:230px;height:140px;float:left;">
<fieldset style="width:270px;height:140px;float:left;">
<legend>Queues</legend>
<table border="0" cellpadding="2" cellspacing="1" class="watchCrawler">
<tbody>

@ -84,9 +84,9 @@ public class PerformanceQueues_p {
}
}
if (post.containsKey("Xmx")) {
int xmx = post.getInt("Xmx", 500); // default maximum heap size
int xmx = post.getInt("Xmx", 600); // default maximum heap size
if (OS.isWin32) xmx = Math.min(2000, xmx);
int xms = xmx; // take all.. if this is not used the os will manage that. if not reserved at the beginning the OS may reject to give away more memory
int xms = Math.min(xmx, Math.max(90, xmx / 10));
sb.setConfig("javastart_Xmx", "Xmx" + xmx + "m");
sb.setConfig("javastart_Xms", "Xms" + xms + "m");
prop.put("setStartupCommit", "1");
@ -342,9 +342,9 @@ public class PerformanceQueues_p {
prop.put("priority_low",(curr_prio == 20) ? "1" : "0");
// parse initialization memory settings
final String Xmx = sb.getConfig("javastart_Xmx", "Xmx500m").substring(3);
final String Xmx = sb.getConfig("javastart_Xmx", "Xmx600m").substring(3);
prop.put("Xmx", Xmx.substring(0, Xmx.length() - 1));
final String Xms = sb.getConfig("javastart_Xms", "Xms500m").substring(3);
final String Xms = sb.getConfig("javastart_Xms", "Xms90m").substring(3);
prop.put("Xms", Xms.substring(0, Xms.length() - 1));
final long diskFree = sb.getConfigLong(SwitchboardConstants.DISK_FREE, 3000L);

@ -1 +1,2 @@
</div>
<!--#include virtual="/interaction_elements/Footer.html" -->

@ -1 +1,2 @@
</div>
<!--#include virtual="/interaction_elements/Footer.html" -->

@ -1 +1,2 @@
</div>
<!--#include virtual="/interaction_elements/Footer.html" -->

@ -0,0 +1,88 @@
#(enabled)#::
<!-- BEGIN Footer.html -->
<style type="text/css">
.SubMenuFooter h3 {
-webkit-border-radius: 5px;
-khtml-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color:#[color]#;
color:white;
}
a.MenuItemLinkFooter, ul.SubMenuFooter em {
background-color: #[color]#;
color:#[color]#;
}
a:hover.MenuItemLinkFooter {
background-color:#[color]#;
color:#[color]#;
}
ul.SubMenuFooter a.MenuItemLinkFooter {
margin-top:0;
}
a.MenuItemLinkFooter{
display:block;
text-decoration:none;
margin-top:1px;
margin-bottom:1px;
padding:1px 10px 1px 15px;
font-size:0.9em;
white-space:nowrap;
}
a:hover.MenuItemLinkFooter {
text-decoration:none;
}
ul.SubMenuFooter em {
margin-top:0;
}
ul.SubMenuFooter em {
display:block;
text-decoration:none;
margin-top:1px;
margin-bottom:1px;
padding:1px 10px 1px 15px;
font-size:0.9em;
}
ul.SubMenuFooter {
clear:left;
padding:0;
margin:0;
}
ul.SubMenuFooter li {
list-style:none;
margin:0;
margin-top:1px;
padding:0;
}
ul.SubMenuFooter li {
float:left;
margin-right:1px;
margin-top:0;
}
</style>
<div style="position: fixed; bottom: 0px; width: 100%;">
<ul class="SubMenuFooter">
#(userlogonenabled)#::<li style="width:#[ratio]#%;"><!--#include virtual="/currentyacypeer/interaction_elements/Loginstatus_part.html" --></li>#(/userlogonenabled)#
</ul>
</div>
<!-- END Footer.html -->
#(/enabled)#

@ -0,0 +1,35 @@
package interaction_elements;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.search.Switchboard;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
public class Footer {
public static serverObjects respond(final RequestHeader requestHeader, final serverObjects post, final serverSwitch env) {
final Switchboard sb = (Switchboard) env;
final serverObjects prop = new serverObjects();
prop.put("enabled_color", env.getConfig("color_tableheader", ""));
int count = 0;
prop.put("enabled_userlogonenabled", env.getConfigBool("interaction.userlogon.enabled", false) ? "1" : "0");
if (env.getConfigBool("interaction.userlogon.enabled", false)) count++;
if (count > 0) {
prop.put("enabled", "1");
prop.put("enabled_userlogonenabled_ratio", Math.round(100/count)-1);
} else {
prop.put("enabled", "0");
}
return prop;
}
}

@ -0,0 +1,10 @@
#(enabled)#::
<!-- Loginbutton_part -->
#(logged-in)#
<a id="logon_trigger" href="" class="MenuItemLinkFooter" style="color: #fff; background-color: #[color]#;" onclick="return false;"><img src="/currentyacypeer/interaction_elements/login_empty.png"> #[username]#</a>
::
<a id="logon_trigger" href="" class="MenuItemLinkFooter" style="color: #fff; background-color: #[color]#;" onclick="return false;"><img src="/currentyacypeer/interaction_elements/login_user.png"> #[username]#</a>
::
<a id="logon_trigger" href="" class="MenuItemLinkFooter" style="color: #fff; background-color: #[color]#;" onclick="return false;"><img src="/currentyacypeer/interaction_elements/login_admin.png"> #[username]#</a>
#(/logged-in)#
#(/enabled)#

@ -0,0 +1,114 @@
package interaction_elements;
//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;
import de.anomic.server.servletProperties;
public class Loginstatus_part {
public static serverObjects respond(final RequestHeader requestHeader, final serverObjects post, final serverSwitch env) {
final Switchboard sb = (Switchboard) env;
final servletProperties prop = new servletProperties();
prop.put("enabled", env.getConfigBool("interaction.userlogon.enabled", false) ? "1" : "0");
prop.put("enabled_color", env.getConfig("color_tableheader", ""));
prop.put("enabled_logged-in_registrationenabled", env.getConfigBool("interaction.userselfregistration.enabled", false) ? "1" : "0");
//
// final String address = sb.peers.mySeed().getPublicAddress();
prop.put("enabled_peer", sb.peers.myName());
prop.put("enabled_logged-in_returnto", "/index.html");
UserDB.Entry entry=null;
//default values
prop.put("enabled_logged_in", "0");
prop.put("enabled_logged-in_limit", "0");
prop.put("enabled_logged-in_username", "anonymous");
prop.put("enabled_status", "0");
//identified via HTTPPassword
entry=sb.userDB.proxyAuth((requestHeader.get(RequestHeader.AUTHORIZATION, "xxxxxx")));
if(entry != null){
prop.put("enabled_logged-in_identified-by", "1");
//try via cookie
}else{
entry=sb.userDB.cookieAuth(requestHeader.getHeaderCookies());
prop.put("enabled_logged-in_identified-by", "2");
//try via ip
if(entry == null){
entry=sb.userDB.ipAuth((requestHeader.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_logged-in_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(requestHeader)){
prop.put("enabled_logged-in", "2");
prop.put("enabled_logged-in_username", "staticadmin");
//identified via form-login
//TODO: this does not work for a static admin, yet.
}
// return rewrite properties
return prop;
}
}

@ -9,7 +9,7 @@ font-size: 10px;
position: fixed;
right: 0;
background: #ffffff;
border:1px solid #5a346e;
border:1px solid #[color]#;
width: 210px;
height: auto;
@ -17,7 +17,7 @@ padding: 30px 110px 30px 30px;
z-index:99998;
color: #5a346e;
color: #[color]#;
}
.sci_right {
@ -36,31 +36,11 @@ padding: 5px 5px 5px 5px;
z-index:99998;
color: #5a346e;
color: #[color]#;
}
.sci_hide {
font: arial,helvetica,sans-serif;
font-size: 10px;
position: fixed;
right: 0px;
top: 0;
background: #ffffff;
border:0px;
width: 100px;
height: 20px;
padding: 5px 5px 5px 5px;
z-index:99998;
color: #5a346e;
}
.sci_left {
font: arial,helvetica,sans-serif;
@ -136,7 +116,7 @@ height: 2px;
background: #ffffff;
border:0px;
background: #5a346e;
background: #[color]#;
padding: 0px 0px 0px 0px;

@ -18,6 +18,8 @@ public class OverlayInteraction {
prop.put("enabled_action", post.get("action", ""));
prop.put("enabled_color", env.getConfig("color_tableheader", ""));
return prop;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

@ -252,5 +252,7 @@ window.setTimeout('latestinfo();',8000);
window.setTimeout('latestinfo();',10000);
</script>
<!--#include virtual="/interaction_elements/Footer.html" -->
</body>
</html>

@ -70,7 +70,8 @@ public class RobotsTxt {
this.syncObjects = new ConcurrentHashMap<String, DomSync>();
this.tables = worktables;
try {
log.info("initiated robots table: " + this.tables.getHeap(WorkTables.TABLE_ROBOTS_NAME).getFile());
this.tables.getHeap(WorkTables.TABLE_ROBOTS_NAME);
//log.info("initiated robots table: " + this.tables.getHeap(WorkTables.TABLE_ROBOTS_NAME).getFile());
} catch (final IOException e) {
try {
this.tables.getHeap(WorkTables.TABLE_ROBOTS_NAME).clear();

@ -781,6 +781,7 @@ dc_rights
for (final Document doc: docs) {
if (doc == null) continue;
final String author = doc.dc_creator();
if (author.length() > 0) {
if (authors.length() > 0) authors.append(",");

@ -135,7 +135,7 @@ public final class TextParser {
if (prototypeMime != null) for (String ext: parser.supportedExtensions()) {
ext = ext.toLowerCase();
final String s = ext2mime.get(ext);
if (s != null && !s.equals(prototypeMime)) log.logWarning("parser for extension '" + ext + "' was set to mime '" + s + "', overwriting with new mime '" + prototypeMime + "'.");
if (s != null && !s.equals(prototypeMime)) Log.logInfo("PARSER", "Parser for extension '" + ext + "' was set to mime '" + s + "', overwriting with new mime '" + prototypeMime + "'.");
ext2mime.put(ext, prototypeMime);
}
@ -261,7 +261,7 @@ public final class TextParser {
if (log.isFine()) log.logInfo("Parsing " + location + " with mimeType '" + mimeType + "' and file extension '" + fileExt + "'.");
try {
final Document[] docs = parser.parse(location, mimeType, documentCharset, sourceStream);
for (final Document d: docs) { assert d.getText() != null; } // verify docs
for (final Document d: docs) { assert d != null && d.getText() != null; } // verify docs
return docs;
} catch (final Exception e) {
throw new Parser.Failure("parser failed: " + parser.getName(), location);

@ -382,6 +382,8 @@ public class AugmentHtmlStream {
bodychildren.add(new org.htmlparser.nodes.TextNode(loadInternal("interaction_elements/OverlayInteraction.html?action="+action+"&urlhash="+ ASCII.String(url.hash()) +"&url="+url.toNormalform(false, true), requestHeader)));
bodychildren.add(new org.htmlparser.nodes.TextNode(loadInternal("interaction_elements/Footer.html?action="+action+"&urlhash="+ ASCII.String(url.hash()) +"&url="+url.toNormalform(false, true), requestHeader)));
bt.setChildren(bodychildren);
augmented = true;

@ -663,13 +663,7 @@ public class HeapReader {
* @return the length of the key
*/
public int keylength() {
assert (this.index != null) : "index == null; closeDate=" + this.closeDate + ", now=" + new Date();
if (this.index == null) {
Log.logSevere("HeapReader", "this.index == null in keylength(); closeDate=" + this.closeDate + ", now=" + new Date() + this.heapFile == null ? "" : (" file = " + this.heapFile.toString()));
return 0;
}
if (this.index == null) return 0;
return this.index.row().primaryKeyLength;
return this.keylength;
}
/**

@ -164,8 +164,6 @@ public final class SeedDB implements AlternativeDomainNames {
final String peername = myName();
this.mySeed = null; // my own seed
this.myOwnSeedFile = new File(newNetworkRoot, SeedDB.DBFILE_OWN_SEED);
initMySeed();
this.mySeed.setName(peername);
this.netRedundancy = redundancy;
this.scheme = new VerticalWordPartitionScheme(partitionExponent);
@ -175,6 +173,9 @@ public final class SeedDB implements AlternativeDomainNames {
this.seedPassiveDB = openSeedTable(this.seedPassiveDBFile);
this.seedPotentialDB = openSeedTable(this.seedPotentialDBFile);
initMySeed();
this.mySeed.setName(peername);
// check if we are in the seedCaches: this can happen if someone else published our seed
removeMySeed();

@ -157,6 +157,7 @@ public class DocumentIndex extends Segment
final URIMetadataRow[] rows = new URIMetadataRow[documents.length];
int c = 0;
for ( final Document document : documents ) {
if (document == null) continue;
final Condenser condenser = new Condenser(document, true, true, LibraryProvider.dymLib, true);
rows[c++] =
super.storeDocument(

@ -250,10 +250,11 @@ public class DiscoveryAdvertisement implements Runnable
} catch ( SocketTimeoutException ex ) {
// ignoring
} catch ( IOException ioEx ) {
log.warn("IO Exception during UPNP DiscoveryAdvertisement messages listening thread");
// fail silently
//log.warn("IO Exception during UPNP DiscoveryAdvertisement messages listening thread");
} catch ( Exception ex ) {
log
.warn("Fatal Error during UPNP DiscoveryAdvertisement messages listening thread, thread will exit");
// fail silently
//log.warn("Fatal Error during UPNP DiscoveryAdvertisement messages listening thread, thread will exit");
this.inService = false;
this.aliveRegistered.clear();
this.byeByeRegistered.clear();

@ -73,8 +73,6 @@ for option in $options;do
;;
-l|--logging)
LOGGING=1
# enable asserts
JAVA_ARGS="$JAVA_ARGS -ea"
if [ $DEBUG -eq 1 ];then
echo "can not combine -l and -d"
exit 1;

Loading…
Cancel
Save