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 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 TypePriorities` | `createTypePriorities(Class<? extends TOP>... prioritizedTypes)` Create a TypePriorities given a sequence of ordered type classes
    `static 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

          @SafeVarargs
          public static TypePriorities createTypePriorities(Class<? extends TOP>... 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 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 TypePriorities createTypePriorities()
                                                     throws 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:
        `ResourceInitializationException` - if the collected type priorities cannot be merged.

    - #### scanTypePrioritiesDescriptors

          public static String[] scanTypePrioritiesDescriptors()
                                                        throws 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:
        `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–2021 The Apache Software Foundation. All rights reserved.