本文整理了Java中org.apache.uima.resource.ResourceManager.getExtensionClassLoader
方法的一些代码示例,展示了ResourceManager.getExtensionClassLoader
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceManager.getExtensionClassLoader
方法的具体详情如下:
包路径:org.apache.uima.resource.ResourceManager
类名称:ResourceManager
方法名:getExtensionClassLoader
[英]Returns the UIMA extension class loader.
[中]返回UIMA扩展类加载器。
代码示例来源:origin: org.dkpro.lab/dkpro-lab-uima
private ClassLoader getExtensionClassLoader()
{
if (resMgr == null) {
return null;
}
else {
return resMgr.getExtensionClassLoader();
}
}
代码示例来源:origin: de.tudarmstadt.ukp.dkpro.lab/de.tudarmstadt.ukp.dkpro.lab.uima
private ClassLoader getExtensionClassLoader()
{
if (resMgr == null) {
return null;
}
else {
return resMgr.getExtensionClassLoader();
}
}
代码示例来源:origin: apache/uima-uimaj
/**
* Gets the extension ClassLoader to used to locate the message digests. If
* this returns null, then message digests will be searched for using
* this.class.getClassLoader().
*/
private ClassLoader getExtensionClassLoader() {
if (mResourceManager == null)
return null;
else
return mResourceManager.getExtensionClassLoader();
}
代码示例来源:origin: CLLKazan/UIMA-Ext
/**
* Gets the extension ClassLoader to used to locate the message digests. If
* this returns null, then message digests will be searched for using
* this.class.getClassLoader().
*/
private ClassLoader getExtensionClassLoader() {
if (mResourceManager == null)
return null;
else
return mResourceManager.getExtensionClassLoader();
}
代码示例来源:origin: apache/uima-uimaj
/**
* Gets the extension ClassLoader to used to locate the message digests. If this returns null,
* then message digests will be searched for using this.class.getClassLoader().
*/
private ClassLoader getExtensionClassLoader() {
if (mResourceManager == null)
return null;
else
return mResourceManager.getExtensionClassLoader();
}
代码示例来源:origin: apache/uima-uimaj
/**
* Gets the extension ClassLoader to used to locate the message digests. If this returns null,
* then message digests will be searched for using this.class.getClassLoader().
*/
private ClassLoader getExtensionClassLoader() {
if (mResourceManager == null)
return null;
else
return mResourceManager.getExtensionClassLoader();
}
代码示例来源:origin: apache/uima-uimaj
static public ClassLoader get_cl(ResourceManager rm) {
ClassLoader cl = (rm == null) ? null : rm.getExtensionClassLoader();
if (cl == null) {
cl = get_parent_cl();
}
if (cl == null) {
cl = Class_TCCL.class.getClassLoader(); // this class's classloader
}
return cl;
}
代码示例来源:origin: apache/uima-uimaj
MetaDataCacheKey(ResourceSpecifier resourceSpecifier, ResourceManager resourceManager) {
this.resourceSpecifier = resourceSpecifier;
this.rmClassLoader = (null == resourceManager) ? null : resourceManager.getExtensionClassLoader(); // can be null
this.rmDataPath = (null == resourceManager) ? null : resourceManager.getDataPath();
}
代码示例来源:origin: apache/uima-uimaj
private ClassLoader getFlowClassLoader() {
return mFlowControllerContainer.getResourceManager().getExtensionClassLoader();
}
}
代码示例来源:origin: org.apache.uima/uimafit-core
/**
* Gets the extension ClassLoader to used to locate the message digests. If this returns null,
* then message digests will be searched for using this.class.getClassLoader().
*/
private ClassLoader getExtensionClassLoader() {
if (context instanceof UimaContextAdmin) {
ResourceManager resMgr = ((UimaContextAdmin) context).getResourceManager();
if (resMgr != null) {
return resMgr.getExtensionClassLoader();
}
else {
return null;
}
}
return null;
}
}
代码示例来源:origin: org.apache.uima/ruta-core
public RutaTable getWordTable(String table) {
RutaTable result = tables.get(table);
if (result == null) {
if (table.endsWith("csv") || table.endsWith("txt") || table.endsWith("tsv")) {
ResourceLoader resourceLoader = new RutaResourceLoader(getResourcePaths(), getResourceManager().getExtensionClassLoader());
Resource resource = resourceLoader.getResource(table);
if (resource.exists()) {
try {
tables.put(table, new CSVTable(resource));
} catch (IOException e) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE,
"Error reading csv table " + table, e);
}
} else {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Can't find " + table + "!");
}
} else {
try {
RutaTable rutaTable = (RutaTable) owner.getContext().getResourceObject(table);
tables.put(table, rutaTable);
} catch (ResourceAccessException e) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE,
"Can't find external resource table" + table, e);
}
}
}
return tables.get(table);
}
代码示例来源:origin: org.apache.uima/ruta-core
ResourceLoader resourceLoader = new RutaResourceLoader(getResourcePaths(), getResourceManager().getExtensionClassLoader());
Resource resource = resourceLoader.getResource(list);
if (resource.exists()) {
代码示例来源:origin: apache/uima-uimaj
public static AbstractCas setupViewSwitchClassLoadersLockCas(
CAS cas,
boolean sofaAware,
ComponentInfo componentInfo,
ResourceManager resourceManager,
Class<? extends AbstractCas> casInterface) {
CASImpl ci = getStartingView(cas, sofaAware, componentInfo);
// get requested interface to CAS (CAS or JCas)
// next will create JCas if needed, but not already created
// must precede the switchClassLoader call - that one needs the JCas link, if it is being used
AbstractCas r = CasManager_impl.getCasInterfaceStatic(ci, casInterface);
// This cas will be unlocked and its class loader restored when the
// next() method returns it
// Insure the same view is passed for switching/restoring https://issues.apache.org/jira/browse/UIMA-2211
ci.switchClassLoaderLockCasCL(resourceManager.getExtensionClassLoader());
return r;
}
代码示例来源:origin: apache/uima-uimaj
public static <T extends AbstractCas> T setupViewSwitchClassLoaders(
CAS cas,
boolean sofaAware,
ComponentInfo componentInfo,
ResourceManager resourceManager,
Class<T> casInterface) {
CASImpl ci = getStartingView(cas, sofaAware, componentInfo);
// get requested interface to CAS (CAS or JCas)
// next will create JCas if needed, but not already created
// must precede the switchClassLoader call - that one needs the JCas link, if it is being used
T r = CasManager_impl.<T>getCasInterfaceStatic(ci, casInterface);
// This cas will be unlocked and its class loader restored when the
// next() method returns it
// Insure the same view is passed for switching/restoring https://issues.apache.org/jira/browse/UIMA-2211
ci.switchClassLoader(resourceManager.getExtensionClassLoader());
return r;
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
ResourceManager rm = getResourceManager();
if (rm != null) {
cl = rm.getExtensionClassLoader();
代码示例来源:origin: org.apache.uima/ruta-core
@Override
public void initialize(UimaContext aContext) throws ResourceInitializationException {
super.initialize(aContext);
if (aContext == null && context != null) {
aContext = context;
}
this.context = aContext;
externalFactory = new RutaExternalFactory();
externalFactory.setContext(aContext);
verbalizer = new RutaVerbalizer();
// reinitialize analysis engines if this one is configured
analysisEnginesAlreadyInitialized = false;
initializeResourceManager();
handleDataPath();
scriptRutaResourceLoader = new RutaResourceLoader(scriptPaths,
resourceManager.getExtensionClassLoader());
descriptorRutaResourceLoader = new RutaResourceLoader(descriptorPaths,
resourceManager.getExtensionClassLoader());
if (!externalFactory.isInitialized()) {
initializeExtensionWithClassPath();
}
if (!reloadScript) {
try {
initializeScript(CAS.NAME_DEFAULT_SOFA);
initialized = false;
} catch (AnalysisEngineProcessException e) {
throw new ResourceInitializationException(e);
}
}
}
代码示例来源:origin: apache/uima-uimaj
if (aResourceManager.getExtensionClassLoader() != null) {
casMgr.setJCasClassLoader(aResourceManager.getExtensionClassLoader());
代码示例来源:origin: org.apache.uima/uimaj-ep-configurator
true);
cachedRMclassPath = classPath;
cachedRMcl = new SoftReference<UIMAClassLoader>((UIMAClassLoader) resourceManager.getExtensionClassLoader());
代码示例来源:origin: apache/uima-uimaj
((CASImpl)view).switchClassLoaderLockCasCL(this.getResourceManager().getExtensionClassLoader());
代码示例来源:origin: apache/uima-uimaj
((CASImpl)view).switchClassLoaderLockCasCL(this.getResourceManager().getExtensionClassLoader());
Flow flow = mFlowController.computeFlow(casToPass);
if (flow instanceof CasFlow_ImplBase) {
内容来源于网络,如有侵权,请联系作者删除!