Class DocumentProcessing

java.lang.Object
com.yahoo.application.container.DocumentProcessing

public final class DocumentProcessing extends Object
For doing document processing with JDisc.
Author:
Einar M R Rosenvinge
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<String,com.yahoo.document.annotation.AnnotationType>
     
    com.yahoo.processing.execution.chain.ChainRegistry<com.yahoo.docproc.DocumentProcessor>
    Returns a registry of configured docproc chains.
    Map<String,com.yahoo.document.DocumentType>
     
    com.yahoo.docproc.DocumentProcessor.Progress
    process(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing)
    Processes the given Processing through the specified chain.
    com.yahoo.docproc.DocumentProcessor.Progress
    processOnce(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing)
    Processes the given Processing through the specified chain.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • process

      public com.yahoo.docproc.DocumentProcessor.Progress process(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing)
      Processes the given Processing through the specified chain. Note that if one DocumentProcessor in the chain returns a DocumentProcessor.LaterProgress, the calling thread will sleep for the duration specified in DocumentProcessor.LaterProgress#getDelay(), and then run again. This method will hence return when a document processor returns DocumentProcessor.Progress#DONE or DocumentProcessor.Progress#FAILED, throws an exception, or if the calling thread is interrupted. This method will never return a DocumentProcessor.LaterProgress.
      Parameters:
      chain - the specification of the chain to execute
      processing - the Processing to process
      Returns:
      Progress.DONE or Progress.FAILED
      Throws:
      RuntimeException - if one of the document processors in the chain throws, or if the calling thread is interrupted
    • processOnce

      public com.yahoo.docproc.DocumentProcessor.Progress processOnce(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing)
      Processes the given Processing through the specified chain. Note that if one DocumentProcessor in the chain returns a DocumentProcessor.LaterProgress, it will be returned by this method. This method will hence return whenever a document processor returns any DocumentProcessor.Progress, or throws an exception.
      Parameters:
      chain - the specification of the chain to execute
      processing - the Processing to process
      Returns:
      any Progress
      Throws:
      RuntimeException - if one of the document processors in the chain throws
    • getChains

      public com.yahoo.processing.execution.chain.ChainRegistry<com.yahoo.docproc.DocumentProcessor> getChains()
      Returns a registry of configured docproc chains.
      Returns:
      a registry of configured docproc chains
    • getDocumentTypes

      public Map<String,com.yahoo.document.DocumentType> getDocumentTypes()
    • getAnnotationTypes

      public Map<String,com.yahoo.document.annotation.AnnotationType> getAnnotationTypes()