Package org.apache.uima.fit.factory
Class ResourceCreationSpecifierFactory
java.lang.Object
org.apache.uima.fit.factory.ResourceCreationSpecifierFactory
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceCreationSpecifier
createResourceCreationSpecifier
(String descriptorPath, Object[] parameters) Parse a ResourceCreationSpecifier from an XML descriptor file, setting additional configuration parameters as necessary.static ResourceCreationSpecifier
createResourceCreationSpecifier
(URL descriptorURL, Object[] parameters) Parse a ResourceCreationSpecifier from the URL of an XML descriptor file, setting additional configuration parameters as necessary.static ResourceCreationSpecifier
createResourceCreationSpecifier
(XMLInputSource xmlInput, Object[] parameters) Parse a ResourceCreationSpecifier from XML descriptor file input, setting additional configuration parameters as necessary.static void
setConfigurationParameters
(ResourceMetaData metaData, ConfigurationParameter[] configurationParameters, Object[] configurationValues) This method sets the configuration parameters of a resource.static void
setConfigurationParameters
(ResourceCreationSpecifier specifier, Object... configurationData) Create configuration parameter declarations and settings from a list of (name, value) pairs.static void
setConfigurationParameters
(ResourceCreationSpecifier specifier, ConfigurationParameter[] configurationParameters, Object[] configurationValues) This method passes through tosetConfigurationParameters(ResourceMetaData, ConfigurationParameter[], Object[])
-
Method Details
-
createResourceCreationSpecifier
public static ResourceCreationSpecifier createResourceCreationSpecifier(URL descriptorURL, Object[] parameters) throws InvalidXMLException, IOException Parse a ResourceCreationSpecifier from the URL of an XML descriptor file, setting additional configuration parameters as necessary.- Parameters:
descriptorURL
- The URL of the XML descriptor file.parameters
- Any additional configuration parameters to be set. These should be supplied as (name, value) pairs, so there should always be an even number of parameters.- Returns:
- The ResourceCreationSpecifier for the XML descriptor with all the configuration parameters set.
- Throws:
IOException
- if an I/O error occursInvalidXMLException
- if the input XML is not valid or does not specify a validResourceSpecifier
-
createResourceCreationSpecifier
public static ResourceCreationSpecifier createResourceCreationSpecifier(XMLInputSource xmlInput, Object[] parameters) throws InvalidXMLException Parse a ResourceCreationSpecifier from XML descriptor file input, setting additional configuration parameters as necessary.- Parameters:
xmlInput
- The descriptor file as an XMLInputSource.parameters
- Any additional configuration parameters to be set. These should be supplied as (name, value) pairs, so there should always be an even number of parameters.- Returns:
- The ResourceCreationSpecifier for the XML descriptor with all the configuration parameters set.
- Throws:
InvalidXMLException
- if the input XML is not valid or does not specify a validResourceSpecifier
-
createResourceCreationSpecifier
public static ResourceCreationSpecifier createResourceCreationSpecifier(String descriptorPath, Object[] parameters) throws InvalidXMLException, IOException Parse a ResourceCreationSpecifier from an XML descriptor file, setting additional configuration parameters as necessary.- Parameters:
descriptorPath
- The path to the XML descriptor file.parameters
- Any additional configuration parameters to be set. These should be supplied as (name, value) pairs, so there should always be an even number of parameters.- Returns:
- The ResourceCreationSpecifier for the XML descriptor with all the configuration parameters set.
- Throws:
IOException
- if an I/O error occursInvalidXMLException
- if the input XML is not valid or does not specify a validResourceSpecifier
-
setConfigurationParameters
public static void setConfigurationParameters(ResourceCreationSpecifier specifier, Object... configurationData) Create configuration parameter declarations and settings from a list of (name, value) pairs.- Parameters:
specifier
- The ResourceCreationSpecifier whose parameters are to be set.configurationData
- The configuration parameters to be set. These should be supplied as (name, value) pairs, so there should always be an even number of parameters.
-
setConfigurationParameters
public static void setConfigurationParameters(ResourceCreationSpecifier specifier, ConfigurationParameter[] configurationParameters, Object[] configurationValues) This method passes through tosetConfigurationParameters(ResourceMetaData, ConfigurationParameter[], Object[])
- Parameters:
specifier
- The ResourceCreationSpecifier whose parameters are to be set.configurationParameters
- the configuration parameter declarations.configurationValues
- the configuration parameter values.
-
setConfigurationParameters
public static void setConfigurationParameters(ResourceMetaData metaData, ConfigurationParameter[] configurationParameters, Object[] configurationValues) This method sets the configuration parameters of a resource. The length of configurationParameters and configurationValues should be equal- Parameters:
metaData
- The ResourceMetaData whose parameters are to be set.configurationParameters
- an array of configuration parametersconfigurationValues
- an array of configuration parameter values
-