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

x33g5p2x  于2022-02-05 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(104)

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

YElement.getOneAttributeSimpleValue介绍

暂无

代码示例

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

protected String getBibliographicalDescription(YElement element) {
  String description = element.getOneAttributeSimpleValue(
      YConstants.AT_BIBLIOGRAPHICAL_DESCRIPTION);
  return description;
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

private String getChaptersCount(YElement element) {
  return element.getOneAttributeSimpleValue(
      YConstants.AT_SPRINGER_CHAPTER_COUNT);
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

private String getPagesCount(YElement element) {
  return element.getOneAttributeSimpleValue(
      YConstants.AT_BIB_PAGE_COUNT);
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

private String getPublicationPlace(YElement element) {
  return element.getOneAttributeSimpleValue(
      YConstants.AT_PUBLICATION_PLACE);
}

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

@Override
public String prepareCopyrightData(YElement yElement) {
  Joiner joiner = Joiner.on(", ").skipNulls();
  return joiner.join(Arrays.asList(yElement.getOneAttributeSimpleValue(CommonAttributeTypes.AT_COPYRIGHT_HOLDER),
      yElement.getOneAttributeSimpleValue(CommonAttributeTypes.AT_COPYRIGHT_YEAR)));
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

private String getPages(YElement element) {
  String from = element.getOneAttributeSimpleValue(YConstants.AT_SPRINGER_PAGE_FROM);
  String to = element.getOneAttributeSimpleValue(YConstants.AT_SPRINGER_PAGE_TO);
  if(StringUtils.isNotBlank(from)) {
    StringBuilder result = new StringBuilder(from);
    if(StringUtils.isNotBlank(to) && !to.equals(from)) {
      result.append(" - ").append(to);                            
    }
    return result.toString();
  } 
  return null;
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

private String getCopyright(YElement element) {
  String holder = element.getOneAttributeSimpleValue(YConstants.AT_COPYRIGHT_HOLDER);
  String year = element.getOneAttributeSimpleValue(YConstants.AT_COPYRIGHT_YEAR);
  if(holder != null) {
    StringBuilder result = new StringBuilder(holder);
    if(StringUtils.isNotBlank(year)) {
      result.append(" (").append(year).append(")");                            
    }
    return result.toString();
  } 
  return null;
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

@Override
protected Object buildElementViewPart(YExportable exp, String[] elementTags,
    Map<String, Object> additionalParameters,
    IFilteringContext filteringContext) {
  Map<String, Object> partModel = new HashMap<String, Object>();
    YElement element = (YElement) exp;
    String attr;
    if ((attr = element.getOneAttributeSimpleValue(
        "psjc.paper-type")) != null) {
      partModel.put("psjcPaperType", detailsFilter.filter(attr,
          InputType.RICH_TEXT, filteringContext));
    }
    if ((attr = element.getOneAttributeSimpleValue(
        "author-correspondence")) != null) {
      partModel.put("authorCorrespondence", detailsFilter.filter(attr,
          InputType.RICH_TEXT, filteringContext));
    }
  return partModel;
}

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

@Override
protected List<BibEntry> prepareActualDocument(List<YExportable> document) throws Exception {
  List<BibEntry> entries = new ArrayList<BibEntry>(document.size());
  for (YExportable element : document) {
    String text = ((YElement) element).getOneAttributeSimpleValue("text");
    BibEntry entry = bibReferenceParser.parseBibReference(text);
    // Provide default values for missing fields
    //entry = yToBibEntry.convert(bibEntryToY.convert(entry));
    entry.setText(text);
    entries.add(entry);
  }
  return entries;
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

@Override
protected Object buildElementViewPart(YExportable exp, String[] elementTags,
    Map<String, Object> additionalParameters,
    IFilteringContext filteringContext) {
  Map<String, Object> partModel = new HashMap<String, Object>();
    YElement element = (YElement) exp;
    String attr;
    if ((attr = element.getOneAttributeSimpleValue(
        YConstants.AT_CONFERENCE_TITLE)) != null) {
      partModel.put("conferenceTitle", detailsFilter.filter(attr,
          InputType.RICH_TEXT, filteringContext));
    }
    if ((attr = element.getOneAttributeSimpleValue(
        YConstants.AT_BAZTECH_MAIN_AUTH_ADDRESS)) != null) {
      partModel.put("baztechAuthAddress", detailsFilter.filter(attr,
          InputType.RICH_TEXT, filteringContext));
    }
    if ((attr = element.getOneAttributeSimpleValue(
        YConstants.AT_BAZTECH_MAIN_AUTH_MAIL)) != null) {
      partModel.put("baztechAuthMail", detailsFilter.filter(attr,
          InputType.RICH_TEXT, filteringContext));
    }
  return partModel;
}

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

public static String pages(final YElement element) {
  final YCurrent current = yCurrentInJournalHierarchy(element);
  String result = current.getPosition();
  if (StringUtils.isEmpty(result)) {
    // try to get it from description
    final String bibDesc = element.getOneAttributeSimpleValue("bibliographical.description");
    if (StringUtils.isNotEmpty(bibDesc)) {
      final int[] position = PositionMatcher.match(bibDesc);
      if (position != null && position.length == 2) {
        if (position[0] == position[1]) {
          result = Integer.toString(position[0]);
        } else {
          result = position[0] + "-" + position[1];
        }
      } else {
        final Pattern p = Pattern.compile("\\d");
        final Matcher m = p.matcher(bibDesc);
        if (m.find()) {
          log.warn("Unable to extract pages from description ({}):{}", element.getId(), bibDesc);
        }
      }
    }
  }
  return result;
}

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

protected void fillRights(YElement yElement, List<YExportable> referedElements, Map<String, List<StringWithAttributes>> ret) {
  //copyrigths
  //rights
  if (yElement.getOneAttributeSimpleValue(CommonAttributeTypes.AT_COPYRIGHT_HOLDER) != null) {
    if (!ret.containsKey(E_RIGHTS)) {
      ret.put(E_RIGHTS, new ArrayList<StringWithAttributes>());
    }
    ret.get(E_RIGHTS).add(new StringWithAttributes(yElement.getOneAttributeSimpleValue(CommonAttributeTypes.AT_COPYRIGHT_HOLDER)));
  }
  //From synat;) 
  YTagList licenses = yElement.getTagList("License");
  if (licenses != null) {
    for (String licenseText : licenses.getValues()) {
      if (!ret.containsKey(E_RIGHTS)) {
        ret.put(E_RIGHTS, new ArrayList<StringWithAttributes>());
      }
      StringWithAttributes swa = new StringWithAttributes(licenseText);
      if (licenses.setLanguage(YLanguage.Sandawe) != null && StringUtils.isNotBlank(licenses.getLanguage().getShortCode())) {
        swa.addAttribute("lang", licenses.getLanguage().getShortCode());
      }
      ret.get(E_RIGHTS).add(swa);
    }
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

final String availabilityValue = element.getOneAttributeSimpleValue(YConstants.AT_JOURNAL_FULLTEXTS_AVAILABLE_LOCALLY);
result.put(AVAILABILITY, detailsFilter.filter(getAvailabilityCode(availabilityValue), InputType.IDENTIFIER, filteringContext));

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

String cattr = element.getOneAttributeSimpleValue(YConstants.AT_CEJSH_PAPER_TYPE);
if (cattr != null) {
  partModel.put("cejsh_paper_type", cattr);
cattr = element.getOneAttributeSimpleValue(YConstants.AT_CEJSH_PUBLICATION_ORDER_REFERENCE);
if (cattr != null) {
  partModel.put("cejsh_publication_order_reference", cattr);

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

result.setVisibility(ResourceVisibility.fromString(yElement.getOneAttributeSimpleValue(CommonAttributeTypes.AT_VISIBILITY)));

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

String copyrightHolder = yElement.getOneAttributeSimpleValue(YConstants.AT_COPYRIGHT_HOLDER);
bibEntry.setField(BibEntry.FIELD_COPYRIGHT, copyrightHolder);

相关文章