Skip to content

Commit

Permalink
removed generation of anchor link sets in document types that describ…
Browse files Browse the repository at this point in the history
…e container formats.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5890 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Apr 27, 2009
1 parent 50e96ee commit 5a634ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion source/de/anomic/plasma/parser/rpm/rpmParser.java
Expand Up @@ -121,7 +121,7 @@ public plasmaParserDocument parse(final yacyURL location, final String mimeType,
else if (headerNames[i].equalsIgnoreCase("SUMMARY")) summary = tag.toString();
else if (headerNames[i].equalsIgnoreCase("DESCRIPTION")) description = tag.toString();
else if (headerNames[i].equalsIgnoreCase("PACKAGER")) packager = tag.toString();
else if (headerNames[i].equalsIgnoreCase("URL")) anchors.put(new yacyURL(tag.toString(), null), tag.toString());
//else if (headerNames[i].equalsIgnoreCase("URL")) anchors.put(new yacyURL(tag.toString(), null), tag.toString());
}

// closing the rpm file
Expand Down
Expand Up @@ -25,9 +25,6 @@

import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import SevenZip.ArchiveExtractCallback;
import SevenZip.Archive.IInArchive;
Expand Down Expand Up @@ -105,6 +102,7 @@ public void SetOperationResult(final int arg0) throws IOException {
theDoc = this.parser.parseSource(url, mime, null, this.cfos.getContentBAOS());
}

/*
// revert the above workaround
final Map<yacyURL, String> nanchors = new HashMap<yacyURL, String>(theDoc.getAnchors().size(), 1f);
final Iterator<Map.Entry<yacyURL, String>> it = theDoc.getAnchors().entrySet().iterator();
Expand All @@ -124,6 +122,7 @@ public void SetOperationResult(final int arg0) throws IOException {
}
theDoc.getAnchors().clear();
theDoc.getAnchors().putAll(nanchors);
*/
this.doc.addSubDocument(theDoc);
}
} catch (final ParserException e) {
Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/plasma/parser/tar/tarParser.java
Expand Up @@ -173,7 +173,7 @@ public plasmaParserDocument parse(final yacyURL location, final String mimeType,
docTextLength += FileUtils.copy(subDoc.getText(), docText);
}

docAnchors.putAll(subDoc.getAnchors());
//docAnchors.putAll(subDoc.getAnchors());
htmlFilterContentScraper.addAllImages(docImages, subDoc.getImages());

// release subdocument
Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/plasma/parser/zip/zipParser.java
Expand Up @@ -156,7 +156,7 @@ public plasmaParserDocument parse(final yacyURL location, final String mimeType,
docTextLength += FileUtils.copy(subDoc.getText(), docText);
}

docAnchors.putAll(subDoc.getAnchors());
//docAnchors.putAll(subDoc.getAnchors());
htmlFilterContentScraper.addAllImages(docImages, subDoc.getImages());

// release subdocument
Expand Down

0 comments on commit 5a634ca

Please sign in to comment.