* org.apache.uima.resource.ResourceSpecifier, java.util.Map)
*/
public Resource produceResource(Class aResourceClass, ResourceSpecifier aSpecifier,
Map aAdditionalParams) throws ResourceInitializationException {
if (aSpecifier instanceof CollectionReaderDescription) {
CollectionReaderDescription desc = (CollectionReaderDescription) aSpecifier;
//check framework implementation (CollectionReaders only supported in Java)
String frameworkImpl = desc.getFrameworkImplementation();
if (frameworkImpl == null || frameworkImpl.length() == 0) {
throw new ResourceInitializationException(
ResourceInitializationException.MISSING_FRAMEWORK_IMPLEMENTATION,
new Object[] { aSpecifier.getSourceUrlString() });
}
if (!frameworkImpl.startsWith(Constants.JAVA_FRAMEWORK_NAME)) {
throw new ResourceInitializationException(
ResourceInitializationException.UNSUPPORTED_FRAMEWORK_IMPLEMENTATION,
new Object[] { desc.getFrameworkImplementation(), aSpecifier.getSourceUrlString() });
}
String className = desc.getImplementationName();
if (className == null || className.length() == 0) {
throw new ResourceInitializationException(
ResourceInitializationException.MISSING_IMPLEMENTATION_CLASS_NAME,
new Object[] {aSpecifier.getSourceUrlString()});