Package org.apache.abdera.model

Examples of org.apache.abdera.model.Content

Per RFC4287:

 The "atom:content" element either contains or links to the content of the entry.  The content of atom:content is Language-Sensitive. atomInlineTextContent = element atom:content { atomCommonAttributes, attribute type { "text" | "html" }?, (text) } atomInlineXHTMLContent = element atom:content { atomCommonAttributes, attribute type { "xhtml" }, xhtmlDiv } atomInlineOtherContent = element atom:content { atomCommonAttributes, attribute type { atomMediaType }?, (text|anyElement) } atomOutOfLineContent = element atom:content { atomCommonAttributes, attribute type { atomMediaType }?, attribute src { atomUri }, empty } atomContent = atomInlineTextContent | atomInlineXHTMLContent | atomInlineOtherContent | atomOutOfLineContent 


            // Convert the item to XML
            String value = mediator.mediate(data, itemClassType, itemXMLType, null).toString();

            Content content = factory.newContent();
            content.setContentType(Content.Type.XML);
            content.setValue(value);

            feedEntry.setContentElement(content);

            feedEntry.addLink(key.toString());
View Full Code Here


    }

    private Entry updateEntry(Entry entry, String value) {
        entry.setTitle("customer " + value);

        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);
        entry.setContentElement(content);

        return entry;
    }
View Full Code Here

    private Entry postEntry(String value) {
        Entry entry = abdera.newEntry();
        entry.setTitle("customer " + value);

        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);
        entry.setContentElement(content);

        return entry;
    }
View Full Code Here

    private Entry postEntry(String value) {
        Entry entry = abdera.newEntry();
        entry.setTitle("customer " + value);

        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);
        entry.setContentElement(content);

        return entry;
    }
View Full Code Here

    public static Entry newEntry(String value) {
        Abdera abdera = new Abdera();
        Entry entry = abdera.newEntry();
        entry.setTitle("customer " + value);

        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);
        entry.setContentElement(content);

        return entry;
    }
View Full Code Here

    public static Entry updateEntry(Entry entry, String value) {
        Abdera abdera = new Abdera();
        entry.setTitle("customer " + value);

        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);
        entry.setContentElement(content);

        return entry;
    }   
View Full Code Here

    private Entry postEntry(String value) {
        Entry entry = abdera.newEntry();
        entry.setTitle("customer " + value);

        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);
        entry.setContentElement(content);

        return entry;
    }
View Full Code Here

    }

    private Entry updateEntry(Entry entry, String value) {
        entry.setTitle("customer " + value);

        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);
        entry.setContentElement(content);

        return entry;
    }
View Full Code Here

      if (entry.getTitle() == null) return false;
      if (entry.getUpdated() == null) return false;
      if (entry.getAuthor() == null &&
          (entry.getSource() != null &&
           entry.getSource().getAuthor() == null)) return false;
      Content content = entry.getContentElement();
      if (content == null) {
        if (entry.getAlternateLink() == null) return false;
      } else {
        if ((content.getSrc() != null ||
            content.getContentType() == Content.Type.MEDIA) &&
            entry.getSummaryElement() == null) {
          log.debug(Localizer.sprintf("CHECKING.VALID.ENTRY",false));
          return false;
        }
      }
View Full Code Here

        JAXBContext jc = jaxbProvider.getJAXBContext(cls, cls);
       
        StringWriter writer = new StringWriter();
        jc.createMarshaller().marshal(o, writer);
       
        Content ct = factory.newContent(Content.Type.XML);
        ct.setValue(writer.toString());
        e.setContentElement(ct);
    }
View Full Code Here

TOP

Related Classes of org.apache.abdera.model.Content

Copyright © 2018 www.massapicom. 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.