Package org.apache.abdera.util.iri

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


  public void setLanguage(String language) {
    setAttributeValue(LANG,language);
  }

  public IRI getBaseUri() throws IRISyntaxException {
    IRI uri = _getUriValue(getAttributeValue(BASE));
    if (URIHelper.isJavascriptUri(uri) ||
        URIHelper.isMailtoUri(uri)) { uri = null; }
    if (uri == null) {
      if (parent instanceof Element) {
        uri = ((Element)parent).getBaseUri();
View Full Code Here


    }
    return uri;
  }

  public IRI getResolvedBaseUri() throws IRISyntaxException {
    IRI baseUri = null;
    IRI uri = _getUriValue(getAttributeValue(BASE));
    if (URIHelper.isJavascriptUri(uri) ||
        URIHelper.isMailtoUri(uri)) { uri = null; }
    if (parent instanceof Element)
      baseUri = ((Element)parent).getResolvedBaseUri();
    else if (parent instanceof Document)
View Full Code Here

  public void setBaseUri(IRI base) {
    setAttributeValue(BASE,_getStringValue(base));
  }
 
  public void setBaseUri(String base) throws IRISyntaxException {
    setBaseUri((base != null) ? new IRI(base) : null);
  }
View Full Code Here

      e.discard();
    }
  }
 
  protected IRI _getUriValue(String v) throws IRISyntaxException {
    return (v != null) ? new IRI(v) : null;
  }
View Full Code Here

        "#".equals(value.toString()) ||
        ".".equals(value.toString()) ||
        "./".equals(value.toString())) return base;
    if (base == null) return value;
    if ("".equals(base.getPath())) base = base.resolve("/");
    IRI resolved = (base != null) ? base.resolve(value) : value;
    return resolved;
  }
View Full Code Here

    irt.setRef(ref);
    return irt;
  }

  public static InReplyTo addInReplyTo(Entry entry, String ref) throws IRISyntaxException {
    return addInReplyTo(entry, new IRI(ref));
  }
View Full Code Here

    super(factory, ThreadConstants.IN_REPLY_TO);
  }

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

    return (type != null) ? new MimeType(type) : null;
  }

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

    String ref = getAttributeValue("ref");
    return (ref != null) ? new IRI(ref) : null;
  }

  public IRI getResolvedHref() throws IRISyntaxException {
    IRI href = getHref();
    IRI base = getBaseUri();
    return (base == null) ? href : (href != null) ? base.resolve(href) : null;
  }
View Full Code Here

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

  public IRI getResolvedSource() throws IRISyntaxException {
    IRI href = getSource();
    IRI base = getBaseUri();
    return (base == null) ? href : (href != null) ? base.resolve(href) : null;
  }
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.