Class XMLReader

  • All Implemented Interfaces:
    org.apache.uima.collection.base_cpm.BaseCollectionReader, org.apache.uima.collection.CollectionReader, org.apache.uima.resource.ConfigurableResource, org.apache.uima.resource.Resource

    public class XMLReader
    extends org.apache.uima.collection.CollectionReader_ImplBase
    CollectionReader for MEDLINE (www.pubmed.gov) Abstracts in XML that initializes some information in the CAS
    Author:
    muehlhausen
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String PARAM_HEADER_TYPE
      Configuration parameter defined in the descriptor.
      static String PARAM_INPUT_DIR
      Configuration parameter defined in the descriptor.
      static String PARAM_INPUT_FILE
      Configuration parameter defined in the descriptor
      static String PARAM_MAPPING_FILE
      Configuration parameter defined in the descriptor
      • Fields inherited from interface org.apache.uima.resource.Resource

        PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLReader()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void getNext​(org.apache.uima.cas.CAS cas)  
      org.apache.uima.util.Progress[] getProgress()  
      boolean hasNext()  
      void initialize()  
      • Methods inherited from class org.apache.uima.collection.CollectionReader_ImplBase

        destroy, getCasInitializer, getProcessingResourceMetaData, initialize, isConsuming, reconfigure, setCasInitializer, typeSystemInit
      • Methods inherited from class org.apache.uima.resource.ConfigurableResource_ImplBase

        getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue
      • Methods inherited from class org.apache.uima.resource.Resource_ImplBase

        getCasManager, getLogger, getMetaData, getRelativePathResolver, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger, setMetaData
      • Methods inherited from interface org.apache.uima.resource.ConfigurableResource

        getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue
      • Methods inherited from interface org.apache.uima.resource.Resource

        getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger
    • Field Detail

      • PARAM_INPUT_DIR

        public static final String PARAM_INPUT_DIR
        Configuration parameter defined in the descriptor. Name of configuration parameter that must be set to the path of a directory containing input files.
        See Also:
        Constant Field Values
      • PARAM_INPUT_FILE

        public static final String PARAM_INPUT_FILE
        Configuration parameter defined in the descriptor
        See Also:
        Constant Field Values
      • PARAM_MAPPING_FILE

        public static final String PARAM_MAPPING_FILE
        Configuration parameter defined in the descriptor
        See Also:
        Constant Field Values
      • PARAM_HEADER_TYPE

        public static final String PARAM_HEADER_TYPE
        Configuration parameter defined in the descriptor. Defaults to "de.julielab.jcore.types.Header". Must be assignment compatible to "de.julielab.jcore.types.Header". Only required when no header is built by the XML mapper.
        See Also:
        Constant Field Values
    • Constructor Detail

      • XMLReader

        public XMLReader()
    • Method Detail

      • initialize

        public void initialize()
                        throws org.apache.uima.resource.ResourceInitializationException
        Overrides:
        initialize in class org.apache.uima.collection.CollectionReader_ImplBase
        Throws:
        org.apache.uima.resource.ResourceInitializationException
      • getNext

        public void getNext​(org.apache.uima.cas.CAS cas)
                     throws IOException,
                            org.apache.uima.collection.CollectionException
        Throws:
        IOException
        org.apache.uima.collection.CollectionException
        See Also:
        CollectionReader.getNext(org.apache.uima.cas.CAS)
      • hasNext

        public boolean hasNext()
                        throws IOException,
                               org.apache.uima.collection.CollectionException
        Throws:
        IOException
        org.apache.uima.collection.CollectionException
        See Also:
        BaseCollectionReader.hasNext()
      • getProgress

        public org.apache.uima.util.Progress[] getProgress()
        See Also:
        BaseCollectionReader.getProgress()