Package org.apache.uima.fit.factory
Class FsIndexFactory
java.lang.Object
org.apache.uima.fit.factory.FsIndexFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intComparator that orders FeatureStructures according to the reverse order of their key features (the opposite order as that defined by STANDARD_COMPARE).static final intComparator that orders FeatureStructures according to the standard order of their key features. -
Method Summary
Modifier and TypeMethodDescriptionstatic FsIndexCollectionCreates aFsIndexCollectionfrom all index descriptions that can be found via the pattern specified in the system propertyorg.apache.uima.fit.fsindex.import_patternor via theMETA-INF/org.apache.uima.fit/fsindexes.txtfiles in the classpath.static FsIndexCollectioncreateFsIndexCollection(Class<?> componentClass) Create index configuration data for a given class definition using reflection and the configuration parameter annotation.static FsIndexCollectioncreateFsIndexCollection(String... descriptorNames) Creates aFsIndexCollectionfrom descriptor names.static FsIndexCollectioncreateFsIndexCollection(Collection<? extends FsIndexDescription> descriptions) Create a index collection from a set of descriptions.static FsIndexCollectioncreateFsIndexCollection(FsIndexDescription... descriptions) Create a index collection from a set of descriptions.static FsIndexDescriptioncreateFsIndexDescription(String label, String kind, String typeName, boolean useTypePriorities, FsIndexKeyDescription... keys) static FsIndexKeyDescriptioncreateFsIndexKeyDescription(String featureName) static FsIndexKeyDescriptioncreateFsIndexKeyDescription(String featureName, int comparator) static FsIndexCollectioncreateTypeSystemDescriptionFromPath(String... descriptorURIs) Creates aFsIndexCollectionfrom a descriptor filestatic voidForce rescan of index descriptors.static String[]Get all currently accessible index descriptor locations.
-
Field Details
-
STANDARD_COMPARE
public static final int STANDARD_COMPAREComparator 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_COMPAREComparator 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
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 FsIndexDescription createFsIndexDescription(String label, String kind, String typeName, boolean useTypePriorities, FsIndexKeyDescription... keys) - Parameters:
label- the index labelkind- the type of indextypeName- the indexed feature structure typeuseTypePriorities- whether to respect type prioritieskeys- the index keys- Returns:
- the index description
-
createFsIndexCollection
Create a index collection from a set of descriptions.- Parameters:
descriptions- the index descriptions- Returns:
- the index collection
-
createFsIndexCollection
public static FsIndexCollection createFsIndexCollection(Collection<? extends FsIndexDescription> descriptions) Create a index collection from a set of descriptions.- Parameters:
descriptions- the index descriptions- Returns:
- the index collection
-
createFsIndexKeyDescription
- Parameters:
featureName- the feature to index- Returns:
- the index key description
-
createFsIndexKeyDescription
- Parameters:
featureName- the feature to indexcomparator- the index comparator- Returns:
- the index key description
-
createFsIndexCollection
Creates aFsIndexCollectionfrom descriptor names.- Parameters:
descriptorNames- The fully qualified, Java-style, dotted descriptor names.- Returns:
- a
FsIndexCollectionthat includes the indexes from all of the specified files.
-
createTypeSystemDescriptionFromPath
Creates aFsIndexCollectionfrom a descriptor file- Parameters:
descriptorURIs- The descriptor file paths.- Returns:
- A
FsIndexCollectionthat includes the indexes from all of the specified files.
-
createFsIndexCollection
Creates aFsIndexCollectionfrom all index descriptions that can be found via the pattern specified in the system propertyorg.apache.uima.fit.fsindex.import_patternor via theMETA-INF/org.apache.uima.fit/fsindexes.txtfiles in the classpath.- Returns:
- the auto-scanned indexes.
- Throws:
ResourceInitializationException- if the index collection could not be assembled
-
scanIndexDescriptors
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 useforceIndexDescriptorsScan().- Returns:
- an array of locations.
- Throws:
ResourceInitializationException- if the locations could not be resolved.
-
forceIndexDescriptorsScan
public static void forceIndexDescriptorsScan()Force rescan of index descriptors. The next call toscanIndexDescriptors()will rescan all auto-import locations.
-