Package org.apache.abdera.util.iri

Examples of org.apache.abdera.util.iri.IRI


    return (base == null) ? href : (href != null) ? base.resolve(href) : null;
  }

  public IRI getSource() throws IRISyntaxException {
    String source = getAttributeValue("source");
    return (source != null) ? new IRI(source) : null;
  }
View Full Code Here


    super(factory, MediaConstants.PLAYER);
  }
 
  public IRI getUrl() throws IRISyntaxException {
    String url = getAttributeValue("url");
    return (url != null) ? new IRI(url) : null;
  }
View Full Code Here

    return (url != null) ? new IRI(url) : null;
  }
 
  public void setUrl(String url) throws IRISyntaxException {
    if (url != null) {
      setAttributeValue("url", (new IRI(url)).toString());
    } else {
      removeAttribute(new QName("url"));
    }
  }
View Full Code Here

    super(factory, MediaConstants.COPYRIGHT);
  }
 
  public IRI getUrl() throws IRISyntaxException {
    String url = getAttributeValue("url");
    return (url != null) ? new IRI(url) : null;
  }
View Full Code Here

    return (url != null) ? new IRI(url) : null;
  }
 
  public void setUrl(String url) throws IRISyntaxException {
    if (url != null)
      setAttributeValue("url", (new IRI(url)).toString());
    else
      removeAttribute(new QName("url"));
  }
View Full Code Here

 
  private List<Category> copyCategoriesWithScheme(
    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

    return copyCategoriesWithScheme(getCategories(scheme));
  }

  public IRI getScheme() throws IRISyntaxException {
    String value = getAttributeValue(SCHEME);
    return (value != null) ? new IRI(value) : null;
  }
View Full Code Here

      removeAttribute(FIXED);
  }

  public void setScheme(String scheme) throws IRISyntaxException {
    if (scheme != null)
      setAttributeValue(SCHEME, new IRI(scheme).toString());
    else
      removeAttribute(SCHEME);
  }
View Full Code Here

    return _resolve(getResolvedBaseUri(), getHref());
  }
 
  public void setHref(String href) throws IRISyntaxException {
    if (href != null)
      setAttributeValue(HREF, (new IRI(href)).toString());
    else
      removeAttribute(HREF);
  }
View Full Code Here

  public boolean contains(
    String term,
    String scheme)
      throws IRISyntaxException {
    List<Category> categories = getCategories();
    IRI catscheme = getScheme();
    IRI uri = (scheme != null) ?
      new IRI(scheme) : catscheme;
    for (Category category : categories) {
      String t = category.getTerm();
      IRI s = (category.getScheme() != null) ?
        category.getScheme() : catscheme;
      if (t.equals(term) &&
          ((uri!=null)? uri.equals(s) : s == null))
            return true;
    }
View Full Code Here

TOP

Related Classes of org.apache.abdera.util.iri.IRI

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.