Interface TypeSystemProvider

All Superinterfaces:
FsIndexCollectionProvider, JCasClassProvider, TypePrioritiesProvider, TypeSystemDescriptionProvider
All Known Implementing Classes:
TypeSystemProvider_ImplBase

Allows the UIMA framework to discover globally available resources such as JCas classes, type system descriptions, etc.
See Also:
  • Method Details

    • listTypeSystemDescriptions

      default List<TypeSystemDescription> listTypeSystemDescriptions()
      Specified by:
      listTypeSystemDescriptions in interface TypeSystemDescriptionProvider
      Returns:
      the type system descriptions exported by this provider. The provider should resolve any imports in these before returning them. If possible, the provider should internally cache the parsed type systems instead of parsing them on every call to this method.
    • listFsIndexCollections

      default List<FsIndexCollection> listFsIndexCollections()
      Specified by:
      listFsIndexCollections in interface FsIndexCollectionProvider
      Returns:
      the FS index collections exported by this provider. The provider should resolve any imports in these before returning them. If possible, the provider should internally cache the parsed type systems instead of parsing them on every call to this method.
    • listTypePriorities

      default List<TypePriorities> listTypePriorities()
      Specified by:
      listTypePriorities in interface TypePrioritiesProvider
      Returns:
      the type priorities exported by this provider. The provider should resolve any imports in these before returning them. If possible, the provider should internally cache the parsed type systems instead of parsing them on every call to this method.
    • listJCasClasses

      default List<Class<? extends TOP>> listJCasClasses()
      Specified by:
      listJCasClasses in interface JCasClassProvider
      Returns:
      the JCas classes exported by this provider. The provider should only supply JCas classes for types it exports via listTypeSystemDescriptions(). If possible, the provider should internally cache the parsed type systems instead of parsing them on every call to this method.
    • findResourceUrl

      default Optional<URL> findResourceUrl(String aName)
      Returns the URL for a resource exported by this provider by name. This is necessary if any descriptors outside of this provider import resources owned by this provider by name. Note that by convention, any descriptors returned by this provide via listTypeSystemDescriptions(), listTypePriorities() and listFsIndexCollections() should already have resolved their imports, so for these methods to access local imports, implementing this method is not required.
      Parameters:
      aName - the name of the type system. This should be something like some.package.TypeSystem just as you would put it into the Import.setName(String) of a Import for a name-based import.
      Returns:
      the type system description(s) exported from the given location. The provider should resolve any imports in the type systems before returning them.
      Since:
      3.6.0
      To be removed in version:
      4.0.0 (just the default implementation)
      API note:
      For backwards compatibility, this is currently a default method, so implementations do not have to provide it - although by-name importing type systems provided via SPIs will not work then unless the type systems are also simply available via the classpath. However, in the next major version, the default implementation will be removed so implementers have to provide it.a