Package org.springmodules.lucene.index.support.file

Examples of org.springmodules.lucene.index.support.file.DocumentHandler


   * @see DocumentHandler#getDocument(Map, InputStream)
   * @see FileExtensionNotSupportedException
   */
  public final Document createDocumentFromInputStream(
                            InputStream inputStream) throws IOException {
    DocumentHandler documentHandler=documentHandlerManager.getDocumentHandler(getResourceName());
    if( documentHandler!=null ) {
      Document document=documentHandler.getDocument(getResourceDescription(),inputStream);
      addFields(document);
      return document;
    } else {
      throw new FileExtensionNotSupportedException("No handler for this resource name");
    }
View Full Code Here


   * @see #doCallHandler(File, FileInputStream, DocumentHandler)
   * @see DocumentIndexingListener
   */
  private void indexFile(IndexWriter writer,File file) throws IOException {
    fireListenersOnBeforeFile(file);
    DocumentHandler handler = getDocumentHandler(file.getPath());
    if( handler!=null ) {
      FileInputStream inputStream=null;
      try {
        inputStream=new FileInputStream(file);
        Document document=doCallHandler(file,inputStream,handler);
View Full Code Here

TOP

Related Classes of org.springmodules.lucene.index.support.file.DocumentHandler

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.