Interface CasInitializer

All Superinterfaces:
ConfigurableResource, Resource
All Known Implementing Classes:
CasInitializer_ImplBase

@Deprecated public interface CasInitializer extends ConfigurableResource
Deprecated.
As of v2.0, CAS Initializers are deprecated. A component that performs an operation like HTML detagging should instead be implemented as a "multi-Sofa" annotator. See org.apache.uima.examples.XmlDetagger for an example.
A component that takes an Object and initializes a CAS.

CAS Initializers may be used by some CollectionReader implementations.

  • Method Details

    • typeSystemInit

      void typeSystemInit(TypeSystem aTypeSystem) throws ResourceInitializationException
      Deprecated.
      Informs this CasInitializer that the CAS TypeSystem has changed. The CollectionReader must call this method whenever the CollectionReader's typeSystemInit() method is called.

      In this method, the CasInitializer should use the TypeSystem to resolve the names of Type and Features to the actual Type and Feature objects, which can then be used during processing.

      Parameters:
      aTypeSystem - the type system to use
      Throws:
      ResourceInitializationException - if the type system is not compatible with this CAS Initializer
    • initializeCas

      void initializeCas(Object aObj, CAS aCAS) throws CollectionException, IOException
      Deprecated.
      Reads content and metadata from an Object and initializes a CAS.
      Parameters:
      aObj - the object to process
      aCAS - the CAS to populate
      Throws:
      CollectionException - if an error occurs during initialization of the CAS
      IOException - if an I/O failure occurs
    • getProcessingResourceMetaData

      ProcessingResourceMetaData getProcessingResourceMetaData()
      Deprecated.
      Gets the metadata that describes this CasInitializer.
      Returns:
      an object containing all metadata for this CasInitializer