Class FsIndexFactory

java.lang.Object
org.apache.uima.fit.factory.FsIndexFactory

public final class FsIndexFactory extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Comparator that orders FeatureStructures according to the reverse order of their key features (the opposite order as that defined by STANDARD_COMPARE).
    static final int
    Comparator that orders FeatureStructures according to the standard order of their key features.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.uima.resource.metadata.FsIndexCollection
    Creates a FsIndexCollection from all index descriptions that can be found via the pattern specified in the system property org.apache.uima.fit.fsindex.import_pattern or via the META-INF/org.apache.uima.fit/fsindexes.txt files in the classpath.
    static org.apache.uima.resource.metadata.FsIndexCollection
    createFsIndexCollection(Class<?> componentClass)
    Create index configuration data for a given class definition using reflection and the configuration parameter annotation.
    static org.apache.uima.resource.metadata.FsIndexCollection
    createFsIndexCollection(String... descriptorNames)
    Creates a FsIndexCollection from descriptor names.
    static org.apache.uima.resource.metadata.FsIndexCollection
    createFsIndexCollection(Collection<? extends org.apache.uima.resource.metadata.FsIndexDescription> descriptions)
    Create a index collection from a set of descriptions.
    static org.apache.uima.resource.metadata.FsIndexCollection
    createFsIndexCollection(org.apache.uima.resource.metadata.FsIndexDescription... descriptions)
    Create a index collection from a set of descriptions.
    static org.apache.uima.resource.metadata.FsIndexDescription
    createFsIndexDescription(String label, String kind, String typeName, boolean useTypePriorities, org.apache.uima.resource.metadata.FsIndexKeyDescription... keys)
     
    static org.apache.uima.resource.metadata.FsIndexKeyDescription
     
    static org.apache.uima.resource.metadata.FsIndexKeyDescription
    createFsIndexKeyDescription(String featureName, int comparator)
     
    static org.apache.uima.resource.metadata.FsIndexCollection
    Creates a FsIndexCollection from a descriptor file
    static void
    Force rescan of index descriptors.
    static String[]
    Get all currently accessible index descriptor locations.

    Methods inherited from class java.lang.Object

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

    • STANDARD_COMPARE

      public static final int STANDARD_COMPARE
      Comparator that orders FeatureStructures according to the standard order of their key features. For integer and float values, this is the standard linear order, and for strings it is lexicographic order.
      See Also:
    • REVERSE_STANDARD_COMPARE

      public static final int REVERSE_STANDARD_COMPARE
      Comparator that orders FeatureStructures according to the reverse order of their key features (the opposite order as that defined by STANDARD_COMPARE).
      See Also:
  • Method Details

    • createFsIndexCollection

      public static org.apache.uima.resource.metadata.FsIndexCollection createFsIndexCollection(Class<?> componentClass)
      Create index configuration data for a given class definition using reflection and the configuration parameter annotation.
      Parameters:
      componentClass - the class to analyze
      Returns:
      the index collection
    • createFsIndexDescription

      public static org.apache.uima.resource.metadata.FsIndexDescription createFsIndexDescription(String label, String kind, String typeName, boolean useTypePriorities, org.apache.uima.resource.metadata.FsIndexKeyDescription... keys)
      Parameters:
      label - the index label
      kind - the type of index
      typeName - the indexed feature structure type
      useTypePriorities - whether to respect type priorities
      keys - the index keys
      Returns:
      the index description
    • createFsIndexCollection

      public static org.apache.uima.resource.metadata.FsIndexCollection createFsIndexCollection(org.apache.uima.resource.metadata.FsIndexDescription... descriptions)
      Create a index collection from a set of descriptions.
      Parameters:
      descriptions - the index descriptions
      Returns:
      the index collection
    • createFsIndexCollection

      public static org.apache.uima.resource.metadata.FsIndexCollection createFsIndexCollection(Collection<? extends org.apache.uima.resource.metadata.FsIndexDescription> descriptions)
      Create a index collection from a set of descriptions.
      Parameters:
      descriptions - the index descriptions
      Returns:
      the index collection
    • createFsIndexKeyDescription

      public static org.apache.uima.resource.metadata.FsIndexKeyDescription createFsIndexKeyDescription(String featureName)
      Parameters:
      featureName - the feature to index
      Returns:
      the index key description
    • createFsIndexKeyDescription

      public static org.apache.uima.resource.metadata.FsIndexKeyDescription createFsIndexKeyDescription(String featureName, int comparator)
      Parameters:
      featureName - the feature to index
      comparator - the index comparator
      Returns:
      the index key description
    • createFsIndexCollection

      public static org.apache.uima.resource.metadata.FsIndexCollection createFsIndexCollection(String... descriptorNames)
      Creates a FsIndexCollection from descriptor names.
      Parameters:
      descriptorNames - The fully qualified, Java-style, dotted descriptor names.
      Returns:
      a FsIndexCollection that includes the indexes from all of the specified files.
    • createTypeSystemDescriptionFromPath

      public static org.apache.uima.resource.metadata.FsIndexCollection createTypeSystemDescriptionFromPath(String... descriptorURIs)
      Creates a FsIndexCollection from a descriptor file
      Parameters:
      descriptorURIs - The descriptor file paths.
      Returns:
      A FsIndexCollection that includes the indexes from all of the specified files.
    • createFsIndexCollection

      public static org.apache.uima.resource.metadata.FsIndexCollection createFsIndexCollection() throws org.apache.uima.resource.ResourceInitializationException
      Creates a FsIndexCollection from all index descriptions that can be found via the pattern specified in the system property org.apache.uima.fit.fsindex.import_pattern or via the META-INF/org.apache.uima.fit/fsindexes.txt files in the classpath.
      Returns:
      the auto-scanned indexes.
      Throws:
      org.apache.uima.resource.ResourceInitializationException - if the index collection could not be assembled
    • scanIndexDescriptors

      public static String[] scanIndexDescriptors() throws org.apache.uima.resource.ResourceInitializationException
      Get all currently accessible index descriptor locations. A scan is actually only performed on the first call and the locations are cached. To force a re-scan use forceIndexDescriptorsScan().
      Returns:
      an array of locations.
      Throws:
      org.apache.uima.resource.ResourceInitializationException - if the locations could not be resolved.
    • forceIndexDescriptorsScan

      public static void forceIndexDescriptorsScan()
      Force rescan of index descriptors. The next call to scanIndexDescriptors() will rescan all auto-import locations.