Package org.apache.uima.fit.factory
Class TypeSystemDescriptionFactory
java.lang.Object
org.apache.uima.fit.factory.TypeSystemDescriptionFactory
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.uima.resource.metadata.TypeSystemDescription
Creates aTypeSystemDescription
from all type descriptions that can be found via the default import pattern or via theMETA-INF/org.apache.uima.fit/types.txt
files in the classpath.static org.apache.uima.resource.metadata.TypeSystemDescription
createTypeSystemDescription
(String... descriptorNames) Creates a TypeSystemDescription from descriptor names.static org.apache.uima.resource.metadata.TypeSystemDescription
createTypeSystemDescriptionFromPath
(String... descriptorURIs) Creates aTypeSystemDescription
from a descriptor filestatic void
Force rescan of type descriptors.static String[]
Get all currently accessible type system descriptor locations.
-
Method Details
-
createTypeSystemDescription
public static org.apache.uima.resource.metadata.TypeSystemDescription createTypeSystemDescription(String... descriptorNames) Creates a TypeSystemDescription from descriptor names.- Parameters:
descriptorNames
- The fully qualified, Java-style, dotted descriptor names.- Returns:
- A TypeSystemDescription that includes the types from all of the specified files.
-
createTypeSystemDescriptionFromPath
public static org.apache.uima.resource.metadata.TypeSystemDescription createTypeSystemDescriptionFromPath(String... descriptorURIs) Creates aTypeSystemDescription
from a descriptor file- Parameters:
descriptorURIs
- The descriptor file paths.- Returns:
- A TypeSystemDescription that includes the types from all of the specified files.
-
createTypeSystemDescription
public static org.apache.uima.resource.metadata.TypeSystemDescription createTypeSystemDescription() throws org.apache.uima.resource.ResourceInitializationExceptionCreates aTypeSystemDescription
from all type descriptions that can be found via the default import pattern or via theMETA-INF/org.apache.uima.fit/types.txt
files in the classpath.- Returns:
- the auto-scanned type system.
- Throws:
org.apache.uima.resource.ResourceInitializationException
- if the collected type system descriptions cannot be merged.
-
scanTypeDescriptors
public static String[] scanTypeDescriptors() throws org.apache.uima.resource.ResourceInitializationExceptionGet all currently accessible type system descriptor locations. A scan is actually only performed on the first call and the locations are cached. To force a re-scan useforceTypeDescriptorsScan()
.- Returns:
- an array of locations.
- Throws:
org.apache.uima.resource.ResourceInitializationException
- if the locations could not be resolved.
-
forceTypeDescriptorsScan
public static void forceTypeDescriptorsScan()Force rescan of type descriptors. The next call toscanTypeDescriptors()
will rescan all auto-import locations.
-