Class AnyURI

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

public class AnyURI extends Object implements OdfDataType
This class represents the in OpenDocument format used data type anyURI
  • Constructor Details

    • AnyURI

      public AnyURI(URI uri) throws IllegalArgumentException
      Construct an newly AnyURI object that represents the specified URI value
      Parameters:
      uri - the value to be represented by the AnyURI Object
      Throws:
      IllegalArgumentException - if the given argument is not a valid AnyURI
  • Method Details

    • toString

      public String toString()
      Returns a String Object representing this AnyURI's value
      Overrides:
      toString in class Object
      Returns:
      return a string representation of the value of this AnyURI object
    • valueOf

      public static AnyURI valueOf(String stringValue) throws IllegalArgumentException
      Returns an AnyURI instance representing the specified String value
      Parameters:
      stringValue - a String value
      Returns:
      return an AnyURI instance representing stringValue
      Throws:
      IllegalArgumentException - if the given argument is not a valid AnyURI
    • getURI

      public URI getURI()
      get java.net.URI from AnyURI
      Returns:
      java.net.URI returned from this AnyURI
    • isValid

      public static boolean isValid(URI uri)
      check if the specified URI instance is a valid anyURI data type
      Parameters:
      uri - the value to be tested
      Returns:
      true if the value of argument is valid for anyURI data type false otherwise
    • encodePath

      public static String encodePath(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

      public static String decodePath(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: