be.ac.vub.cocompose.lang.datatypes
Class URI

java.lang.Object
  extended bybe.ac.vub.cocompose.lang.datatypes.URI

public class URI
extends Object

URI manipulation.

Since:
0.2.12
Version:
0.2.12, 20/05/2004
Author:
Dennis Wagelaar
See Also:
URI

Constructor Summary
URI(String str)
          Constructs a URI by parsing the given string.
 
Method Summary
 String getAbsoluteUri(String baseuri)
          Gets the absolute uri, given the base uri.
 String getRelativeUri(String baseuri)
          Gets the uri relative to the base uri.
 boolean isAbsolute()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URI

public URI(String str)
    throws URISyntaxException
Constructs a URI by parsing the given string.

Parameters:
str - the string to be parsed into a URI.
Throws:
NullPointerException - if str is null.
URISyntaxException - if the given string violates RFC 2396, as augmented by the above deviations.
Method Detail

getRelativeUri

public String getRelativeUri(String baseuri)
                      throws URISyntaxException
Gets the uri relative to the base uri.

Parameters:
baseuri - the base uri.
Returns:
the relative uri.
Throws:
URISyntaxException - if no valid URIs are given.

getAbsoluteUri

public String getAbsoluteUri(String baseuri)
                      throws URISyntaxException
Gets the absolute uri, given the base uri.

Parameters:
baseuri - the base uri.
Returns:
the absolute uri.
Throws:
URISyntaxException - if no valid URIs are given.

toString

public String toString()
See Also:
Object.toString()

isAbsolute

public boolean isAbsolute()
See Also:
URI.isAbsolute()