Package org.apache.abdera.model

Examples of org.apache.abdera.model.Category


    author.setUri("c");
    assertNotNull(author);
    assertEquals(author.getName(),"a");
    assertEquals(author.getEmail(), "b");
    assertEquals(author.getUri().toString(), "c");
    Category category = factory.newCategory();
    assertNotNull(category);
    category = factory.newCategory();
    category.setScheme("a");
    category.setTerm("b");
    category.setLabel("c");
    assertNotNull(category);
    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);
View Full Code Here


    private String term;

    @Override
    public int doEndTag() throws JspException {
        Category category = getAbdera().getFactory().newCategory();
        category.setLabel(label);
        category.setScheme(scheme);
        category.setTerm(term);

        if (hasEntry()) {
            getEntry().addCategory(category);
        } else {
            getFeed().addCategory(category);
View Full Code Here

    addChild((OMElement)category);
  }

  public Category addCategory(String term) {
    FOMFactory factory = (FOMFactory) this.factory;
    Category category = factory.newCategory(this);
    category.setTerm(term);
    return category;
  }
View Full Code Here

    return category;
  }

  public Category addCategory(String scheme, String term, String label) throws IRISyntaxException {
    FOMFactory factory = (FOMFactory) this.factory;
    Category category = factory.newCategory(this);
    category.setTerm(term);
    category.setScheme(scheme);
    category.setLabel(label);
    return category;   
  }
View Full Code Here

    author.setUri("c");
    assertNotNull(author);
    assertEquals(author.getName(),"a");
    assertEquals(author.getEmail(), "b");
    assertEquals(author.getUri().toString(), "c");
    Category category = factory.newCategory();
    assertNotNull(category);
    category = factory.newCategory();
    category.setScheme("a");
    category.setTerm("b");
    category.setLabel("c");
    assertNotNull(category);
    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);
View Full Code Here

    addChild((OMElement)category);
  }

  public Category addCategory(String term) {
    FOMFactory factory = (FOMFactory) this.factory;
    Category category = factory.newCategory(this);
    category.setTerm(term);
    return category;
  }
View Full Code Here

    String scheme,
    String term,
    String label)
      throws IRISyntaxException {
    FOMFactory factory = (FOMFactory) this.factory;
    Category category = factory.newCategory(this);
    category.setTerm(term);
    category.setScheme(scheme);
    category.setLabel(label);
    return category;   

  }
View Full Code Here

    List<Category> cats)
      throws IRISyntaxException {
    List<Category> newcats = new ArrayList<Category>();
    IRI scheme = getScheme();
    for (Category cat : cats) {
      Category newcat = (Category) cat.clone();
      if (newcat.getScheme() == null && scheme != null)
        newcat.setScheme(scheme.toString());
      newcats.add(newcat);
    }
    return newcats;
  }
View Full Code Here

    addChild((OMElement)category);
  }

  public Category addCategory(String term) {
    FOMFactory factory = (FOMFactory) this.factory;
    Category category = factory.newCategory(this);
    category.setTerm(term);
    return category;
  }
View Full Code Here

    return category;
  }

  public Category addCategory(String scheme, String term, String label) throws IRISyntaxException {
    FOMFactory factory = (FOMFactory) this.factory;
    Category category = factory.newCategory(this);
    category.setTerm(term);
    category.setScheme(scheme);
    category.setLabel(label);
    return category;   
  }
View Full Code Here

TOP

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

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.