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


Java Strings.getNl方法代码示例

本文整理汇总了Java中gate.util.Strings.getNl方法的典型用法代码示例。如果您正苦于以下问题:Java Strings.getNl方法的具体用法?Java Strings.getNl怎么用?Java Strings.getNl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gate.util.Strings的用法示例。


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

示例1: setParameterValue

import gate.util.Strings; //导入方法依赖的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: toString

import gate.util.Strings; //导入方法依赖的package包/类
/** String respresentation */
@Override
public String toString() {
  String n = Strings.getNl();
  StringBuffer s = new StringBuffer("DocumentImpl: " + n);
  s.append("  content:" + content + n);
  s.append("  defaultAnnots:" + defaultAnnots + n);
  s.append("  encoding:" + encoding + n);
  s.append("  features:" + features + n);
  s.append("  markupAware:" + markupAware + n);
  s.append("  namedAnnotSets:" + namedAnnotSets + n);
  s.append("  nextAnnotationId:" + nextAnnotationId + n);
  s.append("  nextNodeId:" + nextNodeId + n);
  s.append("  sourceUrl:" + sourceUrl + n);
  s.append("  sourceUrlStartOffset:" + sourceUrlStartOffset + n);
  s.append("  sourceUrlEndOffset:" + sourceUrlEndOffset + n);
  s.append(n);
  return s.toString();
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:20,代码来源:DocumentImpl.java

示例3: setParameterValues

import gate.util.Strings; //导入方法依赖的package包/类
/**
 * Sets the values for more parameters for a resource in one step.
 *
 * @param parameters a feature map that has parameter names as keys and
 * parameter values as values.
 */
public static void setParameterValues(Resource resource,
                                      FeatureMap parameters)
            throws ResourceInstantiationException{
  // get the beaninfo for the resource bean, excluding data about Object
  BeanInfo resBeanInf = null;
  try {
    resBeanInf = getBeanInfo(resource.getClass());
  } catch(Exception e) {
    throw new ResourceInstantiationException(
      "Couldn't get bean info for resource " + resource.getClass().getName()
      + Strings.getNl() + "Introspector exception was: " + e
    );
  }

  Iterator<Object> parnameIter = parameters.keySet().iterator();
  while(parnameIter.hasNext()){
    String parName = (String)parnameIter.next();
    setParameterValue(resource, resBeanInf, parName, parameters.get(parName));
  }
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:27,代码来源:AbstractResource.java

示例4: setParameterValue

import gate.util.Strings; //导入方法依赖的package包/类
/**
 * Sets the value for a specified parameter for this resource.
 *
 * @param paramaterName the name for the parameter
 * @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 = getBeanInfo(this.getClass());
  } catch(Exception e) {
    throw new ResourceInstantiationException(
      "Couldn't get bean info for resource " + this.getClass().getName()
      + Strings.getNl() + "Introspector exception was: " + e
    );
  }
  setParameterValue(this, resBeanInf, paramaterName, parameterValue);
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:22,代码来源:AbstractResource.java

示例5: setParameterValue

import gate.util.Strings; //导入方法依赖的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

示例6: toString

import gate.util.Strings; //导入方法依赖的package包/类
/** String representation */
@Override
public String toString() {
  String nl = Strings.getNl();
  StringBuffer s = new StringBuffer("SerialDataStore: ");
  s.append("autoSaving: " + autoSaving);
  s.append("; storageDir: " + storageDir);
  s.append(nl);

  return s.toString();
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:12,代码来源:SerialDataStore.java

示例7: help

import gate.util.Strings; //导入方法依赖的package包/类
/** Display a help message */
public static void help() {
  String nl = Strings.getNl();
  Out.prln(
    "For help on command-line options and other information " + nl +
    "see the user manual in your GATE distribution or at " + nl +
    "http://gate.ac.uk/userguide/"
  );
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:10,代码来源:Main.java

示例8: getParameterClass

import gate.util.Strings; //导入方法依赖的package包/类
/** Find the class for this parameter type. */
  protected Class<?> getParameterClass() throws ParameterException
  {
    // get java builtin classes via class; else look in the register
    try {
      ResourceData resData = Gate.getCreoleRegister().get(typeName);
      if(resData == null){
        paramClass = Gate.getClassLoader().loadClass(typeName);
      }else{
        paramClass = resData.getResourceClass();
      }

//      if(typeName.startsWith("java."))
//          paramClass = Class.forName(typeName);
//      else {
//        ResourceData resData =
//          (ResourceData) Gate.getCreoleRegister().get(typeName);
//        if(resData == null)
//          throw new ParameterException(
//            "No resource data for " + typeName + " in Parameter/getParamClz"
//          );
//        paramClass = resData.getResourceClass();
//      }
    } catch(ClassNotFoundException e) {
      throw new ParameterException(
        "Couldn't find class " + typeName + ": " + Strings.getNl() + e
      );
    }

    if(paramClass == null)
      throw new ParameterException("Couldn't find class " + typeName);

    return paramClass;
  }
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:35,代码来源:Parameter.java

示例9: toString

import gate.util.Strings; //导入方法依赖的package包/类
/** String respresentation */
public String toString() {
  if(currentDocument == null) {
    String n = Strings.getNl();
    StringBuffer s = new StringBuffer("CompoundDocumentImpl: " + n);
    s.append("  encoding:" + encoding + n);
    s.append("  features:" + features + n);
    s.append("  markupAware:" + markupAware + n);
    s.append("  sourceUrl:" + sourceUrl + n);
    s.append(n);
    return s.toString();
  } else {
    return currentDocument.toString();
  }
}
 
开发者ID:Network-of-BioThings,项目名称:GettinCRAFTy,代码行数:16,代码来源:AbstractCompoundDocument.java


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