better integration of RDFaParser

This commit is contained in:
Michael Peter Christen 2012-06-20 16:39:04 +02:00
parent fa98657bb3
commit 786be7d175
4 changed files with 10 additions and 1 deletions

View File

@ -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=".">

View File

@ -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(",");

View File

@ -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);

View File

@ -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(