org.odftoolkit.odfdom.type
Class AnyURI

java.lang.Object
  extended by org.odftoolkit.odfdom.type.AnyURI
All Implemented Interfaces:
OdfDataType

public class AnyURI
extends java.lang.Object
implements OdfDataType

This class represents the in OpenDocument format used data type


Constructor Summary
AnyURI(java.net.URI uri)
          Construct an newly AnyURI object that represents the specified URI value
 
Method Summary
static java.lang.String decodePath(java.lang.String path)
          Decode path component segments in URI.
static java.lang.String encodePath(java.lang.String path)
          Encode path to be used as path component segments in URI.
 java.net.URI getURI()
          get java.net.URI from AnyURI
static boolean isValid(java.net.URI uri)
          check if the specified URI instance is a valid data type
 java.lang.String toString()
          Returns a String Object representing this AnyURI's value
static AnyURI valueOf(java.lang.String stringValue)
          Returns an AnyURI instance representing the specified String value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnyURI

public AnyURI(java.net.URI uri)
       throws java.lang.IllegalArgumentException
Construct an newly AnyURI object that represents the specified URI value

Parameters:
uri - the value to be represented by the AnyURI Object
Throws:
java.lang.IllegalArgumentException - if the given argument is not a valid AnyURI
Method Detail

toString

public java.lang.String toString()
Returns a String Object representing this AnyURI's value

Overrides:
toString in class java.lang.Object
Returns:
return a string representation of the value of this AnyURI object

valueOf

public static AnyURI valueOf(java.lang.String stringValue)
                      throws java.lang.IllegalArgumentException
Returns an AnyURI instance representing the specified String value

Parameters:
stringValue - a String value
Returns:
return an AnyURI instance representing stringValue
Throws:
java.lang.IllegalArgumentException - if the given argument is not a valid AnyURI

getURI

public java.net.URI getURI()
get java.net.URI from AnyURI

Returns:
java.net.URI returned from this AnyURI

isValid

public static boolean isValid(java.net.URI uri)
check if the specified URI instance is a valid data type

Parameters:
uri - the value to be tested
Returns:
true if the value of argument is valid for data type false otherwise

encodePath

public static java.lang.String encodePath(java.lang.String path)
Encode path to be used as path component segments in URI.

Creates a String that can be used as a sequence of one or more path components in an URI from a path that uses a slash character as a path separator and where the segements do not use any URI encoding rules.

The / characters (delimiting the individual path_segments) are left unchanged.

Parameters:
path - A path that is not using URI encoding rules.
Returns:
A path that is using URI encoding rules.
See Also:
decodePath(String)

decodePath

public static java.lang.String decodePath(java.lang.String path)
Decode path component segments in URI.

Creates a path that uses a slash character as a path separator and where the segments do not use any URI encoding from a String that is used as a sequence of one or more path components in an URI where the path segments do use URI encoding rules.

The / characters (delimiting the individual path_segments) are left unchanged.

Parameters:
path - A path that is using URI encoding rules.
Returns:
A path that is not using URI encoding rules.
See Also:
encodePath(String)


Copyright © 2008-2010 ODF Toolkit Project. All Rights Reserved.