net.ontopia.infoset.fulltext.utils
Class DocumentPreloaderProcessor

java.lang.Object
  extended by net.ontopia.infoset.fulltext.utils.AbstractLocatorDocumentProcessor
      extended by net.ontopia.infoset.fulltext.utils.DocumentPreloaderProcessor
All Implemented Interfaces:
DocumentProcessorIF

public class DocumentPreloaderProcessor
extends AbstractLocatorDocumentProcessor

INTERNAL: A document processor that preloads an external document referenced by one of the documents fields.


Field Summary
protected  DocumentProcessorIF post_processor
           
protected  DocumentProcessorIF pre_processor
           
protected  PreloaderIF preloader
           
 
Fields inherited from class net.ontopia.infoset.fulltext.utils.AbstractLocatorDocumentProcessor
address_field, notation_field
 
Constructor Summary
DocumentPreloaderProcessor(PreloaderIF preloader)
           
DocumentPreloaderProcessor(PreloaderIF preloader, java.lang.String notation_field, java.lang.String address_field)
           
 
Method Summary
 DocumentProcessorIF getPostProcessor()
          INTERNAL: Gets the document post-processor if any.
 java.lang.String getPreloadedAddressField()
          INTERNAL: Gets the name of the preloaded address field.
 java.lang.String getPreloadedNotationField()
          INTERNAL: Gets the name of the preloaded notation field.
 DocumentProcessorIF getPreProcessor()
          INTERNAL: Gets the document pre-processor if any.
 boolean needsProcessing(DocumentIF document)
          INTERNAL: Can be used to figure out if it is necessary to process the document.
 void process(DocumentIF document)
          INTERNAL: Processes the specified document.
 void setPostProcessor(DocumentProcessorIF post_processor)
          INTERNAL: Sets the document post-processor.
 void setPreProcessor(DocumentProcessorIF pre_processor)
          INTERNAL: Sets the document pre-processor.
 
Methods inherited from class net.ontopia.infoset.fulltext.utils.AbstractLocatorDocumentProcessor
getAddressField, getLocator, getNotationField, setAddressField, setNotationField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

preloader

protected PreloaderIF preloader

pre_processor

protected DocumentProcessorIF pre_processor

post_processor

protected DocumentProcessorIF post_processor
Constructor Detail

DocumentPreloaderProcessor

public DocumentPreloaderProcessor(PreloaderIF preloader)

DocumentPreloaderProcessor

public DocumentPreloaderProcessor(PreloaderIF preloader,
                                  java.lang.String notation_field,
                                  java.lang.String address_field)
Method Detail

getPreProcessor

public DocumentProcessorIF getPreProcessor()
INTERNAL: Gets the document pre-processor if any.


setPreProcessor

public void setPreProcessor(DocumentProcessorIF pre_processor)
INTERNAL: Sets the document pre-processor.


getPostProcessor

public DocumentProcessorIF getPostProcessor()
INTERNAL: Gets the document post-processor if any.


setPostProcessor

public void setPostProcessor(DocumentProcessorIF post_processor)
INTERNAL: Sets the document post-processor.


getPreloadedNotationField

public java.lang.String getPreloadedNotationField()
INTERNAL: Gets the name of the preloaded notation field. This is the field in which the notation of the locator pointing to the preloaded resource is put.


getPreloadedAddressField

public java.lang.String getPreloadedAddressField()
INTERNAL: Gets the name of the preloaded address field. This is the field in which the address of the locator pointing to the preloaded resource is put.


process

public void process(DocumentIF document)
             throws java.lang.Exception
Description copied from interface: DocumentProcessorIF
INTERNAL: Processes the specified document.

Throws:
java.lang.Exception

needsProcessing

public boolean needsProcessing(DocumentIF document)
Description copied from interface: DocumentProcessorIF
INTERNAL: Can be used to figure out if it is necessary to process the document.

This method should be used to quickly decide whether or not the document needs to be processed. Note that this method should return quickly, since it would normally be executed serially.

Returns:
Returns true if the document should be processed.


Copyright © 2000-2012 Ontopia.