Package org.apache.abdera.model

Examples of org.apache.abdera.model.Categories


  }

  public Categories addCategories(
    String href)
      throws IRISyntaxException {
    Categories cats = ((FOMFactory)factory).newCategories();
    cats.setHref(href);
    addCategories(cats);
    return cats;
  }
View Full Code Here


  public Categories addCategories(
    List<Category> categories,
    boolean fixed,
    String scheme)
      throws IRISyntaxException {
      Categories cats = ((FOMFactory)factory).newCategories();
      cats.setFixed(fixed);
      if (scheme != null) cats.setScheme(scheme);
      if (categories != null) {
        for (Category category : categories) {
          cats.addCategory(category);
        }
      }
      addCategories(cats);
      return cats;
  }
View Full Code Here

  }

  public void addCategory(Category category) {
    Element el = category.getParentElement();
    if (el != null && el instanceof Categories) {
      Categories cats = category.getParentElement();
      category = (Category) category.clone();
      try {
        if (category.getScheme() == null && cats.getScheme() != null)
          category.setScheme(cats.getScheme().toString());
      } catch (Exception e) {
        // Do nothing, shouldn't happen
      }
    }
    addChild((OMElement)category);
View Full Code Here

  }
 
  public void addCategory(Category category) {
    Element el = category.getParentElement();
    if (el != null && el instanceof Categories) {
      Categories cats = category.getParentElement();
      category = (Category) category.clone();
      try {
        if (category.getScheme() == null && cats.getScheme() != null)
          category.setScheme(cats.getScheme().toString());
      } catch (Exception e) {
        // Do nothing, shouldn't happen
      }
    }
    addChild((OMElement)category);
View Full Code Here

  }

  public void addCategory(Category category) {
    Element el = category.getParentElement();
    if (el != null && el instanceof Categories) {
      Categories cats = category.getParentElement();
      category = (Category) category.clone();
      try {
        if (category.getScheme() == null && cats.getScheme() != null)
          category.setScheme(cats.getScheme().toString());
      } catch (Exception e) {
        // Do nothing, shouldn't happen
      }
    }
    addChild((OMElement)category);
View Full Code Here

  }

  public Categories addCategories(
    String href)
      throws IRISyntaxException {
    Categories cats = ((FOMFactory)factory).newCategories();
    cats.setHref(href);
    addCategories(cats);
    return cats;
  }
View Full Code Here

  public Categories addCategories(
    List<Category> categories,
    boolean fixed,
    String scheme)
      throws IRISyntaxException {
      Categories cats = ((FOMFactory)factory).newCategories();
      cats.setFixed(fixed);
      if (scheme != null) cats.setScheme(scheme);
      if (categories != null) {
        for (Category category : categories) {
          cats.addCategory(category);
        }
      }
      addCategories(cats);
      return cats;
  }
View Full Code Here

  }
 
  public void addCategory(Category category) {
    Element el = category.getParentElement();
    if (el != null && el instanceof Categories) {
      Categories cats = category.getParentElement();
      category = (Category) category.clone();
      try {
        if (category.getScheme() == null && cats.getScheme() != null)
          category.setScheme(cats.getScheme().toString());
      } catch (Exception e) {
        // Do nothing, shouldn't happen
      }
    }
    addChild((OMElement)category);
View Full Code Here

    } else if (!scheme.equals(other.scheme)) return false;
    return true;
  }
 
  public Categories asCategoriesElement(RequestContext request) {
    Categories cats = request.getAbdera().getFactory().newCategories();
    if (href != null) cats.setHref(href);
    else {
      cats.setFixed(fixed);
      cats.setScheme(scheme);
      for (CategoryInfo cat : this)
        cats.addCategory(
          cat.asCategoryElement(request));
    }
    return cats;
  }
View Full Code Here

    public <T extends Source> T addCategory(Category category) {
        complete();
        Element el = category.getParentElement();
        if (el != null && el instanceof Categories) {
            Categories cats = category.getParentElement();
            category = (Category)category.clone();
            try {
                if (category.getScheme() == null && cats.getScheme() != null)
                    category.setScheme(cats.getScheme().toString());
            } catch (Exception e) {
                // Do nothing, shouldn't happen
            }
        }
        addChild((OMElement)category);
View Full Code Here

TOP

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

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.