gpt4 book ai didi

org.intermine.util.XmlUtil.getFragmentFromURI()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 10:20:40 27 4
gpt4 key购买 nike

本文整理了Java中org.intermine.util.XmlUtil.getFragmentFromURI()方法的一些代码示例,展示了XmlUtil.getFragmentFromURI()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlUtil.getFragmentFromURI()方法的具体详情如下:
包路径:org.intermine.util.XmlUtil
类名称:XmlUtil
方法名:getFragmentFromURI

XmlUtil.getFragmentFromURI介绍

[英]Return the fragment portion of a URI string (i.e. everything after a #).
[中]返回URI字符串的片段部分(即#后面的所有内容)。

代码示例

代码示例来源:origin: org.intermine/intermine-objectstore

/**
   * Generate a package qualified class name within the specified model from a space separated
   * list of namespace qualified names
   *
   * @param classNames the list of namepace qualified names
   * @param model the relevant model
   * @return the package qualified names
   */
  public static String generateClassNames(String classNames, Model model) {
    if (classNames == null) {
      return null;
    }
    StringBuffer sb = new StringBuffer();
    for (String s : StringUtil.tokenize(classNames)) {
      sb.append(model.getPackageName() + "." + XmlUtil.getFragmentFromURI(s + " "));
    }
    return sb.toString().trim();
  }
}

代码示例来源:origin: org.intermine/intermine-objectstore

/**
 * Set the classDescriptor attribute to be the ClassDescriptor for the given className in the
 * Model set by setModel().  Returns immediately if the Model hasn't been set or the className
 * parameter is "".
 *
 * @param className the class name
 */
protected void setClassDescriptor(String className) {
  if (model != null && !"".equals(className)) {
    String fullClassName =
      model.getPackageName() + "." + XmlUtil.getFragmentFromURI(className);
    classDescriptor = getClassDescriptorByName(fullClassName);
  }
}

代码示例来源:origin: intermine/intermine

/**
 * Set the classDescriptor attribute to be the ClassDescriptor for the given className in the
 * Model set by setModel().  Returns immediately if the Model hasn't been set or the className
 * parameter is "".
 *
 * @param className the class name
 */
protected void setClassDescriptor(String className) {
  if (model != null && !"".equals(className)) {
    String fullClassName =
      model.getPackageName() + "." + XmlUtil.getFragmentFromURI(className);
    classDescriptor = getClassDescriptorByName(fullClassName);
  }
}

代码示例来源:origin: intermine/intermine

/**
   * Generate a package qualified class name within the specified model from a space separated
   * list of namespace qualified names
   *
   * @param classNames the list of namepace qualified names
   * @param model the relevant model
   * @return the package qualified names
   */
  public static String generateClassNames(String classNames, Model model) {
    if (classNames == null) {
      return null;
    }
    StringBuffer sb = new StringBuffer();
    for (String s : StringUtil.tokenize(classNames)) {
      sb.append(model.getPackageName() + "." + XmlUtil.getFragmentFromURI(s + " "));
    }
    return sb.toString().trim();
  }
}

代码示例来源:origin: org.intermine/intermine-objectstore

/**
 * Throw a RuntimeException if any of the named class isn't in the Model set by setModel().
 * Returns null if the model isn't set or className is "".
 *
 * @param className the class name
 * @return the ClassDescriptor for the given class
 */
protected ClassDescriptor getClassDescriptorByName(String className) {
  if (model == null) {
    return null;
  }
  if ("".equals(className)) {
    return null;
  }
  String fullClassName = model.getPackageName() + "." + XmlUtil.getFragmentFromURI(className);
  ClassDescriptor cd = model.getClassDescriptorByName(fullClassName);
  if (cd == null) {
    throw new IllegalArgumentException("class \"" + fullClassName
        + "\" is not in the Model");
  }
  return cd;
}

代码示例来源:origin: intermine/intermine

/**
 * Throw a RuntimeException if any of the named class isn't in the Model set by setModel().
 * Returns null if the model isn't set or className is "".
 *
 * @param className the class name
 * @return the ClassDescriptor for the given class
 */
protected ClassDescriptor getClassDescriptorByName(String className) {
  if (model == null) {
    return null;
  }
  if ("".equals(className)) {
    return null;
  }
  String fullClassName = model.getPackageName() + "." + XmlUtil.getFragmentFromURI(className);
  ClassDescriptor cd = model.getClassDescriptorByName(fullClassName);
  if (cd == null) {
    throw new IllegalArgumentException("class \"" + fullClassName
        + "\" is not in the Model");
  }
  return cd;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com