Package org.semanticdesktop.aperture.extractor

Examples of org.semanticdesktop.aperture.extractor.ExtractorException


        if (charset == null) {
            try {
                encoding = CharsetRecognizer.detect(input, "html", null);
            } catch (IOException e) {
                LOG.error("Charset detection problem: " + e.getMessage());
                throw new ExtractorException("Charset detection problem: " + e.getMessage());
            }
        }
        Document doc = htmlParser.getDOM(input, encoding);
        htmlExtractor.extract(id.toString(), doc, null, result);
    }
View Full Code Here


            copyAddress(getRecipients(message, RecipientType.BCC), NMO.bcc, result);
           
            MailUtil.getDates(message, result);
           
        } catch (MessagingException e) {
            throw new ExtractorException(e);
        } catch (IOException e) {
            throw new ExtractorException(e);
        }
    }
View Full Code Here

        // parse the HTML and extract full-text and metadata
        HtmlTextExtractUtil extractor;
        try {
            extractor = new HtmlTextExtractUtil();
        } catch (InitializationException e) {
            throw new ExtractorException("Could not initialize HtmlExtractor: " + e.getMessage());
        }
        InputStream stream = new ByteArrayInputStream(string.getBytes());
        RDFContainerFactory containerFactory = new RDFContainerFactoryImpl();
        URI id = rdf.getDescribedUri();
        RDFContainer result = containerFactory.getRDFContainer(id);
View Full Code Here

      ID3Wrapper wrapper = new ID3Wrapper(id3v1,id3v2);
      addId3Fields(wrapper,result);
      result.add(RDF.type, NID3.ID3Audio);
     
    } catch (UnsupportedTagException e) {
      throw new ExtractorException(e);
    } catch (InvalidDataException e) {
      throw new ExtractorException(e);
    } catch (IOException e) {
      throw new ExtractorException(e);
    }
  }
View Full Code Here

            }
            try {
                encoding = CharsetRecognizer.detect(input, "html", "UTF-8");
            } catch (IOException e) {
                LOG.error("Charset detection problem: " + e.getMessage());
                throw new ExtractorException("Charset detection problem: "
                    + e.getMessage());
            }
        }
        else {
            encoding = charset.name();
View Full Code Here

            LOG.debug(rdf);
            StringReader reader = new StringReader(rdf);
            result.getModel().readFrom(reader, this.syntax);
            reader.close();
        } catch (TransformerException e) {
            throw new ExtractorException(e.getMessage(), e);
        } catch (ModelRuntimeException e) {
            throw new ExtractorException(e.getMessage(), e);
        } catch (IOException e) {
            throw new ExtractorException(e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of org.semanticdesktop.aperture.extractor.ExtractorException

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.