gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-13 22:06:03 26 4
gpt4 key购买 nike

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

YExportable.getId介绍

暂无

代码示例

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

public synchronized void foundNewElementForImporting(YExportable exp) {
  idsToLevelsHierarchyOfElements.put(exp.getId(), getHierarchyLevels(exp));
}

代码示例来源: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> model = new HashMap<String, Object>();
  try {
    model.put("list", annotationManager.retrieveNotes(exp.getId(), null, null));
  } catch (AnnotationManagerException e) {
    logger.error(e.getMessage(), e);
  }
  return model;
}

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

@Override
protected Object buildElementViewPart(final YExportable exp, final String[] elementTags,
    final Map<String, Object> additionalParameters, final IFilteringContext filteringContext) {
  TreeNode treeNode = null;
  try {
    final List<TreeNode> items = hierarchyTreeUtils.createItems(exp.getId(), null);
    boolean emptyOrRootOnly = isEmpty(items) || isEmpty(items.get(0).getChildren());
    if (!emptyOrRootOnly) {
      treeNode = items.get(0);
    }
  } catch (final Exception e) {
    log.error("Details: Error getting element from browser! extId=" + exp.getId(), e);
  }
  final HierarchyTreeView hierarchyTreeView = new HierarchyTreeView(treeNode);
  return hierarchyTreeView;
}

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

protected void retrieveYElements(List<OaiItem> list) throws OAIInternalServerError {
  try {
    Collection<String> ids = new ArrayList<String>();
    Map<String, OaiItem> map = new LinkedHashMap<String, OaiItem>();
    for (OaiItem item : list) {
      ids.add(item.getId());
      map.put(item.getId(), item);
    }
    Collection<YExportable> objects = bwmetaSource.getByIds(ids);
    for (YExportable yobject : objects) {
      if (yobject instanceof YElement) {
        OaiItem item = map.get(yobject.getId());
        item.setYobject((YElement) yobject);
      }
    }
  } catch (Exception e) {
    log.error("Error during record retrieval", e);
    throw new OAIInternalServerError("Error during record retrieval");
  }
}

代码示例来源:origin: pl.edu.icm.coansys/coansys-io-input

protected void addBwmetaMedia(List<YExportable> bwmeta, String docNewId, DocumentProtos.DocumentWrapper.Builder builder) throws UnsupportedEncodingException {
 
  for (YExportable ex : bwmeta) {
    if (ex instanceof YElement) {
      if (((YElement) ex).getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL) != null
        && HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_ARTICLE.equalsIgnoreCase(((YElement) ex)
          .getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL).getCurrent().getLevel())) {
        if (NON_ID_CHARS.matcher(ex.getId()).find()) {
          String nid = docNewId;
          nid = nid.replaceAll("[^a-zA-Z0-9\\-_]", "_");
          ((YElement) ex).setId(nid);
        }
      } else {
         if (NON_ID_CHARS.matcher(ex.getId()).find()) {
          String nid = ex.getId();
          nid = nid.replaceAll("[^a-zA-Z0-9\\-_]", "_");
          ((YElement) ex).setId(nid);
        }
      }
    }
  }
  String bwmetas = ywriter.write(bwmeta);
  builder.getMediaContainerBuilder().addMediaBuilder().
    setKey(BWMeta2Constants.KEY_BWMETA2_RECORD).
    setMediaType(BWMeta2Constants.TYPE_BWMETA2_RECORD).
    setContent(ByteString.copyFrom(bwmetas.getBytes("utf-8")));
}

代码示例来源:origin: pl.edu.icm.ceon/ceon-converters-commons

boolean isMediaLeaf = isMediaLeaf(entity);
if (storeJournalsInSeparatePacks) {
  if (journalStorageIds.contains(entity.getId())) {
    continue;
    journalStorageIds.add(entity.getId());
if (storageIds.contains(entity.getId())) {
  if (isLeaf) {
    log.warn("Skipping previously stored leaf " + entity.getId() + ";  current source: " + metaPart.getId());
  } else {
    log.debug("Skipping previously stored " + entity.getId() + ";  current source: " + metaPart.getId());
storageIds.add(entity.getId());
if (isLeaf) {
  leaves.add((YElement) entity);
for (YExportable ex : toAdd) {
  if (ex instanceof YElement) {
    processFile(elementContentSource.getDataForElement(ex.getId()), Collections.singletonList((YElement) ex));
           */ "/" + entity.getId() + ".xml";
    log.error("Cannot add entity " + entity.getId() + " original: " + metaPart.getId(), e);
           */ "/" + exp.getId() + ".xml");
      journalsAndYearsPackWriter.getStream().write(xml.getBytes(Charset.forName("UTF8")));
      if (isLeaf(exp)) {

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

boolean isMediaLeaf = isMediaLeaf(entity);
if (storeJournalsInSeparatePacks) {
  if (journalStorageIds.contains(entity.getId())) {
    continue;
    journalStorageIds.add(entity.getId());
if (storageIds.contains(entity.getId())) {
  if (isLeaf) {
    log.warn("Skipping previously stored leaf " + entity.getId() + ";  current source: " + metaPart.getId());
  } else {
    log.debug("Skipping previously stored " + entity.getId() + ";  current source: " + metaPart.getId());
storageIds.add(entity.getId());
if (isLeaf) {
  leaves.add((YElement) entity);
for (YExportable ex : toAdd) {
  if (ex instanceof YElement) {
    processFile(elementContentSource.getDataForElement(ex.getId()), Collections.singletonList((YElement) ex));
           */ "/" + entity.getId() + ".xml";
    log.error("Cannot add entity " + entity.getId() + " original: " + metaPart.getId(), e);
           */ "/" + exp.getId() + ".xml");
      journalsAndYearsPackWriter.getStream().write(xml.getBytes());
      if (isLeaf(exp)) {

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

@Override
public IViewBuilder<CatalogInformationEnhancedObject<YExportable>> resolveViewBuilder(
    CatalogInformationEnhancedObject<YExportable> catalogElement, Map<String, Object> parameters) {
  if (catalogElement.getObject() instanceof YElement) {
    YElement element = (YElement) catalogElement.getObject();
    return resolveElement(element, parameters);
  } else if (catalogElement.getObject() instanceof YInstitution) {
    YInstitution inst = (YInstitution) catalogElement.getObject();
    return resolveInstitution(inst, parameters);
  }
  throw new SystemException(Modules.DETAILS, "View for BWMETA part "
      + catalogElement==null?null:catalogElement.getObject().getId() + " not found");
}

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