Class PathValue

  • All Implemented Interfaces:
    Serializable, Value

    @Deprecated(forRemoval=true)
    public class PathValue
    extends Object
    Deprecated, for removal: This API element is subject to removal in a future version.
    RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.

    The PathValue class implements the committed value state for Path values as a part of the State design pattern (Gof) used by this package.

    Since:
    0.16.4.1
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PathValue​(String value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an instance for the given path value.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean equals​(Object object)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Compares values as defined in the JCR specification.
      Binary getBinary()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the binary representation of this value.
      boolean getBoolean()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Always throws a ValueFormatException.
      Calendar getDate()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Always throws a ValueFormatException.
      BigDecimal getDecimal()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Always throws a ValueFormatException.
      double getDouble()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Always throws a ValueFormatException.
      long getLong()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Always throws a ValueFormatException.
      InputStream getStream()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the stream representation of this value.
      String getString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the string representation of the path value.
      int getType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns PropertyType.PATH.
      protected ValueFormatException getValueFormatException​(String destType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a ValueFormatException with a message indicating what kind of type conversion is not supported.
      int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a hash code that's in line with how the Object.equals(Object) method is implemented.
      String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a string representation of this value.
    • Constructor Detail

      • PathValue

        protected PathValue​(String value)
                     throws ValueFormatException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates an instance for the given path value.
        Throws:
        ValueFormatException
    • Method Detail

      • getType

        public int getType()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns PropertyType.PATH.
      • getStream

        public final InputStream getStream()
                                    throws RepositoryException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the stream representation of this value. This method implements the deprecated JCR 1.0 behaviour of always returning the same stream instance. The stream is retrieved from a Binary instance returned by Value.getBinary().
        Specified by:
        getStream in interface Value
        Returns:
        stream representation of this value
        Throws:
        RepositoryException - if the stream can not be created
      • getBinary

        public Binary getBinary()
                         throws RepositoryException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the binary representation of this value. The default implementation uses the UTF-8 serialization of the string returned by Value.getString(). Subclasses
        Specified by:
        getBinary in interface Value
        Throws:
        RepositoryException
      • getBoolean

        public boolean getBoolean()
                           throws ValueFormatException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Always throws a ValueFormatException. Implementations should overwrite if conversion to boolean is supported.
        Specified by:
        getBoolean in interface Value
        Returns:
        nothing
        Throws:
        ValueFormatException - If the value cannot be converted to a boolean.
      • getDate

        public Calendar getDate()
                         throws ValueFormatException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Always throws a ValueFormatException. Implementations should overwrite if conversion to Calender is supported.
        Specified by:
        getDate in interface Value
        Returns:
        nothing
        Throws:
        ValueFormatException - If the value cannot be converted to a Calendar instance.
      • getDouble

        public double getDouble()
                         throws ValueFormatException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Always throws a ValueFormatException. Implementations should overwrite if conversion to double is supported.
        Specified by:
        getDouble in interface Value
        Returns:
        nothing
        Throws:
        ValueFormatException - If the value cannot be converted to a double.
      • getLong

        public long getLong()
                     throws ValueFormatException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Always throws a ValueFormatException. Implementations should overwrite if conversion to long is supported.
        Specified by:
        getLong in interface Value
        Returns:
        nothing
        Throws:
        ValueFormatException - If the value cannot be converted to a long.
      • getValueFormatException

        protected ValueFormatException getValueFormatException​(String destType)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns a ValueFormatException with a message indicating what kind of type conversion is not supported.
        Parameters:
        destType - The name of the value type to which this value cannot be converted.
        Returns:
        nothing
      • equals

        public boolean equals​(Object object)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Compares values as defined in the JCR specification.
        Overrides:
        equals in class Object
        Parameters:
        object - value for comparison
        Returns:
        true if the values are equal, false otherwise
        See Also:
        JCRRMI-16
      • hashCode

        public int hashCode()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns a hash code that's in line with how the Object.equals(Object) method is implemented.
        Overrides:
        hashCode in class Object
        Returns:
        hash code of this value
      • toString

        public String toString()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns a string representation of this value.
        Overrides:
        toString in class Object
        Returns:
        value string