Beispiel #1
0
 @Override
 protected String renderText(InputStream in, String filename) throws ParseException {
   try {
     Source source = new Source(in);
     source.setLogger(null);
     return source.getTextExtractor().toString();
   } catch (IOException e) {
     throw new ParseException(e);
   }
 }
Beispiel #2
0
 @Override
 protected ParseResult parse(InputStream in, ParseContext context) throws ParseException {
   try {
     Source source = new Source(in);
     source.setLogger(null);
     return new ParseResult(source.getTextExtractor().toString())
         .setTitle(getElementContent(source, "dc:title"))
         .addAuthor(getElementContent(source, "dc:creator"));
   } catch (IOException e) {
     throw new ParseException(e);
   }
 }