Package org.apache.abdera.model

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


  public static void testMedia() throws Exception {
   
    Abdera abdera = new Abdera();
    Factory factory = abdera.getFactory();
    Entry entry = factory.newEntry();
    MediaGroup group = entry.addExtension(GROUP);
    MediaContent content = group.addExtension(CONTENT);
    content.setUrl("http://example.org");
    content.setBitrate(123);
    content.setChannels(2);
    content.setDuration(123);
View Full Code Here


        if (request.getAttribute("group") instanceof MediaGroup) {
            MediaGroup group = (MediaGroup) request.getAttribute("group");
            content = group.addExtension(MediaConstants.CONTENT);
        } else {
            Entry entry = getEntry();
            content = entry.addExtension(MediaConstants.CONTENT);
        }
        if (url != null) {
            content.setUrl(url.replaceAll(" ", "%20"));
        }
        if (fileSize != 0) {
View Full Code Here

    public int doStartTag() throws JspException {
        Entry entry = getEntry();
        // create the group element

        getAbdera().getConfiguration().getExtensionFactories();
        Object group = entry.addExtension(MediaConstants.GROUP);
        final ServletRequest request = pageContext.getRequest();
        request.setAttribute("group", group);

        return EVAL_BODY_INCLUDE;
    }
View Full Code Here

    entry.addAuthor("James");
    entry.setTitle("New Calendar Event");
    entry.setContentAsXhtml("<p>A new calendar event</p>");
   
    // Add the Google Specific extensions
    ((Element)entry.addExtension(
      new QName(
        "http://schemas.google.com/g/2005",
        "transparency"))).setAttributeValue(
          "value",
          "http://schemas.google.com/g/2005#event.opaque");
View Full Code Here

      new QName(
        "http://schemas.google.com/g/2005",
        "transparency"))).setAttributeValue(
          "value",
          "http://schemas.google.com/g/2005#event.opaque");
    ((Element)entry.addExtension(
        new QName(
          "http://schemas.google.com/g/2005",
          "eventStatus"))).setAttributeValue(
            "value",
            "http://schemas.google.com/g/2005#event.confirmed");
View Full Code Here

        new QName(
          "http://schemas.google.com/g/2005",
          "eventStatus"))).setAttributeValue(
            "value",
            "http://schemas.google.com/g/2005#event.confirmed");
    ((Element)entry.addExtension(
        new QName(
          "http://schemas.google.com/g/2005",
          "where"))).setAttributeValue(
            "valueString",
            "Rolling Lawn Courts");
View Full Code Here

        new QName(
          "http://schemas.google.com/g/2005",
          "where"))).setAttributeValue(
            "valueString",
            "Rolling Lawn Courts");
    Element el = entry.addExtension(
        new QName(
          "http://schemas.google.com/g/2005",
          "when"));
    el.setAttributeValue("startTime", AtomDate.valueOf(new Date()).toString());
    el.setAttributeValue("endTime", AtomDate.valueOf(new Date()).toString());
View Full Code Here

    entry.addAuthor("James");
    entry.setTitle("New Calendar Event");
    entry.setContentAsXhtml("<p>A new calendar event</p>");
   
    // Add the Google Specific extensions
    ((Element)entry.addExtension(
      new QName(
        "http://schemas.google.com/g/2005",
        "transparency"))).setAttributeValue(
          "value",
          "http://schemas.google.com/g/2005#event.opaque");
View Full Code Here

      new QName(
        "http://schemas.google.com/g/2005",
        "transparency"))).setAttributeValue(
          "value",
          "http://schemas.google.com/g/2005#event.opaque");
    ((Element)entry.addExtension(
        new QName(
          "http://schemas.google.com/g/2005",
          "eventStatus"))).setAttributeValue(
            "value",
            "http://schemas.google.com/g/2005#event.confirmed");
View Full Code Here

        new QName(
          "http://schemas.google.com/g/2005",
          "eventStatus"))).setAttributeValue(
            "value",
            "http://schemas.google.com/g/2005#event.confirmed");
    ((Element)entry.addExtension(
        new QName(
          "http://schemas.google.com/g/2005",
          "where"))).setAttributeValue(
            "valueString",
            "Rolling Lawn Courts");
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.