Package org.apache.droids.parse

Examples of org.apache.droids.parse.ParseImpl


    this.mimeType = mimeType;
  }

  @Override
  public Parse getParse() {
    return new ParseImpl(text, outlinks);
  }
View Full Code Here


    } catch (SAXException ex) {
      throw new ContentFormatViolationException("Failure parsing HTML content", ex);
    } finally {
      instream.close();
    }
    return new ParseImpl(newLink.getId(),linkExtractor.getLinks());
  }
View Full Code Here

    BodyContentHandler handler = new BodyContentHandler();
   
    InputStream instream = entity.obtainContent();
    try {
      parser.parse(instream, handler, metadata, new ParseContext());
      ParseImpl parse = new ParseImpl(handler.toString(),null);
     
      return parse;

    } catch (SAXException ex) {
      throw new DroidsException("Failure parsing document " + link.getId(), ex);
View Full Code Here

    InputStream instream = entity.obtainContent();
    try {
      parser.parse(instream, parallelHandler, metadata);
     
      return new ParseImpl(data.toString(), extractor.getLinks());
    } catch (SAXException ex) {
      throw new DroidsException("Failure parsing document " + link.getId(), ex);
    } catch (TikaException ex) {
      throw new DroidsException("Failure parsing document " + link.getId(), ex);
    } finally {
View Full Code Here

    } catch (SAXException ex) {
      throw new ContentFormatViolationException("Failure parsing HTML content", ex);
    } finally {
      instream.close();
    }
    return new ParseImpl(newLink.getId(),linkExtractor.getLinks());
  }
View Full Code Here

TOP

Related Classes of org.apache.droids.parse.ParseImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.