gpt4 book ai didi

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

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

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

YRelation.getTarget介绍

暂无

代码示例

代码示例来源: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.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.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.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/yaddaweb-lite-core

@Override
protected Object buildElementViewPart(YExportable exp,
    String[] elementTags, Map<String, Object> additionalParameters,
    IFilteringContext filteringContext) {
  YElement element = (YElement) exp;
  List<ViewReference> partModel = new LinkedList<ViewReference>();
  for (YRelation ref : element.getRelations(YConstants.RL_REFERENCE_TO)) {
    String id;
    if (ref.getTarget() != null) {
      id = detailsFilter.filter(ref.getTarget().getValue(),
          InputType.IDENTIFIER, filteringContext);
    } else {
      id = null;
    }
    
    YAttribute attribute = ref.getOneAttribute(YConstants.AT_REFERENCE_TEXT);
    String cite = getXMLFragmentFrom(attribute);
    
    partModel.add(new ViewReference(null,
        cite != null ? detailsFilter.filter(cite,
            InputType.RICH_TEXT, filteringContext) : null, id));
  }
  return partModel;
}

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

String type = ref.getType();
if (isVisible(type) && ref.getTarget() != null) {
  String title = "?";
  String id = ref.getTarget().getValue();
  try {
    ElementInfo info = infoService.extractElementInfo(id,

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

public List<ElementWithThumbnail<BriefElementData>> prepareReferences(List<YRelation> yRelationList, ElementType elementType) {
  BriefDataFactory bdf = new BriefDataFactory();
  List<BriefElementData> referencesList = new ArrayList<BriefElementData>();
  for (YRelation reference : yRelationList) {
    BriefElementData referenceMetadata = null;
    if (reference.getTarget() != null) {
      try {
        final String id = resolveId(reference.getTarget());
        referenceMetadata = repositoryFacade.fetchBriefElementData(id);
      } catch (NotFoundException e) {
        referenceMetadata = bdf.createPublicationData(reference, elementType);
      }
    }
    if (referenceMetadata == null) {
      referenceMetadata = bdf.createPublicationData(reference, elementType);
    }
    if (referenceMetadata instanceof ObjectDetails && ((ObjectDetails) referenceMetadata).getObjectType().equals(ElementType.JOURNAL)) {
      if (referenceMetadata instanceof PublicationData) {
        final String date = reference.getOneAttributeSimpleValue(ReferenceAttributeTypes.AT_REFERENCE_PARSED_DATE);
        if (StringUtils.isNotBlank(date)) {
          ((PublicationData) referenceMetadata).setDescription(date);
        } else {
          ((PublicationData) referenceMetadata).setDescription(StringUtils.EMPTY);
        }
      }
    }
    referencesList.add(referenceMetadata);
  }
  return thumbnailService.enrichWithThumbnailUrl(referencesList);
}

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

if (rel.getTarget() != null
  && /*YConstants.EXT_SCHEME_YADDA && */ rel.getTarget().getValue() != null && !rel.getTarget().getValue().isEmpty()) {
  additional.add(rel.getTarget().getValue());

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

private List<DocReference> referencesFromYElement(final YElement element) {
  final List<DocReference> references = new ArrayList<DocReference>();
  for (final YRelation ref : element.getRelations(YConstants.RL_REFERENCE_TO)) {
    final DocReference reference = new DocReference();
    final List<DocId> matches = new ArrayList<DocId>();
    final YId target = ref.getTarget();
    if (target != null && YConstants.EXT_SCHEME_YADDA.equals(target.getScheme())) {
      final String extId = target.getValue();
      matches.add(new DocId(MetadataIndexConstants.D_EXTID, extId));
    }
    reference.setMatches(matches);
    final YAttribute refText = ref.getOneAttribute(YConstants.AT_REFERENCE_TEXT);
    if (refText != null) {
      final String text = refText.getValue();
      reference.setText(text);
      final DocReference parsed = referenceParser.parse(text);
      if (parsed != null && parsed.getParsed() != null) {
        reference.setParsed(parsed.getParsed());
      }
    }
    references.add(reference);
    // TODO What to do with URL references
  }
  return references;
}

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

for (YRelation relation : contentElement.getRelations()) {
  page.getRelations().add(
    relation.getTarget().getValue());

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

BibliographyReference bibRef = new BibliographyReference();
String text = formatBibliographyText(relation); 
YId target = relation.getTarget();
if (target != null && target.getValue() != null && IdSchemaIds.EXT_SCHEME_YADDA.equals(target.getScheme())) {
  bibRef.setAssignedId(target.getValue());

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