gpt4 book ai didi

pl.edu.icm.model.bwmeta.y.YId类的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 17:44:40 27 4
gpt4 key购买 nike

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

YId介绍

暂无

代码示例

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

private YId convert(String mediatype, String value, boolean book) {
  switch (mediatype) {
    case PRINT:
      return new YId(book ? IdSchemaIds.EXT_SCHEME_ISBN : IdSchemaIds.EXT_SCHEME_ISSN, value);
    case ELECTRONIC:
      return new YId(book ? IdSchemaIds.EXT_SCHEME_EISBN : IdSchemaIds.EXT_SCHEME_EISSN, value);
  }
  return null;
}

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

private static String extractIssnsStr(List<YId> ids) {
  StringBuilder issns = new StringBuilder();
  for(YId id: ids ) {
    if (id.getScheme().equals(YConstants.EXT_SCHEME_ISSN)){
      issns.append(id.getValue());
      issns.append(YElementToZentralBlattConverter.SUGGESTED_MULTIVALUE_FIELD_SEPARATOR);
    }
  }
  String issnsStr = issns.toString();
  return issnsStr;
}

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

/**
 * Takes all ISSNs in yelement and fixes up formatting.
 * 
 * @param yelement
 */
private void reformatIssns(YElement yelement) {
  for (YId id : yelement.getIds()) {
    if (id.getScheme().equals(YConstants.EXT_SCHEME_ISSN)) {
      String formattedIssn = ZentralBlattConverterTools.formatIssn(id.getValue());
      id.setValue(formattedIssn);
    }
  }
}

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

protected void fillRelations(YElement yElement, List<YExportable> referedElements, Map<String, List<StringWithAttributes>> ret) {
  //        relation element
  for (YRelation yRelation : yElement.getRelations()) {
    if (yRelation.getTarget() != null) {
      if (!ret.containsKey(E_RELATION)) {
        ret.put(E_RELATION, new ArrayList<StringWithAttributes>());
      }
      ret.get(E_RELATION).add(new StringWithAttributes(yRelation.getTarget().getValue()));
    }
  }
}

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

addName(y.name(YLanguage.NoLinguisticContent, surname, YConstants.NM_SURNAME)).
  addName(y.name(YLanguage.NoLinguisticContent, forenames, YConstants.NM_FORENAMES)).
  setIdentity(new YId(YConstants.EXT_SCHEME_YADDA,kl.personid).getValue()).
  setPerson(true);;
  ycl.add(yct);
.setId(new YId(YConstants.EXT_SCHEME_YADDA,kl.docid).getValue());
.setId(new YId(YConstants.EXT_SCHEME_YADDA,kl.docid).getValue());

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

protected YRelation convert(Citation citation) {
  YId target = new YId();
  if (StringUtils.isNotBlank(citation.getDoi())) {
    target.setScheme(IdSchemaIds.EXT_SCHEME_DOI);
    target.setValue(citation.getDoi());

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

private static void updateYElementIdsWithZblIds(YElement ye, YElement zblye) {
  for (YId i : zblye.getIds())
    if (ye.getId(i.getScheme()) == null)
      ye.addId(i);
}

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

private String getRelationId(YRelation relation){
  if(relation.getTarget()!=null)
    return relation.getTarget().getValue();
  else
    return "";
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

if(ye.getId(i.getScheme())==null)
    ye.addId(i);
for(YTagList tl : zblye.getTagLists())

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

public static String retrieveYElementZblId(YElement ye) {
  String mainZblExtId = null;
  for (YId yi : ye.getIds()) {
    if (YConstants.EXT_SCHEME_ZBL.equals(yi.getScheme())) {
      mainZblExtId = yi.getValue();
      break;
    }
  }
  return mainZblExtId;
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

@Override
protected boolean enhanceMetadata(MatchResult result, YElement metadata) {
  // FIXME: Scheme for urn?
  metadata.addId(new YId("urn", result.group(1)));
  return true;
}

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

/**
 * Removes expected ISSNs from text and adds to list of issns
 * 
 * @param text
 * @param issns
 * @return filtered text (with expected ISSNs removed)
 */
public String filterExpectedIssns(String text, List<String> issns) {
  for (YId yExpectedIssn : jrnlPossibleIds) {
    String expectedIssn = yExpectedIssn.getValue();
    String formattedExpectedIssn = ZentralBlattConverterTools.formatIssn(expectedIssn);
    // System.out.println("[filterExpectedIssns] next expectedIssn="+expectedIssn+" formattedExpectedIssn="+formattedExpectedIssn+" text="+text);
    if (text.contains(expectedIssn)) {
      text = text.replaceAll(expectedIssn, "");
      // System.out.println("[filterExpectedIssns] adding next expectedIssn="+expectedIssn);
      issns.add(expectedIssn);
    }
    if (text.contains(formattedExpectedIssn)) {
      text = text.replaceAll(formattedExpectedIssn, "");
      // System.out.println("[filterExpectedIssns] adding next expectedIssn="+expectedIssn);
      issns.add(expectedIssn);
    }
  } // for
  return ZentralBlattConverterTools.trimSeparators(text, SE_SEPARATORS);
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

if(ye.getId(i.getScheme())==null)
    ye.addId(i);
for(YTagList tl : zblye.getTagLists())

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

private String resolveId(YId yId) {
  switch (yId.getScheme()) {
  case IdSchemaIds.EXT_SCHEME_DOI: return resourceIdResolver.byDOI(yId.getValue());
  case IdSchemaIds.EXT_SCHEME_ISBN: return resourceIdResolver.byISBN(yId.getValue());
  case IdSchemaIds.EXT_SCHEME_ISSN: return resourceIdResolver.byISSN(yId.getValue());
  case IdSchemaIds.EXT_SCHEME_EISSN: return resourceIdResolver.byISSN(yId.getValue());
  default: return yId.getValue();
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

@Override
  protected boolean enhanceMetadata(MatchResult result, YElement metadata) {
    metadata.addId(new YId(YConstants.EXT_SCHEME_ISSN, result.group(1)));
    return true;
  }
}

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

private String _getTitleElementId(AbstractElementInfo<?> abstractElement, String relationType){
  List<YRelation> relations = abstractElement.getRelations();
  for(YRelation relation: relations){
    if(relationType.equals(relation.getType())){
      return relation.getTarget().getValue();
    }
  }
  return "";
}

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

private static String extractIssnsStr(List<YId> ids) {
  StringBuilder issns = new StringBuilder();
  for (YId id : ids) {
    if (id == null) {
      continue;
    }
    
    if (id.getScheme().equals(YConstants.EXT_SCHEME_ISSN)) {
      if (id.getValue() == null) {
        continue;
      }
      String issnVal = id.getValue().trim();
      if (issnVal.length() > 0) {
        issns.append(issnVal);
        issns.append(YElementToZentralBlattConverter.SUGGESTED_MULTIVALUE_FIELD_SEPARATOR);
      }
    }
  }
  String issnsStr = issns.toString();
  return issnsStr;
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

@Override
  protected boolean enhanceMetadata(MatchResult result, YElement metadata) {
    metadata.addId(new YId(YConstants.EXT_SCHEME_DOI, result.group(1)));
    return true;
  }
}

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

protected void fillRelations(HtmlMetaHeaders metadata, YElement yElement) {
  for (YRelation yRelation : yElement.getRelations()) {
    if (yRelation.getTarget() != null) {
      metadata.addMetadataName(DC_NAMESPACE + SEPARATOR + DublinCoreStrings.E_RELATION, yRelation.getTarget().getValue());
    }
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

@Override
  void compare(YElement expected, YElement actual, EvalResult result) {
    Map<String, YId> actYIdMap = new HashMap<String, YId>();
    for (YId yid : actual.getIds()) {
      String scheme = yid.getScheme();
      actYIdMap.put(scheme, yid);
    }
    for (YId yid : expected.getIds()) {
      String scheme = yid.getScheme();
      if (actYIdMap.containsKey(scheme)) {
        if (yid.getValue().equals(actYIdMap.get(scheme).getValue())) {
          result.append(scheme, ResultStatus.RECOGNIZED, 1);
        } else {
          result.append(scheme, ResultStatus.FAILED, 1);
        }
        actYIdMap.remove(scheme);
      } else {
        result.append(scheme, ResultStatus.FAILED, 1);
      }
    }
    for (String scheme : actYIdMap.keySet()) {
      result.append(scheme, ResultStatus.REDUNDANT, 1);
    }
  }
},

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