fixes to parser

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6323 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 4a1c852435
commit 902d16cf6c

@ -555,12 +555,10 @@ dc_rights
}
public int inboundLinks() {
assert this.inboundLinks >= 0;
return (this.inboundLinks < 0) ? 0 : this.inboundLinks;
}
public int outboundLinks() {
assert this.outboundLinks >= 0;
return (this.outboundLinks < 0) ? 0 : this.outboundLinks;
}

@ -124,6 +124,7 @@ public class tarParser extends AbstractParser implements Idiom {
// skip directories
if (entry.isDirectory()) continue;
if (entry.getSize() <= 0) continue;
// Get the short entry name
final String entryName = entry.getName();

@ -113,6 +113,7 @@ public class zipParser extends AbstractParser implements Idiom {
// skip directories
if (entry.isDirectory()) continue;
if (entry.getSize() <= 0) continue;
// Get the entry name
final String entryName = entry.getName();

@ -82,7 +82,7 @@ public class DocumentIndex extends Segment {
throw new IOException("cannot parse " + file.toString() + ": " + e.getMessage());
}
final Condenser condenser = new Condenser(document, true, true);
return super.storeDocument(
return super.storeDocument(
url,
null,
new Date(file.lastModified()),
@ -119,7 +119,7 @@ public class DocumentIndex extends Segment {
try {
add(w);
} catch (IOException e) {
e.printStackTrace();
if (e.getMessage().indexOf("cannot parse") < 0) e.printStackTrace();
}
}
}
@ -154,6 +154,10 @@ public class DocumentIndex extends Segment {
return find(querystring, 0, 20);
}
public void close() {
super.close();
}
public static void main(String[] args) {
// first argument: path to segment
// second argument: either 'add' or 'search'

Loading…
Cancel
Save