当前位置: 首页>>代码示例>>Java>>正文


Java AbstractResource类代码示例

本文整理汇总了Java中gate.creole.AbstractResource的典型用法代码示例。如果您正苦于以下问题:Java AbstractResource类的具体用法?Java AbstractResource怎么用?Java AbstractResource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AbstractResource类属于gate.creole包,在下文中一共展示了AbstractResource类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setParameterValue

import gate.creole.AbstractResource; //导入依赖的package包/类
/**
 * Sets the value for a specified parameter.
 *
 * @param paramaterName the name for the parameteer
 * @param parameterValue the value the parameter will receive
 */
@Override
public void setParameterValue(String paramaterName, Object parameterValue)
            throws ResourceInstantiationException{
  // get the beaninfo for the resource bean, excluding data about Object
  BeanInfo resBeanInf = null;
  try {
    resBeanInf = Introspector.getBeanInfo(this.getClass(), Object.class);
  } catch(Exception e) {
    throw new ResourceInstantiationException(
      "Couldn't get bean info for resource " + this.getClass().getName()
      + Strings.getNl() + "Introspector exception was: " + e
    );
  }
  AbstractResource.setParameterValue(this, resBeanInf, paramaterName, parameterValue);
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:22,代码来源:CorpusAnnotationDiff.java

示例2: forgetClassLoader

import gate.creole.AbstractResource; //导入依赖的package包/类
/**
 * Causes the specified classloader to be forgotten, making it and all
 * the class definitions loaded by it available for garbage collection
 * 
 * @param id the id of the classloader to forget
 */
public void forgetClassLoader(String id) {
  
  GateClassLoader gcl;
  
  synchronized(childClassLoaders) {
     gcl = childClassLoaders.remove(id);
  }

  if(gcl != null && !gcl.isIsolated()) {
    // in theory this shouldn't be needed as the Introspector uses
    // soft references if we move to requiring Java 8 it should be
    // safe to drop this call
    Introspector.flushCaches();

    AbstractResource.flushBeanInfoCache();
  }
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:24,代码来源:GateClassLoader.java

示例3: setParameterValue

import gate.creole.AbstractResource; //导入依赖的package包/类
/**
 * Sets the value for a specified parameter.
 * 
 * @param paramaterName the name for the parameteer
 * @param parameterValue the value the parameter will receive
 */
@Override
public void setParameterValue(String paramaterName, Object parameterValue)
        throws ResourceInstantiationException {
  // get the beaninfo for the resource bean, excluding data about
  // Object
  BeanInfo resBeanInf = null;
  try {
    resBeanInf = Introspector.getBeanInfo(this.getClass(), Object.class);
  }
  catch(Exception e) {
    throw new ResourceInstantiationException(
            "Couldn't get bean info for resource "
                    + this.getClass().getName() + Strings.getNl()
                    + "Introspector exception was: " + e);
  }
  AbstractResource.setParameterValue(this, resBeanInf, paramaterName,
          parameterValue);
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:25,代码来源:SerialDatastoreViewer.java

示例4: getParameterValue

import gate.creole.AbstractResource; //导入依赖的package包/类
/**
 * Gets the value of a parameter of this resource.
 * @param paramaterName the name of the parameter
 * @return the current value of the parameter
 */
@Override
public Object getParameterValue(String paramaterName)
              throws ResourceInstantiationException{
  return AbstractResource.getParameterValue(this, paramaterName);
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:11,代码来源:CorpusAnnotationDiff.java

示例5: setParameterValues

import gate.creole.AbstractResource; //导入依赖的package包/类
/**
 * Sets the values for more parameters in one step.
 *
 * @param parameters a feature map that has paramete names as keys and
 * parameter values as values.
 */
@Override
public void setParameterValues(FeatureMap parameters)
            throws ResourceInstantiationException{
  AbstractResource.setParameterValues(this, parameters);
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:12,代码来源:CorpusAnnotationDiff.java

示例6: getParameterValue

import gate.creole.AbstractResource; //导入依赖的package包/类
/**
 * Gets the value of a parameter of this resource.
 * 
 * @param paramaterName the name of the parameter
 * @return the current value of the parameter
 */
@Override
public Object getParameterValue(String paramaterName)
        throws ResourceInstantiationException {
  return AbstractResource.getParameterValue(this, paramaterName);
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:12,代码来源:SerialDatastoreViewer.java

示例7: setParameterValues

import gate.creole.AbstractResource; //导入依赖的package包/类
/**
 * Sets the values for more parameters in one step.
 * 
 * @param parameters a feature map that has paramete names as keys and
 *          parameter values as values.
 */
@Override
public void setParameterValues(FeatureMap parameters)
        throws ResourceInstantiationException {
  AbstractResource.setParameterValues(this, parameters);
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:12,代码来源:SerialDatastoreViewer.java


注:本文中的gate.creole.AbstractResource类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。