Author: orbiter
Date: 2008-03-04 23:45:45 +0100 (Tue, 04 Mar 2008)
New Revision: 4524
Added:
trunk/htroot/xml/bookmarks/xbel/xbel.class
trunk/source/screenshot.java
Modified:
trunk/htroot/AccessTracker_p.java
trunk/htroot/osm.java
trunk/source/de/anomic/data/blogBoard.java
trunk/source/de/anomic/data/blogBoardComments.java
trunk/source/de/anomic/data/bookmarksDB.java
trunk/source/de/anomic/data/diff.java
trunk/source/de/anomic/data/messageBoard.java
trunk/source/de/anomic/data/userDB.java
trunk/source/de/anomic/data/wiki/knwikiParser.java
trunk/source/de/anomic/data/wikiBoard.java
trunk/source/de/anomic/http/httpc.java
trunk/source/de/anomic/index/indexRWIEntryOrder.java
trunk/source/de/anomic/kelondro/kelondroAbstractRecords.java
trunk/source/de/anomic/kelondro/kelondroAttrSeq.java
trunk/source/de/anomic/kelondro/kelondroBufferedEcoFS.java
trunk/source/de/anomic/kelondro/kelondroCache.java
trunk/source/de/anomic/kelondro/kelondroCachedRecords.java
trunk/source/de/anomic/kelondro/kelondroCollectionIndex.java
trunk/source/de/anomic/kelondro/kelondroDyn.java
trunk/source/de/anomic/kelondro/kelondroEcoTable.java
trunk/source/de/anomic/kelondro/kelondroFlexTable.java
trunk/source/de/anomic/kelondro/kelondroFlexWidthArray.java
trunk/source/de/anomic/kelondro/kelondroMHashMap.java
trunk/source/de/anomic/kelondro/kelondroRowCollection.java
trunk/source/de/anomic/kelondro/kelondroSplitTable.java
trunk/source/de/anomic/kelondro/kelondroStack.java
trunk/source/de/anomic/kelondro/kelondroTree.java
trunk/source/de/anomic/plasma/crawler/plasmaCrawlQueues.java
trunk/source/de/anomic/plasma/plasmaCondenser.java
trunk/source/de/anomic/plasma/plasmaCrawlBalancer.java
trunk/source/de/anomic/plasma/plasmaCrawlLURL.java
trunk/source/de/anomic/plasma/plasmaCrawlProfile.java
trunk/source/de/anomic/plasma/plasmaCrawlZURL.java
trunk/source/de/anomic/plasma/plasmaHTCache.java
trunk/source/de/anomic/plasma/plasmaSearchEvent.java
trunk/source/de/anomic/plasma/plasmaSnippetCache.java
trunk/source/de/anomic/plasma/plasmaSwitchboardQueue.java
trunk/source/de/anomic/plasma/plasmaWebStructure.java
trunk/source/de/anomic/server/serverCore.java
trunk/source/de/anomic/xml/crawlHandler.java
trunk/source/de/anomic/xml/rssReader.java
trunk/source/de/anomic/yacy/yacyCore.java
trunk/source/de/anomic/yacy/yacyNewsQueue.java
trunk/source/de/anomic/ymage/ymageBMPParser.java
Log:
refactoring
Modified: trunk/htroot/AccessTracker_p.java
===================================================================
--- trunk/htroot/AccessTracker_p.java 2008-03-03 22:36:27 UTC (rev 4523)
+++ trunk/htroot/AccessTracker_p.java 2008-03-04 22:45:45 UTC (rev 4524)
@@ -86,7 +86,7 @@
prop.put("page_num", entCount);
}
if (page == 1) {
- String host = post.get("host", "");
+ String host = (post == null) ? "" : post.get("host", "");
int entCount = 0;
TreeMap<Long, String> access;
Map.Entry<Long, String> entry;
Modified: trunk/htroot/osm.java
===================================================================
--- trunk/htroot/osm.java 2008-03-03 22:36:27 UTC (rev 4523)
+++ trunk/htroot/osm.java 2008-03-04 22:45:45 UTC (rev 4524)
@@ -1,5 +1,5 @@
-import java.io.IOException;
+
import de.anomic.http.httpHeader;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
@@ -8,7 +8,7 @@
public class osm {
- public static ymageMatrix respond(httpHeader header, serverObjects post,
serverSwitch env) throws IOException {
+ public static ymageMatrix respond(httpHeader header, serverObjects post,
serverSwitch env) {
int zoom = 10;
double lat = 47.968056d;
Added: trunk/htroot/xml/bookmarks/xbel/xbel.class
===================================================================
(Binary files differ)
Property changes on: trunk/htroot/xml/bookmarks/xbel/xbel.class
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/source/de/anomic/data/blogBoard.java
===================================================================
--- trunk/source/de/anomic/data/blogBoard.java 2008-03-03 22:36:27 UTC (rev
4523)
+++ trunk/source/de/anomic/data/blogBoard.java 2008-03-04 22:45:45 UTC (rev
4524)
@@ -340,7 +340,7 @@
wikiBoard.setAuthor(ip, new String(author));
}
- private BlogEntry(String key, HashMap<String, String> record) {
+ BlogEntry(String key, HashMap<String, String> record) {
this.key = key;
this.record = record;
if (this.record.get("comments")==null) this.record.put("comments",
listManager.collection2string(new ArrayList<String>()));
Modified: trunk/source/de/anomic/data/blogBoardComments.java
===================================================================
--- trunk/source/de/anomic/data/blogBoardComments.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/data/blogBoardComments.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -76,7 +76,7 @@
private static final String dateFormat = "yyyyMMddHHmmss";
private static final int recordSize = 512;
- private static SimpleDateFormat SimpleFormatter = new
SimpleDateFormat(dateFormat);
+ static SimpleDateFormat SimpleFormatter = new SimpleDateFormat(dateFormat);
static {
SimpleFormatter.setTimeZone(TimeZone.getTimeZone("GMT"));
@@ -94,7 +94,7 @@
public void close() {
database.close();
}
- private static String dateString(Date date) {
+ static String dateString(Date date) {
synchronized (SimpleFormatter) {
return SimpleFormatter.format(date);
}
@@ -240,7 +240,7 @@
wikiBoard.setAuthor(ip, new String(author));
}
- private CommentEntry(String key, HashMap<String, String> record) {
+ CommentEntry(String key, HashMap<String, String> record) {
this.key = key;
this.record = record;
if (this.record.get("comments")==null) this.record.put("comments",
listManager.collection2string(new ArrayList<String>()));
Modified: trunk/source/de/anomic/data/bookmarksDB.java
===================================================================
--- trunk/source/de/anomic/data/bookmarksDB.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/data/bookmarksDB.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -951,7 +951,7 @@
this((new yacyURL((String)map.map().get(BOOKMARK_URL),
null)).hash(), map.map());
}
- private Map<String, String> toMap() {
+ Map<String, String> toMap() {
entry.put(BOOKMARK_TAGS, listManager.collection2string(tags));
entry.put(BOOKMARK_TIMESTAMP, String.valueOf(this.timestamp));
return entry;
Modified: trunk/source/de/anomic/data/diff.java
===================================================================
--- trunk/source/de/anomic/data/diff.java 2008-03-03 22:36:27 UTC (rev
4523)
+++ trunk/source/de/anomic/data/diff.java 2008-03-04 22:45:45 UTC (rev
4524)
@@ -55,8 +55,8 @@
public class diff {
private final ArrayList <Part> parts = new ArrayList<Part>();
- private final Object[] o;
- private final Object[] n;
+ final Object[] o;
+ final Object[] n;
/**
* @param o the original <code>String</code>
@@ -217,7 +217,7 @@
private final int posOld;
private final int posNew;
- private Part(int action, int posOld, int posNew) {
+ Part(int action, int posOld, int posNew) {
this.action = action;
this.posOld = posOld;
this.posNew = posNew;
Modified: trunk/source/de/anomic/data/messageBoard.java
===================================================================
--- trunk/source/de/anomic/data/messageBoard.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/data/messageBoard.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -60,13 +60,13 @@
private static final String dateFormat = "yyyyMMddHHmmss";
private static final int recordSize = 512;
- private static SimpleDateFormat SimpleFormatter = new
SimpleDateFormat(dateFormat);
+ static SimpleDateFormat SimpleFormatter = new SimpleDateFormat(dateFormat);
static {
SimpleFormatter.setTimeZone(TimeZone.getTimeZone("GMT"));
}
- private kelondroMapObjects database = null;
+ kelondroMapObjects database = null;
private int sn = 0;
public messageBoard(File path) {
@@ -85,13 +85,13 @@
database.close();
}
- private static String dateString() {
+ static String dateString() {
synchronized (SimpleFormatter) {
return SimpleFormatter.format(new Date());
}
}
- private String snString() {
+ String snString() {
String s = Integer.toString(sn);
if (s.length() == 1) s = "0" + s;
sn++;
@@ -137,7 +137,7 @@
record.put("read", "false");
}
- private entry(String key, HashMap<String, String> record) {
+ entry(String key, HashMap<String, String> record) {
this.key = key;
this.record = record;
}
Modified: trunk/source/de/anomic/data/userDB.java
===================================================================
--- trunk/source/de/anomic/data/userDB.java 2008-03-03 22:36:27 UTC (rev
4523)
+++ trunk/source/de/anomic/data/userDB.java 2008-03-04 22:45:45 UTC (rev
4524)
@@ -70,8 +70,8 @@
kelondroMapObjects userTable;
private final File userTableFile;
- private HashMap<String, String> ipUsers = new HashMap<String, String>();
- private HashMap<String, Object> cookieUsers = new HashMap<String,
Object>();
+ HashMap<String, String> ipUsers = new HashMap<String, String>();
+ HashMap<String, Object> cookieUsers = new HashMap<String, Object>();
public userDB(File userTableFile) {
this.userTableFile = userTableFile;
@@ -325,8 +325,8 @@
public static final int PROXY_TIMELIMIT_REACHED = 3;
// this is a simple record structure that hold all properties of a user
- private HashMap<String, String> mem;
- private String userName;
+ HashMap<String, String> mem;
+ String userName;
private Calendar oldDate, newDate;
public Entry(String userName, HashMap<String, String> mem) throws
IllegalArgumentException {
Modified: trunk/source/de/anomic/data/wiki/knwikiParser.java
===================================================================
--- trunk/source/de/anomic/data/wiki/knwikiParser.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/data/wiki/knwikiParser.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -259,7 +259,7 @@
public boolean isEscaped() { return this.escaped; }
public boolean isNewLineBefore() { return this.nl; }
- private static Text[] split2Texts(String text, String
escapeBegin, String escapeEnd) {
+ static Text[] split2Texts(String text, String escapeBegin,
String escapeEnd) {
if (text == null) return null;
if (text.length() < 2) return new Text[] { new
Text(text, false, true) };
@@ -286,7 +286,7 @@
from < escapeEnd.length() + 2 ||
(!escaped && text.charAt(from - escapeEnd.length() - 1) == '\n'));
}
- private static String mergeTexts(Text[] texts) {
+ static String mergeTexts(Text[] texts) {
StringBuffer sb = new StringBuffer();
for (int n=0; n < texts.length; n++)
sb.append(texts[n].getTextPlain());
Modified: trunk/source/de/anomic/data/wikiBoard.java
===================================================================
--- trunk/source/de/anomic/data/wikiBoard.java 2008-03-03 22:36:27 UTC (rev
4523)
+++ trunk/source/de/anomic/data/wikiBoard.java 2008-03-04 22:45:45 UTC (rev
4524)
@@ -60,15 +60,15 @@
private static final String dateFormat = "yyyyMMddHHmmss";
private static final int recordSize = 512;
- private static SimpleDateFormat SimpleFormatter = new
SimpleDateFormat(dateFormat);
+ static SimpleDateFormat SimpleFormatter = new SimpleDateFormat(dateFormat);
static {
SimpleFormatter.setTimeZone(TimeZone.getTimeZone("GMT"));
}
- private kelondroMapObjects datbase = null;
- private kelondroMapObjects bkpbase = null;
- private static HashMap<String, String> authors = new HashMap<String,
String>();
+ kelondroMapObjects datbase = null;
+ kelondroMapObjects bkpbase = null;
+ static HashMap<String, String> authors = new HashMap<String, String>();
public wikiBoard(File actpath, File bkppath) {
new File(actpath.getParent()).mkdirs();
@@ -94,7 +94,7 @@
bkpbase.close();
}
- private static String dateString() {
+ static String dateString() {
return dateString(new Date());
}
@@ -156,7 +156,7 @@
//System.out.println("DEBUG: setting author " + author + " for ip
= " + ip + ", authors = " + authors.toString());
}
- private entry(String key, HashMap<String, String> record) {
+ entry(String key, HashMap<String, String> record) {
this.key = key;
this.record = record;
}
@@ -204,7 +204,7 @@
return b;
}
- private void setAncestorDate(Date date) {
+ void setAncestorDate(Date date) {
record.put("bkp", dateString(date));
}
@@ -238,7 +238,7 @@
return read(key + dateString(ancDate), bkpbase);
}
- private void setChild(String subject) {
+ void setChild(String subject) {
record.put("child",
kelondroBase64Order.enhancedCoder.encode(subject.getBytes()));
}
@@ -290,7 +290,7 @@
return read(key, datbase);
}
- private entry read(String key, kelondroMapObjects base) {
+ entry read(String key, kelondroMapObjects base) {
try {
key = normalize(key);
if (key.length() > keyLength) key = key.substring(0, keyLength);
Modified: trunk/source/de/anomic/http/httpc.java
===================================================================
--- trunk/source/de/anomic/http/httpc.java 2008-03-03 22:36:27 UTC (rev
4523)
+++ trunk/source/de/anomic/http/httpc.java 2008-03-04 22:45:45 UTC (rev
4524)
@@ -108,7 +108,7 @@
private static final String vDATE = "20040602";
private static final int terminalMaxLength = 30000;
private static final SimpleDateFormat HTTPGMTFormatter = new
SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
- private static final HashMap<String, String> reverseMappingCache = new
HashMap<String, String>();
+ static final HashMap<String, String> reverseMappingCache = new
HashMap<String, String>();
private static final HashSet<httpc> activeConnections = new
HashSet<httpc>(); // all connections are stored here and deleted when they are
finished
private static final long minimumTime_before_activeConnections_cleanup =
3600000; // 1 Hour
private static final long minimumTime_before_idleConnections_cleanup =
120000; // 2 Minutes
@@ -189,7 +189,7 @@
private String target_virtual_host = null;
// output and input streams for client control connection
- private PushbackInputStream clientInput = null;
+ PushbackInputStream clientInput = null;
private OutputStream clientOutput = null;
private httpdByteCountInputStream clientInputByteCount = null;
@@ -198,7 +198,7 @@
private boolean remoteProxyUse = false;
private httpRemoteProxyConfig remoteProxyConfig = null;
- private String requestPath = null;
+ String requestPath = null;
private boolean allowContentEncoding = true;
public boolean ssl;
@@ -1443,7 +1443,7 @@
} catch (IOException e) {
e.printStackTrace();
}
- if (file.length() == 0) file.delete();
+ if ((file != null) && (file.length() == 0)) file.delete();
}
}
Modified: trunk/source/de/anomic/index/indexRWIEntryOrder.java
===================================================================
--- trunk/source/de/anomic/index/indexRWIEntryOrder.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/index/indexRWIEntryOrder.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -153,7 +153,8 @@
public static class minmaxfinder extends Thread {
- private indexRWIVarEntry entryMin, entryMax;
+ indexRWIVarEntry entryMin;
+ indexRWIVarEntry entryMax;
private indexContainer container;
private int start, end;
private HashMap<String, Integer> doms;
Modified: trunk/source/de/anomic/kelondro/kelondroAbstractRecords.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroAbstractRecords.java
2008-03-03 22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroAbstractRecords.java
2008-03-04 22:45:45 UTC (rev 4524)
@@ -53,9 +53,9 @@
private static long POS_COLUMNS = POS_DESCR + LEN_DESCR; // 2
bytes, short: number of columns in one entry
private static long POS_OHBYTEC = POS_COLUMNS + 2; // 2 bytes,
number of extra bytes on each Node
private static long POS_OHHANDLEC = POS_OHBYTEC + 2; // 2 bytes,
number of Handles on each Node
- private static long POS_USEDC = POS_OHHANDLEC + 2; // 4 bytes,
int: used counter
- private static long POS_FREEC = POS_USEDC + 4; // 4 bytes,
int: free counter
- private static long POS_FREEH = POS_FREEC + 4; // 4 bytes,
int: free pointer (to free chain start)
+ static long POS_USEDC = POS_OHHANDLEC + 2; // 4 bytes, int: used
counter
+ static long POS_FREEC = POS_USEDC + 4; // 4 bytes, int: free
counter
+ static long POS_FREEH = POS_FREEC + 4; // 4 bytes, int: free
pointer (to free chain start)
private static long POS_MD5PW = POS_FREEH + 4; // 16 bytes,
string (encrypted password to this file)
private static long POS_ENCRYPTION = POS_MD5PW + 16; // 16 bytes,
string (method description)
private static long POS_OFFSET = POS_ENCRYPTION + 16; // 8 bytes,
long (seek position of first record)
@@ -75,7 +75,7 @@
protected int headchunksize;// overheadsize + key element
column size
protected int tailchunksize;// sum(all: COLWIDTHS) minus the
size of the key element colum
protected int recordsize; // (overhead + sum(all:
COLWIDTHS)) = the overall size of a record
- private byte[] spaceChunk; // a chunk of data that is used
to reserve space within the file
+ byte[] spaceChunk; // a chunk of data that is used to reserve
space within the file
// dynamic run-time seek pointers
private long POS_HANDLES = 0; // starts after end of POS_COLWIDHS which
is POS_COLWIDTHS + COLWIDTHS.length * 4
@@ -137,7 +137,7 @@
}
}
- private synchronized void writeused(boolean finalwrite) throws
IOException {
+ synchronized void writeused(boolean finalwrite) throws IOException {
// we write only at close time, not in between. othervise, the
read/write head
// needs to run up and own all the way between the beginning and
the end of the
// file for each record. We check consistency beteen file size and
@@ -176,7 +176,7 @@
return this.USEDC + this.FREEC;
}
- private synchronized int used() {
+ synchronized int used() {
checkConsistency();
return this.USEDC;
}
Modified: trunk/source/de/anomic/kelondro/kelondroAttrSeq.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroAttrSeq.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroAttrSeq.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -286,7 +286,6 @@
StringTokenizer st = new StringTokenizer(attr, ",");
while (st.hasMoreTokens()) {
a = new kelondroColumn(st.nextToken());
- if (a == null) break;
l.add(a);
}
prop_names = new String[l.size()];
@@ -307,7 +306,6 @@
st = new StringTokenizer(seqs, ",");
while (st.hasMoreTokens()) {
a = new kelondroColumn(st.nextToken());
- if (a == null) break;
l.add(a);
}
seq_names = new String[l.size()];
Modified: trunk/source/de/anomic/kelondro/kelondroBufferedEcoFS.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroBufferedEcoFS.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroBufferedEcoFS.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -42,7 +42,7 @@
* That means, each time, an entry is written to the end of the file, it
is not buffered
*/
- public kelondroBufferedEcoFS(kelondroEcoFS efs, int maxEntries) throws
IOException {
+ public kelondroBufferedEcoFS(kelondroEcoFS efs, int maxEntries) {
this.efs = efs;
this.maxEntries = maxEntries;
this.buffer = new TreeMap<Long, byte[]>();
Modified: trunk/source/de/anomic/kelondro/kelondroCache.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroCache.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroCache.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -165,7 +165,7 @@
return true;
}
- private boolean checkHitSpace() throws IOException {
+ private boolean checkHitSpace() {
// returns true if it is allowed to write into this cache
int status = cacheGrowStatus();
if (status < 1) {
Modified: trunk/source/de/anomic/kelondro/kelondroCachedRecords.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroCachedRecords.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroCachedRecords.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -46,8 +46,18 @@
private static long memStartShrink = 6000000; // a limit for the node
cache to start with shrinking if less than this memory amount is available
// caching buffer
- private kelondroIntBytesMap cacheHeaders; // the cache; holds overhead
values and key element
- private int readHit, readMiss, writeUnique, writeDouble, cacheDelete,
cacheFlush;
+ kelondroIntBytesMap cacheHeaders; // the cache; holds overhead values
and key element
+ int readHit;
+
+ int readMiss;
+
+ int writeUnique;
+
+ int writeDouble;
+
+ int cacheDelete;
+
+ int cacheFlush;
public kelondroCachedRecords(
@@ -110,7 +120,7 @@
}
}
- private int cacheGrowStatus() {
+ int cacheGrowStatus() {
long available = serverMemory.available();
if ((cacheHeaders != null) && (available <
cacheHeaders.memoryNeededForGrow())) return 0;
return cacheGrowStatus(available, memStopGrow, memStartShrink);
@@ -300,7 +310,7 @@
//private Handle[] ohHandle= null; // the overhead handles,
OHHANDLEC values
//private byte[][] values = null; // an array of byte[] nodes is
the value vector
private kelondroHandle handle = null; // index of the entry, by
default NUL means undefined
- private byte[] headChunk = null; // contains ohBytes, ohHandles and
the key value
+ byte[] headChunk = null; // contains ohBytes, ohHandles and the key
value
private byte[] tailChunk = null; // contains all values except the key
value
private boolean headChanged = false;
private boolean tailChanged = false;
Modified: trunk/source/de/anomic/kelondro/kelondroCollectionIndex.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroCollectionIndex.java
2008-03-03 22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroCollectionIndex.java
2008-03-04 22:45:45 UTC (rev 4524)
@@ -57,7 +57,7 @@
private static final long minimumRAM4Eco = 20 * 1024 * 1024;
private static final int EcoFSBufferSize = 1000;
- private kelondroIndex index;
+ kelondroIndex index;
private int keylength;
private File path;
private String filenameStub;
@@ -354,7 +354,7 @@
// this is computed by the size of the biggest used collection
// this must be multiplied with the payload size
// and doubled for necessary memory transformation during sort
operation
- return (int) (arrayCapacity(arrays.size() - 1) *
this.payloadrow.objectsize * kelondroRowSet.growfactor);
+ return (int) (arrayCapacity(arrays.size() - 1) *
this.payloadrow.objectsize * kelondroRowCollection.growfactor);
}
private void array_remove(
Modified: trunk/source/de/anomic/kelondro/kelondroDyn.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroDyn.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroDyn.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -119,7 +119,7 @@
file.delete();
} else {
if (file.isDirectory()) {
- kelondroFlexTable.delete(file.getParentFile(), file.getName());
+ kelondroFlexWidthArray.delete(file.getParentFile(),
file.getName());
} else {
file.delete();
}
Modified: trunk/source/de/anomic/kelondro/kelondroEcoTable.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroEcoTable.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroEcoTable.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -61,10 +61,12 @@
public static final long maxarraylength = 134217727L; // that may be the
maxmimum size of array length in some JVMs
- private kelondroRowSet table;
- private kelondroBytesIntMap index;
- private kelondroBufferedEcoFS file;
- private kelondroRow rowdef, taildef;
+ kelondroRowSet table;
+ kelondroBytesIntMap index;
+ kelondroBufferedEcoFS file;
+ kelondroRow rowdef;
+
+ kelondroRow taildef;
private int buffersize;
public kelondroEcoTable(File tablefile, kelondroRow rowdef, int
useTailCache, int buffersize, int initialSpace) {
@@ -88,7 +90,7 @@
// should not happen
e.printStackTrace();
}
- try { fos.close(); } catch (IOException e) {}
+ if (fos != null) try { fos.close(); } catch (IOException e) {}
}
try {
@@ -220,7 +222,7 @@
}
public static int staticRAMIndexNeed(File f, kelondroRow rowdef) {
- return (int) ((rowdef.primaryKeyLength + 4) * tableSize(f,
rowdef.objectsize) * kelondroRowSet.growfactor);
+ return (int) ((rowdef.primaryKeyLength + 4) * tableSize(f,
rowdef.objectsize) * kelondroRowCollection.growfactor);
}
public synchronized void addUnique(Entry row) throws IOException {
@@ -492,7 +494,7 @@
// should not happen
e.printStackTrace();
}
- try { fos.close(); } catch (IOException e) {}
+ if (fos != null) try { fos.close(); } catch (IOException e) {}
// open an existing table file
Modified: trunk/source/de/anomic/kelondro/kelondroFlexTable.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroFlexTable.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroFlexTable.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -140,7 +140,7 @@
}
public static int staticRAMIndexNeed(File path, String tablename,
kelondroRow rowdef) {
- return (int) ((rowdef.column(0).cellwidth + 4) * staticSize(path,
tablename) * kelondroRowSet.growfactor);
+ return (int) ((rowdef.column(0).cellwidth + 4) * staticSize(path,
tablename) * kelondroRowCollection.growfactor);
}
public boolean hasRAMIndex() {
@@ -385,26 +385,24 @@
}
public synchronized kelondroCloneableIterator<kelondroRow.Entry>
rows(boolean up, byte[] firstKey) throws IOException {
- if (index == null) return new rowIterator(index, up, firstKey);
+ if (index == null) return new rowIterator(up, firstKey);
assert this.size() == index.size() : "content.size() = " + this.size()
+ ", index.size() = " + index.size();
- return new rowIterator(index, up, firstKey);
+ return new rowIterator(up, firstKey);
}
public class rowIterator implements
kelondroCloneableIterator<kelondroRow.Entry> {
kelondroCloneableIterator<kelondroRow.Entry> indexIterator;
- kelondroBytesIntMap index;
boolean up;
- public rowIterator(kelondroBytesIntMap index, boolean up, byte[]
firstKey) throws IOException {
- this.index = index;
+ public rowIterator(boolean up, byte[] firstKey) throws IOException {
this.up = up;
indexIterator = index.rows(up, firstKey);
}
public rowIterator clone(Object modifier) {
try {
- return new rowIterator(index, up, (byte[]) modifier);
+ return new rowIterator(up, (byte[]) modifier);
} catch (IOException e) {
return null;
}
Modified: trunk/source/de/anomic/kelondro/kelondroFlexWidthArray.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroFlexWidthArray.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroFlexWidthArray.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -162,7 +162,7 @@
// open existing files
File file = new File(tabledir, "col.000.list");
- return kelondroCachedRecords.staticsize(file);
+ return kelondroAbstractRecords.staticsize(file);
}
public static void delete(File path, String tablename) {
Modified: trunk/source/de/anomic/kelondro/kelondroMHashMap.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroMHashMap.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroMHashMap.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -45,8 +45,10 @@
public class kelondroMHashMap {
- private int keylen, valuelen, reclen, count;
- private byte[] mem;
+ int keylen;
+ int valuelen;
+ int reclen, count;
+ byte[] mem;
private byte[] emptykey;
public kelondroMHashMap(int valuelen) {
Modified: trunk/source/de/anomic/kelondro/kelondroRowCollection.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroRowCollection.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroRowCollection.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -43,7 +43,7 @@
public static final double growfactor = 1.4;
private static final int isortlimit = 20;
- private static final Integer dummy = new Integer(0);
+ static final Integer dummy = new Integer(0);
public static final qsortthread sortingthread;
static {
@@ -538,7 +538,7 @@
}
}
- private final void qsort(int L, int R, int S, byte[] swapspace) {
+ final void qsort(int L, int R, int S, byte[] swapspace) {
if (R - L < isortlimit) {
isort(L, R, swapspace);
return;
Modified: trunk/source/de/anomic/kelondro/kelondroSplitTable.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroSplitTable.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroSplitTable.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -131,7 +131,7 @@
for (int i = 0; i < l.length; i++) {
if (l[i].startsWith(tablename)) {
File f = new File(path, l[i]);
- if (f.isDirectory()) kelondroFlexTable.delete(path, l[i]);
else f.delete();
+ if (f.isDirectory()) kelondroFlexWidthArray.delete(path,
l[i]); else f.delete();
}
}
init(true);
Modified: trunk/source/de/anomic/kelondro/kelondroStack.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroStack.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroStack.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -217,7 +217,7 @@
return row().newEntry(n.getValueRow());
}
- private void unlinkNode(kelondroNode n) throws IOException {
+ void unlinkNode(kelondroNode n) throws IOException {
// join chaines over node
kelondroHandle l = n.getOHHandle(left);
kelondroHandle r = n.getOHHandle(right);
Modified: trunk/source/de/anomic/kelondro/kelondroTree.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroTree.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/kelondro/kelondroTree.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -1507,7 +1507,7 @@
} catch (Exception e) {
e.printStackTrace();
- try {tt.print();} catch (IOException ee) {}
+ if (tt != null) try {tt.print();} catch (IOException ee) {}
System.out.println("TERMINATED");
}
}
Modified: trunk/source/de/anomic/plasma/crawler/plasmaCrawlQueues.java
===================================================================
--- trunk/source/de/anomic/plasma/crawler/plasmaCrawlQueues.java
2008-03-03 22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/plasma/crawler/plasmaCrawlQueues.java
2008-03-04 22:45:45 UTC (rev 4524)
@@ -38,7 +38,7 @@
import java.util.Map;
import de.anomic.data.robotsParser;
-import de.anomic.kelondro.kelondroFlexTable;
+import de.anomic.kelondro.kelondroFlexWidthArray;
import de.anomic.plasma.plasmaCrawlEntry;
import de.anomic.plasma.plasmaCrawlNURL;
import de.anomic.plasma.plasmaCrawlProfile;
@@ -57,9 +57,9 @@
public class plasmaCrawlQueues {
private plasmaSwitchboard sb;
- private serverLog log;
- private Map<Integer, crawlWorker> workers; // mapping from url hash to
Worker thread object
- private plasmaProtocolLoader loader;
+ serverLog log;
+ Map<Integer, crawlWorker> workers; // mapping from url hash to Worker
thread object
+ plasmaProtocolLoader loader;
private ArrayList<String> remoteCrawlProviderHashes;
public plasmaCrawlNURL noticeURL;
@@ -80,7 +80,7 @@
if (errorDBFile.exists()) {
// delete the error db to get a fresh each time on startup
// this is useful because there is currently no re-use of the data
in this table.
- if (errorDBFile.isDirectory())
kelondroFlexTable.delete(plasmaPath, "urlError2.db"); else errorDBFile.delete();
+ if (errorDBFile.isDirectory())
kelondroFlexWidthArray.delete(plasmaPath, "urlError2.db"); else
errorDBFile.delete();
}
errorURL = new plasmaCrawlZURL(plasmaPath, "urlError2.db", false);
delegatedURL = new plasmaCrawlZURL(plasmaPath, "urlDelegated2.db",
true);
Modified: trunk/source/de/anomic/plasma/plasmaCondenser.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaCondenser.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/plasma/plasmaCondenser.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -324,7 +324,7 @@
public int posInText; // unique handle, is initialized
with word position (excluding double occurring words)
public int posInPhrase; // position of word in phrase
public int numOfPhrase; // number of phrase. 'normal'
phrases begin with number 100
- private HashSet<Integer> hash; // a set of handles to all
sentences where this word appears
+ HashSet<Integer> hash; // a set of handles to all sentences
where this word appears
public kelondroBitfield flags; // the flag bits for each word
public wordStatProp(int handle, int pip, int nop) {
Modified: trunk/source/de/anomic/plasma/plasmaCrawlBalancer.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaCrawlBalancer.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/plasma/plasmaCrawlBalancer.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -75,7 +75,7 @@
// class variables
private ArrayList<String> urlRAMStack; // a list
that is flushed first
private kelondroStack urlFileStack; // a file
with url hashes
- private kelondroIndex urlFileIndex;
+ kelondroIndex urlFileIndex;
private HashMap<String, LinkedList<String>> domainStacks; // a map from
domain name part to Lists with url hashs
private File cacheStacksPath;
private String stackname;
Modified: trunk/source/de/anomic/plasma/plasmaCrawlLURL.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaCrawlLURL.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/plasma/plasmaCrawlLURL.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -95,7 +95,7 @@
private final LinkedList<String> gcrawlResultStack; // 6 - local index:
triggered external
// the class object
- private kelondroIndex urlIndexFile;
+ kelondroIndex urlIndexFile;
public plasmaCrawlLURL(File indexPath) {
super();
Modified: trunk/source/de/anomic/plasma/plasmaCrawlProfile.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaCrawlProfile.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/plasma/plasmaCrawlProfile.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -60,9 +60,9 @@
public class plasmaCrawlProfile {
- private static HashMap<String, Map<String, DomProfile>> domsCache = new
HashMap<String, Map<String, DomProfile>>();
+ static HashMap<String, Map<String, DomProfile>> domsCache = new
HashMap<String, Map<String, DomProfile>>();
- private kelondroMapObjects profileTable;
+ kelondroMapObjects profileTable;
private File profileTableFile;
public plasmaCrawlProfile(File file) {
@@ -72,7 +72,7 @@
profileTable = new kelondroMapObjects(dyn, 500);
}
- private void resetDatabase() {
+ void resetDatabase() {
// deletes the profile database and creates a new one
if (profileTable != null) profileTable.close();
if (!(profileTableFile.delete())) throw new RuntimeException("cannot
delete crawl profile database");
@@ -252,7 +252,7 @@
public static final String XDSTOPW = "xdstopw";
public static final String XPSTOPW = "xpstopw";
- private HashMap<String, String> mem;
+ HashMap<String, String> mem;
private Map<String, DomProfile> doms;
public entry(String name, yacyURL startURL, String generalFilter,
String specificFilter,
Modified: trunk/source/de/anomic/plasma/plasmaCrawlZURL.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaCrawlZURL.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/plasma/plasmaCrawlZURL.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -34,7 +34,7 @@
import de.anomic.kelondro.kelondroBase64Order;
import de.anomic.kelondro.kelondroEcoTable;
-import de.anomic.kelondro.kelondroFlexTable;
+import de.anomic.kelondro.kelondroFlexWidthArray;
import de.anomic.kelondro.kelondroIndex;
import de.anomic.kelondro.kelondroRow;
import de.anomic.kelondro.kelondroRowSet;
@@ -57,7 +57,7 @@
0);
// the class object
- private kelondroIndex urlIndex = null;
+ kelondroIndex urlIndex = null;
private LinkedList<String> stack = new LinkedList<String>(); // strings:
url
public plasmaCrawlZURL(File cachePath, String tablename, boolean
startWithEmptyFile) {
@@ -66,7 +66,7 @@
File f = new File(cachePath, tablename);
if (startWithEmptyFile) {
if (f.exists()) {
- if (f.isDirectory()) kelondroFlexTable.delete(cachePath,
tablename); else f.delete();
+ if (f.isDirectory()) kelondroFlexWidthArray.delete(cachePath,
tablename); else f.delete();
}
}
urlIndex = new kelondroEcoTable(f, rowdef,
kelondroEcoTable.tailCacheDenyUsage, EcoFSBufferSize, 0);
Modified: trunk/source/de/anomic/plasma/plasmaHTCache.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaHTCache.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/plasma/plasmaHTCache.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -99,7 +99,7 @@
private static final int stackLimit = 150; // if we exceed that limit, we
do not check idle
public static final long oneday = 1000 * 60 * 60 * 24; // milliseconds of
a day
- private static kelondroMapObjects responseHeaderDB = null;
+ static kelondroMapObjects responseHeaderDB = null;
private static final LinkedList<Entry> cacheStack = new
LinkedList<Entry>();
private static final Map<String, File> cacheAge =
Collections.synchronizedMap(new TreeMap<String, File>()); // a <date+hash,
cache-path> - relation
public static long curCacheSize = 0;
@@ -298,7 +298,7 @@
}
}
- private static void resetResponseHeaderDB() {
+ static void resetResponseHeaderDB() {
if (responseHeaderDB != null) responseHeaderDB.close();
File dbfile = new File(cachePath, DB_NAME);
if (dbfile.exists()) dbfile.delete();
Modified: trunk/source/de/anomic/plasma/plasmaSearchEvent.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaSearchEvent.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/plasma/plasmaSearchEvent.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -68,9 +68,9 @@
private static final int max_results_preparation = 200;
private long eventTime;
- private plasmaSearchQuery query;
+ plasmaSearchQuery query;
private plasmaWordIndex wordIndex;
- private plasmaSearchRankingProcess rankedCache; // ordered search results,
grows dynamically as all the query threads enrich this container
+ plasmaSearchRankingProcess rankedCache; // ordered search results, grows
dynamically as all the query threads enrich this container
private Map<String, TreeMap<String, String>> rcAbstracts; // cache for
index abstracts; word:TreeMap mapping where the embedded TreeMap is a
urlhash:peerlist relation
private yacySearch[] primarySearchThreads, secondarySearchThreads;
private Thread localSearchThread;
@@ -80,12 +80,12 @@
public TreeMap<String, Integer> IACount;
public String IAmaxcounthash, IAneardhthash;
private resultWorker[] workerThreads;
- private kelondroSortStore<ResultEntry> result;
- private kelondroSortStore<plasmaSnippetCache.MediaSnippet> images; //
container to sort images by size
- private HashMap<String, String> failedURLs; // a mapping from a urlhash to
a fail reason string
+ kelondroSortStore<ResultEntry> result;
+ kelondroSortStore<plasmaSnippetCache.MediaSnippet> images; // container to
sort images by size
+ HashMap<String, String> failedURLs; // a mapping from a urlhash to a fail
reason string
TreeSet<String> snippetFetchWordHashes; // a set of word hashes that are
used to match with the snippets
- private long urlRetrievalAllTime;
- private long snippetComputationAllTime;
+ long urlRetrievalAllTime;
+ long snippetComputationAllTime;
@SuppressWarnings("unchecked")
private plasmaSearchEvent(plasmaSearchQuery query,
@@ -270,7 +270,7 @@
}
}
- private ResultEntry obtainResultEntry(indexURLEntry page, int
snippetFetchMode) {
+ ResultEntry obtainResultEntry(indexURLEntry page, int snippetFetchMode) {
// a search result entry needs some work to produce a result Entry:
// - check if url entry exists in LURL-db
@@ -391,7 +391,7 @@
return false;
}
- private boolean anyRemoteSearchAlive() {
+ boolean anyRemoteSearchAlive() {
// check primary search threads
if ((this.primarySearchThreads != null) &&
(this.primarySearchThreads.length != 0)) {
for (int i = 0; i < this.primarySearchThreads.length; i++) {
@@ -650,7 +650,7 @@
boolean secondarySearchStartet = false;
- private void prepareSecondarySearch() {
+ void prepareSecondarySearch() {
if (secondarySearchStartet) return; // don't do this twice
if ((rcAbstracts == null) || (rcAbstracts.size() !=
query.queryHashes.size())) return; // secondary search not possible (yet)
Modified: trunk/source/de/anomic/plasma/plasmaSnippetCache.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaSnippetCache.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/plasma/plasmaSnippetCache.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -116,7 +116,7 @@
private String line;
private String error;
private int errorCode;
- private Set<String> remaingHashes;
+ Set<String> remaingHashes;
private yacyURL favicon;
public TextSnippet(yacyURL url, String line, int errorCode,
Set<String> remaingHashes, String errortext) {
Modified: trunk/source/de/anomic/plasma/plasmaSwitchboardQueue.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaSwitchboardQueue.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/plasma/plasmaSwitchboardQueue.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -62,9 +62,9 @@
public class plasmaSwitchboardQueue {
- private kelondroStack sbQueueStack;
- private plasmaCrawlProfile profiles;
- private plasmaCrawlLURL lurls;
+ kelondroStack sbQueueStack;
+ plasmaCrawlProfile profiles;
+ plasmaCrawlLURL lurls;
private File sbQueueStackPath;
public plasmaSwitchboardQueue(plasmaCrawlLURL lurls, File
sbQueueStackPath, plasmaCrawlProfile profiles) {
@@ -191,14 +191,14 @@
}
public class Entry {
- private yacyURL url; // plasmaURL.urlStringLength
- private String referrerHash; // plasmaURL.urlHashLength
- private Date ifModifiedSince; // 6
- private byte flags; // 1
- private String initiator; // yacySeedDB.commonHashLength
- private int depth; // plasmaURL.urlCrawlDepthLength
- private String profileHandle; // plasmaURL.urlCrawlProfileHandleLength
- private String anchorName; // plasmaURL.urlDescrLength
+ yacyURL url; // plasmaURL.urlStringLength
+ String referrerHash; // plasmaURL.urlHashLength
+ Date ifModifiedSince; // 6
+ byte flags; // 1
+ String initiator; // yacySeedDB.commonHashLength
+ int depth; // plasmaURL.urlCrawlDepthLength
+ String profileHandle; // plasmaURL.urlCrawlProfileHandleLength
+ String anchorName; // plasmaURL.urlDescrLength
// computed values
private plasmaCrawlProfile.entry profileEntry;
Modified: trunk/source/de/anomic/plasma/plasmaWebStructure.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaWebStructure.java 2008-03-03
22:36:27 UTC (rev 4523)
+++ trunk/source/de/anomic/plasma/plasmaWebStructure.java 2008-03-04
22:45:45 UTC (rev 4524)
@@ -55,7 +55,7 @@
private serverLog log;
private File rankingPath, structureFile;
private String crlFile, crgFile;
- private TreeMap<String, String> structure; // <b64hash(6)>','<host> to
<date-yyyymmdd(8)>{<target-b64hash(6)><target-count-hex(4)>}*
+ TreeMap<String, String> structure; // <b64hash(6)>','<host> to
<date-yyyymmdd(8)>{<target-b64hash(6)><target-count-hex(4)>}*
public plasmaWebStructure(serverLog log, File rankingPath, String crlFile,
String crgFile, File structureFile) {
this.log = log;
@@ -181,7 +181,7 @@
return (refs.length() - 8) / 10;
}
- private static Map<String, Integer> refstr2map(String refs) {
+ static Map<String, Integer> refstr2map(String refs) {
if ((refs == null) || (refs.length() <= 8)) return new HashMap<String,
Integer>();
Map<String, Integer> map = new HashMap<String, Integer>();
String c;
Modified: trunk/source/de/anomic/server/serverCore.java
===================================================================
--- trunk/source/de/anomic/server/serverCore.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/server/serverCore.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -96,7 +96,7 @@
public static final Class<?>[] stringType = {"".getClass()}; // set up
some reflection
public static final long startupTime = System.currentTimeMillis();
public static final ThreadGroup sessionThreadGroup = new
ThreadGroup("sessionThreadGroup");
- private static int sessionCounter = 0; // will be increased with each
session and is used to return a hash code
+ static int sessionCounter = 0; // will be increased with each session and
is used to return a hash code
// static variables
public static final Boolean TERMINATE_CONNECTION = Boolean.FALSE;
@@ -122,7 +122,7 @@
HashMap<String, String> denyHost;
int commandMaxLength;
private int maxBusySessions;
- private HashSet<Session> busySessions;
+ HashSet<Session> busySessions;
/*
private static ServerSocketFactory getServerSocketFactory(boolean dflt,
File keyfile, String passphrase) {
Modified: trunk/source/de/anomic/xml/crawlHandler.java
===================================================================
--- trunk/source/de/anomic/xml/crawlHandler.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/xml/crawlHandler.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -39,7 +39,7 @@
public class crawlHandler extends DefaultHandler {
// statics for item generation and automatic categorization
- private static int guidcount = 0;
+ static int guidcount = 0;
private static final String[] startpointTags = new String[]{
"author", //
"copyright", //
Modified: trunk/source/de/anomic/xml/rssReader.java
===================================================================
--- trunk/source/de/anomic/xml/rssReader.java 2008-03-03 22:36:27 UTC (rev
4523)
+++ trunk/source/de/anomic/xml/rssReader.java 2008-03-04 22:45:45 UTC (rev
4524)
@@ -46,7 +46,7 @@
public class rssReader extends DefaultHandler {
// statics for item generation and automatic categorization
- private static int guidcount = 0;
+ static int guidcount = 0;
private static final String[] tagsDef = new String[]{
"author", //
"copyright", //
Modified: trunk/source/de/anomic/yacy/yacyCore.java
===================================================================
--- trunk/source/de/anomic/yacy/yacyCore.java 2008-03-03 22:36:27 UTC (rev
4523)
+++ trunk/source/de/anomic/yacy/yacyCore.java 2008-03-04 22:45:45 UTC (rev
4524)
@@ -283,7 +283,7 @@
}
protected class publishThread extends Thread {
- private int added;
+ int added;
private yacySeed seed;
private final serverSemaphore sync;
private final List<Thread> syncList;
Modified: trunk/source/de/anomic/yacy/yacyNewsQueue.java
===================================================================
--- trunk/source/de/anomic/yacy/yacyNewsQueue.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/yacy/yacyNewsQueue.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -58,7 +58,7 @@
public class yacyNewsQueue {
private File path;
- private kelondroStack queueStack;
+ kelondroStack queueStack;
private yacyNewsDB newsDB;
public static final kelondroRow rowdef = new kelondroRow(new
kelondroColumn[]{
@@ -144,7 +144,7 @@
return null;
}
- private yacyNewsRecord b2r(kelondroRow.Entry b) throws IOException {
+ yacyNewsRecord b2r(kelondroRow.Entry b) throws IOException {
if (b == null) return null;
String id = b.getColString(0, null);
//Date touched = yacyCore.parseUniversalDate(new String(b[1]));
Modified: trunk/source/de/anomic/ymage/ymageBMPParser.java
===================================================================
--- trunk/source/de/anomic/ymage/ymageBMPParser.java 2008-03-03 22:36:27 UTC
(rev 4523)
+++ trunk/source/de/anomic/ymage/ymageBMPParser.java 2008-03-04 22:45:45 UTC
(rev 4524)
@@ -42,7 +42,7 @@
public static int INFOHEADER_size = 40;
// compression tags
- private static int BI_RGB = 0;
+ static int BI_RGB = 0;
//private static int BI_RLE8 = 1;
//private static int BI_RLE4 = 2;
//private static int BI_BITFIELDS = 3;
Added: trunk/source/screenshot.java
===================================================================
--- trunk/source/screenshot.java 2008-03-03 22:36:27 UTC (rev 4523)
+++ trunk/source/screenshot.java 2008-03-04 22:45:45 UTC (rev 4524)
@@ -0,0 +1,38 @@
+
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.image.BufferedImage;
+import java.io.File;
+
+import javax.imageio.ImageIO;
+
+
+public class screenshot {
+ /*
+ try {
+ Robot robot = new Robot();
+
+ Rectangle area = new
Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
+ BufferedImage bufferedImage = robot.createScreenCapture(area);
+
+ } catch (AWTException e) {
+ }
+ */
+ public static void main(String[] args) throws Exception {
+
+ Toolkit toolkit = Toolkit.getDefaultToolkit();
+ Dimension screenSize = toolkit.getScreenSize();
+ Rectangle screenRect = new Rectangle(screenSize);
+ // create screen shot
+ Robot robot = new Robot();
+ BufferedImage image = robot.createScreenCapture(screenRect);
+ String outFileName = "test.png";
+ // save captured image to PNG file
+ ImageIO.write(image, "png", new File(outFileName));
+ // give feedback
+ System.out.println("Saved screen shot (" + image.getWidth() + " x " +
image.getHeight() + " pixels) to file \"" + outFileName + "\".");
+
+ }
+}
Property changes on: trunk/source/screenshot.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
_______________________________________________
YaCy-svn mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/yacy-svn