Examples of newContent()


Examples of org.apache.abdera.factory.Factory.newContent()

        childExtension.addSimpleExtension(VALUE, p.getUUID());

        childExtension = extension.addExtension(STATE);
        childExtension.addSimpleExtension(VALUE, p.getState() == null ? "" : p.getState().getName());

        org.apache.abdera.model.Content content = factory.newContent();
        content.setSrc(UriBuilder.fromUri(baseURL).path("binary").build().toString());
        content.setMimeType("application/octet-stream");
        content.setContentType(Type.MEDIA);
        e.setContentElement(content);
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newContent()

   
    String typeStr = getStringOrNull(entry, CONTENT_TYPE);
    Factory factory = Abdera.getInstance().getFactory();
    String textContent = getStringOrNull(entry, CONTENT);
    Type type = Type.valueOf(typeStr);
    Content content = factory.newContent(type);
    switch (type) {
      case TEXT:
        content.setValue(textContent);
        return content;
      case XHTML:
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newContent()

       
       
        StringWriter writer = new StringWriter();
        jc.createMarshaller().marshal(b, writer);
       
        e.setContentElement(factory.newContent());
        e.getContentElement().setContentType(Content.Type.XML);
        e.getContentElement().setValue(writer.toString());
       
        return e;
    }  
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newContent()

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

Examples of org.apache.abdera.factory.Factory.newContent()

       
       
        StringWriter writer = new StringWriter();
        jc.createMarshaller().marshal(b, writer);
       
        e.setContentElement(factory.newContent());
        e.getContentElement().setContentType(Content.Type.XML);
        e.getContentElement().setValue(writer.toString());
       
        return e;
    }  
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newContent()

       
       
        StringWriter writer = new StringWriter();
        jc.createMarshaller().marshal(b, writer);
       
        e.setContentElement(factory.newContent());
        e.getContentElement().setContentType(Content.Type.XML);
        e.getContentElement().setValue(writer.toString());
       
        return e;
    }  
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newContent()

    assertEquals(category.getScheme().toString(), "a");
    assertEquals(category.getTerm(), "b");
    assertEquals(category.getLabel(), "c");
    Collection collection = factory.newCollection();
    assertNotNull(collection);
    Content content = factory.newContent(Content.Type.TEXT);
    assertNotNull(content);
    assertEquals(content.getContentType(), Content.Type.TEXT);
    content = factory.newContent(Content.Type.HTML);
    assertEquals(content.getContentType(), Content.Type.HTML);
    content = factory.newContent(Content.Type.XHTML);
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newContent()

    Collection collection = factory.newCollection();
    assertNotNull(collection);
    Content content = factory.newContent(Content.Type.TEXT);
    assertNotNull(content);
    assertEquals(content.getContentType(), Content.Type.TEXT);
    content = factory.newContent(Content.Type.HTML);
    assertEquals(content.getContentType(), Content.Type.HTML);
    content = factory.newContent(Content.Type.XHTML);
    assertEquals(content.getContentType(), Content.Type.XHTML);
    content = factory.newContent(Content.Type.MEDIA);
    assertEquals(content.getContentType(), Content.Type.MEDIA);
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newContent()

    Content content = factory.newContent(Content.Type.TEXT);
    assertNotNull(content);
    assertEquals(content.getContentType(), Content.Type.TEXT);
    content = factory.newContent(Content.Type.HTML);
    assertEquals(content.getContentType(), Content.Type.HTML);
    content = factory.newContent(Content.Type.XHTML);
    assertEquals(content.getContentType(), Content.Type.XHTML);
    content = factory.newContent(Content.Type.MEDIA);
    assertEquals(content.getContentType(), Content.Type.MEDIA);
    content = factory.newContent(Content.Type.XML);
    assertEquals(content.getContentType(), Content.Type.XML);
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newContent()

    assertEquals(content.getContentType(), Content.Type.TEXT);
    content = factory.newContent(Content.Type.HTML);
    assertEquals(content.getContentType(), Content.Type.HTML);
    content = factory.newContent(Content.Type.XHTML);
    assertEquals(content.getContentType(), Content.Type.XHTML);
    content = factory.newContent(Content.Type.MEDIA);
    assertEquals(content.getContentType(), Content.Type.MEDIA);
    content = factory.newContent(Content.Type.XML);
    assertEquals(content.getContentType(), Content.Type.XML);
    content = factory.newContent(new MimeType("text/foo"));
    assertEquals(content.getContentType(), Content.Type.MEDIA);
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.