org.apache.uima.fit.factory

## Class TypePrioritiesFactory

- java.lang.Object
- - org.apache.uima.fit.factory.TypePrioritiesFactory

-     public final class TypePrioritiesFactory
      extends Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.apache.uima.resource.metadata.TypePriorities` | `createTypePriorities()` Creates a `TypePriorities` from all type priorities descriptions that can be found via the pattern specified in the system property `org.apache.uima.fit.typepriorities.import_pattern` or via the `META-INF/org.apache.uima.fit/typepriorities.txt` files in the classpath.
    `static org.apache.uima.resource.metadata.TypePriorities` | `createTypePriorities(Class<?>... prioritizedTypes)` Create a TypePriorities given a sequence of ordered type classes
    `static org.apache.uima.resource.metadata.TypePriorities` | `createTypePriorities(String... prioritizedTypeNames)` Create a TypePriorities given a sequence of ordered type names
    `static void` | `forceTypePrioritiesDescriptorsScan()` Force rescan of type priorities descriptors.
    `static String[]` | `scanTypePrioritiesDescriptors()` Get all currently accessible type priorities descriptor locations.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createTypePriorities

          public static org.apache.uima.resource.metadata.TypePriorities createTypePriorities(Class<?>... prioritizedTypes)

      Create a TypePriorities given a sequence of ordered type classes
      Parameters:
        `prioritizedTypes` - a sequence of ordered type classes
      Returns:
        type priorities created from the ordered JCas classes

    - #### createTypePriorities

          public static org.apache.uima.resource.metadata.TypePriorities createTypePriorities(String... prioritizedTypeNames)

      Create a TypePriorities given a sequence of ordered type names
      Parameters:
        `prioritizedTypeNames` - a sequence of ordered type names
      Returns:
        type priorities created from the ordered type names

    - #### createTypePriorities

          public static org.apache.uima.resource.metadata.TypePriorities createTypePriorities()
                                                                                       throws org.apache.uima.resource.ResourceInitializationException

      Creates a `TypePriorities` from all type priorities descriptions that can be found via the pattern specified in the system property `org.apache.uima.fit.typepriorities.import_pattern` or via the `META-INF/org.apache.uima.fit/typepriorities.txt` files in the classpath.
      Returns:
        the auto-scanned type priorities.
      Throws:
        `org.apache.uima.resource.ResourceInitializationException` - if the collected type priorities cannot be merged.

    - #### scanTypePrioritiesDescriptors

          public static String[] scanTypePrioritiesDescriptors()
                                                        throws org.apache.uima.resource.ResourceInitializationException

      Get all currently accessible type priorities descriptor locations. A scan is actually only performed on the first call and the locations are cached. To force a re-scan use `forceTypePrioritiesDescriptorsScan()`.
      Returns:
        an array of locations.
      Throws:
        `org.apache.uima.resource.ResourceInitializationException` - if the locations could not be resolved.

    - #### forceTypePrioritiesDescriptorsScan

          public static void forceTypePrioritiesDescriptorsScan()

      Force rescan of type priorities descriptors. The next call to `scanTypePrioritiesDescriptors()` will rescan all auto-import locations.

Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.