org.apache.abdera.model.Feed.getEntry()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(133)

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

Feed.getEntry介绍

[英]Retrieves the first entry in the feed with the given atom:id value
[中]使用给定的atom:id值检索提要中的第一个条目

代码示例

代码示例来源:origin: org.fuzzydb.atom/org.fuzzydb.abdera.util

private Entry getAbderaEntry(RequestContext request) {
  Abdera abdera = request.getAbdera();
  String entry_id = getEntryID(request);
  Document<Feed> feed = get_feed_doc(abdera);
  try {
    return feed.getRoot().getEntry(entry_id);
  } catch (Exception e) {
    // ignore
  }
  return null;
}

代码示例来源:origin: org.fcrepo/fcrepo-server

private void addDatastreamVersion(Feed feed, Entry entry, DigitalObject obj,
    String encoding, int transContext, File tempDir)
    throws UnsupportedEncodingException, StreamIOException,
    ObjectIntegrityException {
  IRI ref = ThreadHelper.getInReplyTo(entry).getRef();
  Entry parent = feed.getEntry(ref.toString());
  Datastream ds;
  String controlGroup = getDSControlGroup(obj, parent);
  if (controlGroup.equals("X")) {
    ds = addInlineDatastreamVersion(feed, entry, obj, encoding, tempDir);
  } else if (controlGroup.equals("M")) {
    ds = addManagedDatastreamVersion(obj, entry, feed, encoding, transContext, tempDir);
  } else {
    try {
      ds = addExternalReferencedDatastreamVersion(obj, entry, feed, transContext);
    } catch (IOException e) {
      throw new StreamIOException(e.getMessage(), e);
    }
  }
  obj.addDatastreamVersion(ds, true);
}

代码示例来源:origin: fcrepo3/fcrepo

private void addDatastreamVersion(Feed feed, Entry entry, DigitalObject obj,
    String encoding, int transContext, File tempDir)
    throws UnsupportedEncodingException, StreamIOException,
    ObjectIntegrityException {
  IRI ref = ThreadHelper.getInReplyTo(entry).getRef();
  Entry parent = feed.getEntry(ref.toString());
  Datastream ds;
  String controlGroup = getDSControlGroup(obj, parent);
  if (controlGroup.equals("X")) {
    ds = addInlineDatastreamVersion(feed, entry, obj, encoding, tempDir);
  } else if (controlGroup.equals("M")) {
    ds = addManagedDatastreamVersion(obj, entry, feed, encoding, transContext, tempDir);
  } else {
    try {
      ds = addExternalReferencedDatastreamVersion(obj, entry, feed, transContext);
    } catch (IOException e) {
      throw new StreamIOException(e.getMessage(), e);
    }
  }
  obj.addDatastreamVersion(ds, true);
}

代码示例来源:origin: fcrepo3/fcrepo

private void setDSCommonProperties(Datastream dsVersion, DigitalObject obj, Entry entry, Feed feed)
    throws ObjectIntegrityException {
  IRI ref = ThreadHelper.getInReplyTo(entry).getRef();
  Entry parent = feed.getEntry(ref.toString());
  dsVersion.DatastreamID = getDatastreamId(obj, parent);
  dsVersion.DSControlGrp = getDSControlGroup(obj, parent);
  dsVersion.DSState = getDSState(parent);
  dsVersion.DSVersionable = getDSVersionable(obj, parent);
  setDatastreamVersionProperties(dsVersion, obj, entry);
}

代码示例来源:origin: org.fcrepo/fcrepo-server

private void setDSCommonProperties(Datastream dsVersion, DigitalObject obj, Entry entry, Feed feed)
    throws ObjectIntegrityException {
  IRI ref = ThreadHelper.getInReplyTo(entry).getRef();
  Entry parent = feed.getEntry(ref.toString());
  dsVersion.DatastreamID = getDatastreamId(obj, parent);
  dsVersion.DSControlGrp = getDSControlGroup(obj, parent);
  dsVersion.DSState = getDSState(parent);
  dsVersion.DSVersionable = getDSVersionable(obj, parent);
  setDatastreamVersionProperties(dsVersion, obj, entry);
}

相关文章