static private String getName( final String elementName, final Element element ) throws AnnotatorContextException { final String name = element.getChildText( NAME_KEY ); if ( name == null || name.isEmpty() ) { throw new AnnotatorContextException( "Missing name for " + elementName, EMPTY_OBJECT_ARRAY ); } return name; }
/** * Acquires Resource InputStreams using the ResourceManager, or, if that fails, the ClassLoader. * * @see org.apache.uima.analysis_engine.annotator.AnnotatorContext#getResourceAsStream(String) */ public InputStream getResourceAsStream(String aKey) throws AnnotatorContextException { try { return mUimaContext.getResourceAsStream(aKey); } catch (ResourceAccessException e) { throw new AnnotatorContextException(e); } }
public URI getResourceURI(String aKey) throws AnnotatorContextException { try { return mUimaContext.getResourceURI(aKey); } catch (ResourceAccessException e) { throw new AnnotatorContextException(e); } }
public String getResourceFilePath(String aKey) throws AnnotatorContextException { try { return mUimaContext.getResourceFilePath(aKey); } catch (ResourceAccessException e) { throw new AnnotatorContextException(e); } }
/** * Acquires a Resource object using the ResourceManager. * * @see org.apache.uima.analysis_engine.annotator.AnnotatorContext#getResourceObject(String) */ public Object getResourceObject(String aKey) throws AnnotatorContextException { try { return mUimaContext.getResourceObject(aKey); } catch (ResourceAccessException e) { throw new AnnotatorContextException(e); } }
/** * @see org.apache.uima.analysis_engine.annotator.AnnotatorContext#getResourceObject(java.lang.String, * java.lang.String[]) */ public Object getResourceObject(String aKey, String[] aParams) throws AnnotatorContextException { try { return mUimaContext.getResourceObject(aKey, aParams); } catch (ResourceAccessException e) { throw new AnnotatorContextException(e); } }
static private String getName( final String elementName, final Element element ) throws AnnotatorContextException { final String name = element.getChildText( NAME_KEY ); if ( name == null || name.isEmpty() ) { throw new AnnotatorContextException( "Missing name for " + elementName, EMPTY_OBJECT_ARRAY ); } return name; }
/** * @see org.apache.uima.analysis_engine.annotator.AnnotatorContext#getResourceURL(java.lang.String, * java.lang.String[]) */ public URL getResourceURL(String aKey, String[] aParams) throws AnnotatorContextException { try { return mUimaContext.getResourceURL(aKey, aParams); } catch (ResourceAccessException e) { throw new AnnotatorContextException(e); } }
/** * Locates Resource URL's using the ResourceManager, or, if that fails, the ClassLoader. * * @see org.apache.uima.analysis_engine.annotator.AnnotatorContext#getResourceURL(String) */ public URL getResourceURL(String aKey) throws AnnotatorContextException { try { return mUimaContext.getResourceURL(aKey); } catch (ResourceAccessException e) { throw new AnnotatorContextException(e); } }
/** * @see org.apache.uima.analysis_engine.annotator.AnnotatorContext#getResourceAsStream(java.lang.String, * java.lang.String[]) */ public InputStream getResourceAsStream(String aKey, String[] aParams) throws AnnotatorContextException { try { return mUimaContext.getResourceAsStream(aKey, aParams); } catch (ResourceAccessException e) { throw new AnnotatorContextException(e); } }
public URI getResourceURI(String aKey, String[] aParams) throws AnnotatorContextException { try { return mUimaContext.getResourceURI(aKey, aParams); } catch (ResourceAccessException e) { throw new AnnotatorContextException(e); } }
public String getResourceFilePath(String aKey, String[] aParams) throws AnnotatorContextException { try { return mUimaContext.getResourceFilePath(aKey, aParams); } catch (ResourceAccessException e) { throw new AnnotatorContextException(e); } }
consumerClass = Class.forName( consumerClassName ); } catch ( ClassNotFoundException cnfE ) { throw new AnnotatorContextException( "Unknown class " + consumerClassName, EMPTY_OBJECT_ARRAY, cnfE ); throw new AnnotatorContextException( consumerClassName + " is not a TermConsumer", EMPTY_OBJECT_ARRAY ); throw new AnnotatorContextException( "Could not construct " + consumerClassName, EMPTY_OBJECT_ARRAY, multE ); throw new AnnotatorContextException( "No Constructor for " + consumerClassName, EMPTY_OBJECT_ARRAY );
dictionaryClass = Class.forName( className ); } catch ( ClassNotFoundException cnfE ) { throw new AnnotatorContextException( "Unknown class " + className, EMPTY_OBJECT_ARRAY, cnfE ); throw new AnnotatorContextException( className + " is not a Rare Word Dictionary", EMPTY_OBJECT_ARRAY ); throw new AnnotatorContextException( "Could not construct " + className, EMPTY_OBJECT_ARRAY, iniaitE ); throw new AnnotatorContextException( "No Constructor for " + className, EMPTY_OBJECT_ARRAY );
conceptFactoryClass = Class.forName( className ); } catch ( ClassNotFoundException cnfE ) { throw new AnnotatorContextException( "Unknown class " + className, EMPTY_OBJECT_ARRAY, cnfE ); throw new AnnotatorContextException( className + " is not a Concept Factory", EMPTY_OBJECT_ARRAY ); throw new AnnotatorContextException( "Could not construct " + className, EMPTY_OBJECT_ARRAY, iniaitE ); throw new AnnotatorContextException( "No Constructor for " + className, EMPTY_OBJECT_ARRAY );
consumerClass = Class.forName( consumerClassName ); } catch ( ClassNotFoundException cnfE ) { throw new AnnotatorContextException( "Unknown class " + consumerClassName, EMPTY_OBJECT_ARRAY, cnfE ); throw new AnnotatorContextException( consumerClassName + " is not a TermConsumer", EMPTY_OBJECT_ARRAY ); throw new AnnotatorContextException( "Could not construct " + consumerClassName, EMPTY_OBJECT_ARRAY, multE ); throw new AnnotatorContextException( "No Constructor for " + consumerClassName, EMPTY_OBJECT_ARRAY );
dictionaryClass = Class.forName( className ); } catch ( ClassNotFoundException cnfE ) { throw new AnnotatorContextException( "Unknown class " + className, EMPTY_OBJECT_ARRAY, cnfE ); throw new AnnotatorContextException( className + " is not a Rare Word Dictionary", EMPTY_OBJECT_ARRAY ); throw new AnnotatorContextException( "Could not construct " + className, EMPTY_OBJECT_ARRAY, iniaitE ); throw new AnnotatorContextException( "No Constructor for " + className, EMPTY_OBJECT_ARRAY );
conceptFactoryClass = Class.forName( className ); } catch ( ClassNotFoundException cnfE ) { throw new AnnotatorContextException( "Unknown class " + className, EMPTY_OBJECT_ARRAY, cnfE ); throw new AnnotatorContextException( className + " is not a Concept Factory", EMPTY_OBJECT_ARRAY ); throw new AnnotatorContextException( "Could not construct " + className, EMPTY_OBJECT_ARRAY, iniaitE ); throw new AnnotatorContextException( "No Constructor for " + className, EMPTY_OBJECT_ARRAY );
doc = saxBuilder.build( descriptorFile ); } catch ( JDOMException | IOException jdomioE ) { throw new AnnotatorContextException( "Could not parse ", EMPTY_OBJECT_ARRAY, jdomioE );
doc = saxBuilder.build( descriptorFile ); } catch ( JDOMException | IOException jdomioE ) { throw new AnnotatorContextException( "Could not parse ", EMPTY_OBJECT_ARRAY, jdomioE );