Package org.apache.abdera.model

Examples of org.apache.abdera.model.Entry.clone()


  public ResponseContext getEntry(
    RequestContext request) {
      Entry entry = (Entry) getAbderaEntry(request);
      if (entry != null) {
        Feed feed = entry.getParentElement();
        entry = (Entry) entry.clone();
        entry.setSource(feed.getAsSource());
        Document<Entry> entry_doc = entry.getDocument();
        AbstractResponseContext rc = new BaseResponseContext<Document<Entry>>(entry_doc);
        rc.setEntityTag(calculateEntityTag(entry));
        return rc;
View Full Code Here


        if (offset > files.length)
            return;
        for (int n = offset; n < offset + length && n < files.length; n++) {
            File file = files[n];
            Entry entry = getEntry(file);
            feed.addEntry((Entry)entry.clone());
        }
    }

    public ResponseContext getFeed(RequestContext request) {
        Feed feed = abdera.newFeed();
View Full Code Here

    RequestContext request,
    boolean full) {
      Entry entry = (Entry) getEntry(request);
      if (entry != null) {
        Feed feed = entry.getParentElement();
        entry = (Entry) entry.clone();
        entry.setSource(feed.getAsSource());
        Document<Entry> entry_doc = entry.getDocument();
        AbstractResponseContext rc = (full) ?
          new BaseResponseContext<Document<Entry>>(entry_doc) :
          new EmptyResponseContext(200);
View Full Code Here

    public ResponseContext getEntry(RequestContext request) {
        Entry entry = (Entry)getAbderaEntry(request);
        if (entry != null) {
            Feed feed = entry.getParentElement();
            entry = (Entry)entry.clone();
            entry.setSource(feed.getAsSource());
            Document<Entry> entry_doc = entry.getDocument();
            return ProviderHelper.returnBase(entry_doc, 200, entry.getEdited()).setEntityTag(ProviderHelper
                .calculateEntityTag(entry));
        } else {
View Full Code Here

    public ResponseContext getEntry(RequestContext request) {
        Entry entry = (Entry)getAbderaEntry(request);
        if (entry != null) {
            Feed feed = entry.getParentElement();
            entry = (Entry)entry.clone();
            entry.setSource(feed.getAsSource());
            Document<Entry> entry_doc = entry.getDocument();
            return ProviderHelper.returnBase(entry_doc, 200, entry.getEdited()).setEntityTag(ProviderHelper
                .calculateEntityTag(entry));
        } else {
View Full Code Here

        Set<String> keys = entries.keySet();
        for (String s : keys) {
            Entry entry = getEntry(s);
            // TODO: why clone this? Abdera seems to mess up the object
            // if we pass the reference to this object
            feed.addEntry((Entry)entry.clone());
        }
        return feed;
    }

    public Entry getEntry(Object entryId) throws Exception {
View Full Code Here

    public ResponseContext getEntry(RequestContext request) {
        Entry entry = (Entry)getAbderaEntry(request);
        if (entry != null) {
            Feed feed = entry.getParentElement();
            entry = (Entry)entry.clone();
            entry.setSource(feed.getAsSource());
            Document<Entry> entry_doc = entry.getDocument();
            return ProviderHelper.returnBase(entry_doc, 200, entry.getEdited()).setEntityTag(ProviderHelper
                .calculateEntityTag(entry));
        } else {
View Full Code Here

  public ResponseContext getEntry(
    RequestContext request) {
      Entry entry = (Entry) getAbderaEntry(request);
      if (entry != null) {
        Feed feed = entry.getParentElement();
        entry = (Entry) entry.clone();
        entry.setSource(feed.getAsSource());
        Document<Entry> entry_doc = entry.getDocument();
        return
          ProviderHelper.returnBase(
            entry_doc,
View Full Code Here

      addPagingLinks(request,feed,page,length);
      if (offset > files.length) return;
      for (int n = offset; n < offset+length && n < files.length; n++) {
        File file = files[n];
        Entry entry = getEntry(file);
        feed.addEntry((Entry)entry.clone());
      }
  }
 
  public ResponseContext getFeed(
    RequestContext request) {
View Full Code Here

  public ResponseContext getEntry(
    RequestContext request) {
      Entry entry = (Entry) getAbderaEntry(request);
      if (entry != null) {
        Feed feed = entry.getParentElement();
        entry = (Entry) entry.clone();
        entry.setSource(feed.getAsSource());
        Document<Entry> entry_doc = entry.getDocument();
        return
          ProviderHelper.returnBase(
            entry_doc,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.