Package org.apache.abdera.model

Examples of org.apache.abdera.model.Control


    Link link = getEditMediaLink(type, hreflang);
    return (link != null) ? link.getResolvedHref() : null;
  }
 
  public void setDraft(boolean draft) {
    Control control = getControl();
    if (control == null && draft) {
      control = ((FOMFactory)factory).newControl(this);
    }
    if (control != null) control.setDraft(draft);
  }
View Full Code Here


 
  /**
   * Returns true if this entry is a draft
   */
  public boolean isDraft() {
    Control control = getControl();
    return (control != null) ? control.isDraft() : false;
  }
View Full Code Here

    contributor.setUri("c");
    assertNotNull(contributor);
    assertEquals(contributor.getName(),"a");
    assertEquals(contributor.getEmail(), "b");
    assertEquals(contributor.getUri().toString(), "c");
    Control control = factory.newControl();
    assertNotNull(control);
    control = factory.newControl();
    control.setDraft(true);
    assertTrue(control.isDraft());
    Date now = new Date();
    DateTime dateTime = factory.newDateTime(Constants.UPDATED, null);
    dateTime.setValue(AtomDate.valueOf(now));
    assertEquals(dateTime.getDate(), now);
    Calendar cal = Calendar.getInstance();
View Full Code Here

    Link link = getEditMediaLink(type, hreflang);
    return (link != null) ? link.getResolvedHref() : null;
  }
 
  public void setDraft(boolean draft) {
    Control control = getControl();
    if (control == null && draft) {
      control = ((FOMFactory)factory).newControl(this);
    }
    if (control != null) control.setDraft(draft);
  }
View Full Code Here

 
  /**
   * Returns true if this entry is a draft
   */
  public boolean isDraft() {
    Control control = getControl();
    return (control != null) ? control.isDraft() : false;
  }
View Full Code Here

    contributor.setUri("c");
    assertNotNull(contributor);
    assertEquals(contributor.getName(),"a");
    assertEquals(contributor.getEmail(), "b");
    assertEquals(contributor.getUri().toString(), "c");
    Control control = factory.newControl();
    assertNotNull(control);
    control = factory.newControl();
    control.setDraft(true);
    assertTrue(control.isDraft());
    Date now = new Date();
    DateTime dateTime = factory.newDateTime(Constants.UPDATED, null);
    dateTime.setValue(AtomDate.valueOf(now));
    assertEquals(dateTime.getDate(), now);
    Calendar cal = Calendar.getInstance();
View Full Code Here

    public DateTime setEdited(String value) {
        return setUpdated((value != null) ? AtomDate.valueOf(value) : null);
    }

    public Control getControl(boolean create) {
        Control control = getControl();
        if (control == null && create) {
            control = getFactory().newControl();
            setControl(control);
        }
        return control;
View Full Code Here

        }
        return control;
    }

    public Control getControl() {
        Control control = (Control)getFirstChildWithName(CONTROL);
        if (control == null)
            control = (Control)getFirstChildWithName(PRE_RFC_CONTROL);
        return control;
    }
View Full Code Here

        return (link != null) ? link.getResolvedHref() : null;
    }

    public Entry setDraft(boolean draft) {
        complete();
        Control control = getControl();
        if (control == null && draft) {
            control = ((FOMFactory)factory).newControl(this);
        }
        if (control != null)
            control.setDraft(draft);
        return this;
    }
View Full Code Here

    /**
     * Returns true if this entry is a draft
     */
    public boolean isDraft() {
        Control control = getControl();
        return (control != null) ? control.isDraft() : false;
    }
View Full Code Here

TOP

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

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.