incubator-droids-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfrov...@apache.org
Subject svn commit: r1205270 - in /incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika: TikaDocumentParser.java TikaHtmlParser.java api/ parse/
Date Wed, 23 Nov 2011 02:46:24 GMT
Author: rfrovarp
Date: Wed Nov 23 02:46:23 2011
New Revision: 1205270

URL: http://svn.apache.org/viewvc?rev=1205270&view=rev
Log:
Revert Tika updates. Will put new capabilities in trunk

Removed:
    incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/api/
    incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/parse/
Modified:
    incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/TikaDocumentParser.java
    incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/TikaHtmlParser.java

Modified: incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/TikaDocumentParser.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/TikaDocumentParser.java?rev=1205270&r1=1205269&r2=1205270&view=diff
==============================================================================
--- incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/TikaDocumentParser.java
(original)
+++ incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/TikaDocumentParser.java
Wed Nov 23 02:46:23 2011
@@ -23,10 +23,10 @@ import java.io.InputStream;
 
 import org.apache.droids.api.ContentEntity;
 import org.apache.droids.api.Link;
+import org.apache.droids.api.Parse;
+import org.apache.droids.api.Parser;
 import org.apache.droids.exception.DroidsException;
-import org.apache.droids.tika.api.TikaParse;
-import org.apache.droids.tika.api.TikaParser;
-import org.apache.droids.tika.parse.TikaParseImpl;
+import org.apache.droids.parse.ParseImpl;
 import org.apache.tika.exception.TikaException;
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.parser.AutoDetectParser;
@@ -34,10 +34,10 @@ import org.apache.tika.parser.ParseConte
 import org.apache.tika.sax.BodyContentHandler;
 import org.xml.sax.SAXException;
 
-public class TikaDocumentParser implements TikaParser {
+public class TikaDocumentParser implements Parser {
 
   @Override
-  public TikaParse parse(ContentEntity entity, Link link) throws DroidsException,
+  public Parse parse(ContentEntity entity, Link link) throws DroidsException,
       IOException {
     org.apache.tika.parser.Parser parser = new AutoDetectParser();
     Metadata metadata = new Metadata();
@@ -46,7 +46,7 @@ public class TikaDocumentParser implemen
     InputStream instream = entity.obtainContent();
     try {
       parser.parse(instream, handler, metadata, new ParseContext());
-      TikaParseImpl parse = new TikaParseImpl(handler.toString(),null);
+      ParseImpl parse = new ParseImpl(handler.toString(),null);
       
       return parse;
 

Modified: incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/TikaHtmlParser.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/TikaHtmlParser.java?rev=1205270&r1=1205269&r2=1205270&view=diff
==============================================================================
--- incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/TikaHtmlParser.java
(original)
+++ incubator/droids/branches/0.1.x/droids-tika/src/main/java/org/apache/droids/tika/TikaHtmlParser.java
Wed Nov 23 02:46:23 2011
@@ -23,11 +23,11 @@ import java.util.Map;
 
 import org.apache.droids.api.ContentEntity;
 import org.apache.droids.api.Link;
+import org.apache.droids.api.Parse;
+import org.apache.droids.api.Parser;
 import org.apache.droids.exception.DroidsException;
+import org.apache.droids.parse.ParseImpl;
 import org.apache.droids.parse.html.LinkExtractor;
-import org.apache.droids.tika.api.TikaParse;
-import org.apache.droids.tika.api.TikaParser;
-import org.apache.droids.tika.parse.TikaParseImpl;
 import org.apache.tika.exception.TikaException;
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.parser.AutoDetectParser;
@@ -35,7 +35,7 @@ import org.apache.tika.parser.ParseConte
 import org.apache.tika.sax.TeeContentHandler;
 import org.xml.sax.SAXException;
 
-public class TikaHtmlParser implements TikaParser {
+public class TikaHtmlParser implements Parser {
 
   private Map<String, String> elements= null;
 
@@ -51,7 +51,7 @@ public class TikaHtmlParser implements T
   }
 
   @Override
-  public TikaParse parse(ContentEntity entity, Link link) throws IOException, DroidsException
{
+  public Parse parse(ContentEntity entity, Link link) throws IOException, DroidsException
{
     // Init Tika objects
     org.apache.tika.parser.Parser parser = new AutoDetectParser();
     Metadata metadata = new Metadata();
@@ -69,7 +69,7 @@ public class TikaHtmlParser implements T
     try {
       parser.parse(instream, parallelHandler, metadata, new ParseContext());
       
-      return new TikaParseImpl(data.toString(), extractor.getLinks());
+      return new ParseImpl(data.toString(), extractor.getLinks());
     } catch (SAXException ex) {
       throw new DroidsException("Failure parsing document " + link.getId(), ex);
     } catch (TikaException ex) {



Mime
View raw message