Interface ResourceCreationSpecifier

    • Method Detail

      • getFrameworkImplementation

        java.lang.String getFrameworkImplementation()
        Gets the name of the AE framework implementation within which the Resource executes. The framework name for this implementation is given by Constants.JAVA_FRAMEWORK_NAME..
        Returns:
        the framework implementation name
      • setFrameworkImplementation

        void setFrameworkImplementation​(java.lang.String aFrameworkImplementation)
        Sets the name of the AE framework implementation within which the ResourceCreationSpecifier executes. The framework name for this implementation is given by Constants.JAVA_FRAMEWORK_NAME..
        Parameters:
        aFrameworkImplementation - the framework implementation name
      • getImplementationName

        java.lang.String getImplementationName()
        Retrieves the name of this ResourceCreationSpecifier's implementation. This must be a fully qualified Java class name.
        Returns:
        the implementation name of the CasConsumer
      • setImplementationName

        void setImplementationName​(java.lang.String aImplementationName)
        Sets the name of this ResourceCreationSpecifier's implementation. This must be a fully qualified Java class name.
        Parameters:
        aImplementationName - the implementation name of the CasConsumer
      • getMetaData

        ResourceMetaData getMetaData()
        Retrieves the ResourceMetaData to assign to the newly constructed ResourceCreationSpecifier.
        Returns:
        the metadata for the new resource. This will always be modifiable.
      • setMetaData

        void setMetaData​(ResourceMetaData aMetaData)
        Sets the MetaData for this ResourceCreationSpecifier.
        Parameters:
        aMetaData - metadata to assign
      • getExternalResourceDependencies

        ExternalResourceDependency[] getExternalResourceDependencies()
        Retrieves descriptions of this ResourceCreationSpecifier's dependencies on external resources. Each required external resource is assigned a String identifier. This is the identifier that this ResourceCreationSpecifier can use to locate the Resource (using the AnnotatorContext.getResourceObject(String) method).
        Returns:
        an array of ExternalResourceDependency objects that describe this AnalysisEngine's resource dependencies.
      • setExternalResourceDependencies

        void setExternalResourceDependencies​(ExternalResourceDependency[] aDependencies)
        Sets the descriptions of this ResourceCreationSpecifier's dependencies on external resources.
        Parameters:
        aDependencies - an array of ExternalResourceDependency objects that describe this ResourceCreationSpecifier's resource dependencies.
      • getExternalResourceDependency

        ExternalResourceDependency getExternalResourceDependency​(java.lang.String aKey)
        Gets the external resource dependency with the given key.
        Parameters:
        aKey - the key of the external resource dependency to get
        Returns:
        the resource dependency with the specified key, null if none.
      • getResourceManagerConfiguration

        ResourceManagerConfiguration getResourceManagerConfiguration()
        Retrieves the Resource Manager configuration, which declares the resources that satisfy the dependencies defined by getExternalResourceDependencies().
        Returns:
        the Resource Manager configuration that describes how external resource dependencies are bound to actual resources.
      • setResourceManagerConfiguration

        void setResourceManagerConfiguration​(ResourceManagerConfiguration aResourceManagerConfiguration)
        Sets the Resource Manager configuration, which declares the resources that satisfy the dependencies defined by getExternalResourceDependencies().
        Parameters:
        aResourceManagerConfiguration - the Resource Manager configuration that describes how external resource dependencies are bound to actual resources.
      • doFullValidation

        void doFullValidation()
                       throws ResourceInitializationException
        Does full validation of this ResourceCreationSpecifier. This essentially performs all operations necessary to instantiate a Resource except that it does not actually instantiate the implementation class. If appropriate, this method will also attempt to create a CAS based on the descriptor, in order to do full type system verification. If any operations fail, an exception will be thrown.
        Throws:
        ResourceInitializationException - if validation failed
      • doFullValidation

        void doFullValidation​(ResourceManager aResourceManager)
                       throws ResourceInitializationException
        Does full validation of this ResourceCreationSpecifier. This essentially performs all operations necessary to instantiate a Resource except that it does not actually instantiate the implementation class. If appropriate, this method will also attempt to create a CAS based on the descriptor, in order to do full type system verification. If any operations fail, an exception will be thrown.
        Parameters:
        aResourceManager - a ResourceManager instance to use to load annotator classes, external resource classes, and resolve imports by name.
        Throws:
        ResourceInitializationException - if validation failed