當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。