/** * Scan the given resource specifier for external resource dependencies and whenever a dependency * with a compatible type is found, the given resource is bound to it. * * @param aDesc * a description. * @param aResDesc * the resource description. * @throws InvalidXMLException * if import resolution failed * @throws ClassNotFoundException * if the resource implementation class or interface class could not be accessed */ public static void bindResource(ResourceSpecifier aDesc, ExternalResourceDescription aResDesc) throws InvalidXMLException, ClassNotFoundException { // Dispatch if (aDesc instanceof AnalysisEngineDescription) { bind((AnalysisEngineDescription) aDesc, aResDesc); } }
/** * Scan the given resource specifier for external resource dependencies and whenever a dependency * with the given key is encountered, the given resource is bound to it. * * @param aDesc * a description. * @param aKey * the key to bind to. * @param aResDesc * the resource description. * @throws InvalidXMLException * if import resolution failed */ public static void bindResource(ResourceSpecifier aDesc, String aKey, ExternalResourceDescription aResDesc) throws InvalidXMLException { // Dispatch if (aDesc instanceof AnalysisEngineDescription) { bind((AnalysisEngineDescription) aDesc, aKey, aResDesc); } }
/** * Scan the given resource specifier for external resource dependencies and whenever a dependency * with a compatible type is found, the resource will be bound. * * @param aDesc * a description. * @param aRes * the resource to bind. * @param aUrl * the URL from which the resource is initialized. * @param aParams * parameters passed to the resource when it is created. * @throws InvalidXMLException * if import resolution failed * @throws ClassNotFoundException * if the resource implementation class or interface class could not be accessed * @see SharedResourceObject */ public static void bindResource(ResourceSpecifier aDesc, Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams) throws InvalidXMLException, ClassNotFoundException { ExternalResourceDescription extRes = createExternalResourceDescription( uniqueResourceKey(aRes.getName()), aRes, aUrl, aParams); bind((AnalysisEngineDescription) aDesc, extRes); }
/** * Scan the given resource specifier for external resource dependencies and whenever a dependency * with the given key is encountered the resource will be bound. * * @param aDesc * a description. * @param aKey * the key to bind to. * @param aRes * the resource to bind. * @param aUrl * the URL from which the resource is initialized. * @param aParams * parameters passed to the resource when it is created. * @throws InvalidXMLException * if import resolution failed * @see SharedResourceObject */ public static void bindResource(ResourceSpecifier aDesc, String aKey, Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams) throws InvalidXMLException { ExternalResourceDescription extRes = createExternalResourceDescription( uniqueResourceKey(aRes.getName()), aRes, aUrl, aParams); bind((AnalysisEngineDescription) aDesc, aKey, extRes); }