gpt4 book ai didi

pl.edu.icm.model.bwmeta.y.YCategoryRef.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 07:58:49 26 4
gpt4 key购买 nike

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

YCategoryRef.<init>介绍

暂无

代码示例

代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers

/**
 * @param code BASE Dublin Core automatically assigned class code.
 * @return class code as YCategoryRef.
 * @see <a href="http://oai.base-search.net/index.html#base-dc">BASE Dublin Core format description.</a>
 */
public static YCategoryRef fromBaseDdcInfered(String code) {
  return new YCategoryRef(YaddaIdConstants.CATEGORY_CLASS_BASE_DDC_INFERED, code);
}

代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers

/**
 * @param code BASE Dublin Core manually assigned class code.
 * @return class code as YCategoryRef.
 * @see <a href="http://oai.base-search.net/index.html#base-dc">BASE Dublin Core format description.</a>
 */
public static YCategoryRef fromBaseDdcByHand(String code) {
  return new YCategoryRef(YaddaIdConstants.CATEGORY_CLASS_BASE_DDC_BY_HAND, code);
}

代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core

private YCategoryRef categoryRef(String classificationId, String code) {
    if (StringUtils.isBlank(classificationId) || StringUtils.isBlank(code))
      return null;
    else
      return new YCategoryRef(classificationId, code);
  }
}

代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core

private YCategoryRef categoryRef(String classificationId, String code) {
  if (StringUtils.isBlank(classificationId) || StringUtils.isBlank(code))
    return null;
  else
    return new YCategoryRef(classificationId, code);
}

代码示例来源:origin: pl.edu.icm.synat/synat-process-common

private void addDisciplines(List<YCategoryRef> yCategoryRefs, String property) {
  for (String discipline : property.split(",")) {
    YCategoryRef newDiscipline = new YCategoryRef(YModelUtils.OECD_CLASSIFICATION, discipline);
    if (yCategoryRefs.contains(newDiscipline)) {
      continue;
    }
    yCategoryRefs.add(newDiscipline);
  }
}

代码示例来源:origin: pl.edu.icm.synat/synat-process-common

private void prepareRootDisciplines(List<YCategoryRef> yCategoryRefs) {
  final Map<String, String> rootCategories = new LinkedHashMap<String, String>();
  prepareRootCategories(yCategoryRefs, rootCategories);
  for (String code : rootCategories.keySet()) {
    yCategoryRefs.add(new YCategoryRef(YModelUtils.OECD_CLASSIFICATION, code));
  }
}

代码示例来源:origin: pl.edu.icm.synat/synat-process-common

private void changeCategoryRef(YElement elementWithCode, final String from, YElement element, final String to) {
  final Map<String, String> rootCategories = new HashMap<String, String>();
  changeCategoryRef(element, elementWithCode, from, to, rootCategories);
  for (String code : rootCategories.keySet()) {
    element.addCategoryRef(new YCategoryRef(to, code));
  }
}

代码示例来源:origin: pl.edu.icm.synat/synat-portal-core

private void appendDisciplines(ResourceData resource, YElement yElement) {
  for (String discipline : resource.getDisciplines()) {
    if (StringUtils.isNotEmpty(discipline)) {
      yElement.addCategoryRef(new YCategoryRef(DisciplineOfScience.CATEGORY_CLASSIFICATION, discipline));
    }
  }
}

代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import

/**
 * Creates a category reference given its classification id and category code.
 * If the id or code is empty or null, does not create a reference but returns null.
 *
 * @param classId identifier of the classification from which the category comes
 * @param code code of the category
 * @return created reference, or null if either parameter was empty or null
 */
public YCategoryRef categoryRef(String classId, String code) {
  if (empty(classId) || empty(code)) return null;
  return new YCategoryRef(classId, code);
}

代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import

/**
 * Reads MSC categories from field [cc] and writes to yElement.
 * 
 * @param src
 * @param yelement
 */
private void updateArticleCategories(ZentralBlattRecord src, YElement yelement) {
  if (!src.hasField("cc")) {
    return;
  }
  String[] categories = src.getField("cc").split(" ");
  for (String category : categories) {
    if (category.equals("-")) {
      continue;
    }
    if (category.charAt(0) == '*') {
      category = category.substring(1);
    }
    YCategoryRef catRef = new YCategoryRef(YConstants.EXT_CLASSIFICATION_MSC, category);
    yelement.addCategoryRef(catRef);
  }
}

代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers

protected static List<YCategoryRef> sanitizeCategoryRef(YCategoryRef ref) {
    Pattern pattern = null;
    if (ClassificationIds.EXT_CLASSIFICATION_CLC.equals(ref.getClassification()))
      pattern = CLC_REF_PATTERN;
    else if (ClassificationIds.EXT_CLASSIFICATION_JEL.equals(ref.getClassification()))
      pattern = JEL_REF_PATTERN;
    else if (ClassificationIds.EXT_CLASSIFICATION_MSC.equals(ref.getClassification()))
      pattern = MSC_REF_PATTERN;
    else if (ClassificationIds.EXT_CLASSIFICATION_PACS.equals(ref.getClassification()))
      pattern = PACS_REF_PATTERN;
    else if (ClassificationIds.EXT_CLASSIFICATION_QICS.equals(ref.getClassification()))
      pattern = QICS_REF_PATTERN;
    else if (ClassificationIds.EXT_CLASSIFICATION_ZDM.equals(ref.getClassification()))
      pattern = ZDM_REF_PATTERN;
    else
      return Collections.singletonList(ref);

    String code = ref.getCode();
    List<YCategoryRef> foundCodes = new ArrayList<YCategoryRef>();
    Matcher matcher = pattern.matcher(code);
    while (true) {
      if (!matcher.find())
        break;
      YCategoryRef found = new YCategoryRef(ref.getClassification(), matcher.group(1).replaceAll("\\p{Pd}", "-"));
      foundCodes.add(found);
    }
    return foundCodes;
  }
}

代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers

private void updateCategoryRefs(YElement article, org.jdom.Element kg, String type) {
  List<org.jdom.Element> ks = JDOMHelper.getChildren(kg, "kwd");
  for (org.jdom.Element k : ks) {
    String codeText = JDOMHelper.textOfElement(k).toText();
    for (String code : findAllCategoryCodes(codeText, type)) {
      YCategoryRef ref = new YCategoryRef(type, code);
      article.addCategoryRef(ref);
    }
  }
}

代码示例来源:origin: pl.edu.icm.synat/synat-process-common

private void chengeCategoryRef(YElement element, final String to, final Map<String, String> rootCategories
    , final YCategoryRef yCategoryRefWithCode) {
  YCategoryRef yCategoryRefToModify = new YCategoryRef();
  yCategoryRefToModify.setClassification(to);
  yCategoryRefToModify.setCode(yCategoryRefWithCode.getCode());
  element.addCategoryRef(yCategoryRefToModify);
  addRootCategories(yCategoryRefToModify, rootCategories);
}

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