com.groupdocs.metadata.core

Interfaces

Classes

Enums

Exceptions

com.groupdocs.metadata.core

Class PropertyValue

  • Direct Known Subclasses:
    XmpValueBase


    public class PropertyValue
    extends Object

    Represents a property value.

    • Constructor Summary

      Constructors 
      Constructor and Description
      PropertyValue(boolean value)
      Initializes a new instance of the PropertyValue class with a boolean value.
      PropertyValue(byte[] values)
      Initializes a new instance of the PropertyValue class with a byte array.
      PropertyValue(Date value)
      Initializes a new instance of the PropertyValue class with a DateTime value.
      PropertyValue(double value)
      Initializes a new instance of the PropertyValue class with a double value.
      PropertyValue(double[] values)
      Initializes a new instance of the PropertyValue class with an array of double values.
      PropertyValue(int value)
      Initializes a new instance of the PropertyValue class with an integer value.
      PropertyValue(int[] values)
      Initializes a new instance of the PropertyValue class with an array of integer values.
      PropertyValue(long value)
      Initializes a new instance of the PropertyValue class with a long value.
      PropertyValue(long[] values)
      Initializes a new instance of the PropertyValue class with an array of long values.
      PropertyValue(String value)
      Initializes a new instance of the PropertyValue class with a string value.
      PropertyValue(String[] values)
      Initializes a new instance of the PropertyValue class with a string array.
    • Constructor Detail

      • PropertyValue

        public PropertyValue(int value)

        Initializes a new instance of the PropertyValue class with an integer value.

        Parameters:
        value - An int value.
      • PropertyValue

        public PropertyValue(long value)

        Initializes a new instance of the PropertyValue class with a long value.

        Parameters:
        value - A long value.
      • PropertyValue

        public PropertyValue(boolean value)

        Initializes a new instance of the PropertyValue class with a boolean value.

        Parameters:
        value - A bool value.
      • PropertyValue

        public PropertyValue(double value)

        Initializes a new instance of the PropertyValue class with a double value.

        Parameters:
        value - A double value.
      • PropertyValue

        public PropertyValue(String value)

        Initializes a new instance of the PropertyValue class with a string value.

        Parameters:
        value - A string value.
      • PropertyValue

        public PropertyValue(Date value)

        Initializes a new instance of the PropertyValue class with a DateTime value.

        Parameters:
        value - A DateTime value.
      • PropertyValue

        public PropertyValue(String[] values)

        Initializes a new instance of the PropertyValue class with a string array.

        Parameters:
        values - A string array.
      • PropertyValue

        public PropertyValue(byte[] values)

        Initializes a new instance of the PropertyValue class with a byte array.

        Parameters:
        values - A byte array.
      • PropertyValue

        public PropertyValue(double[] values)

        Initializes a new instance of the PropertyValue class with an array of double values.

        Parameters:
        values - An array of double values.
      • PropertyValue

        public PropertyValue(int[] values)

        Initializes a new instance of the PropertyValue class with an array of integer values.

        Parameters:
        values - An array of integer values.
      • PropertyValue

        public PropertyValue(long[] values)

        Initializes a new instance of the PropertyValue class with an array of long values.

        Parameters:
        values - An array of long values.
    • Method Detail

      • getType

        public final MetadataPropertyType getType()

        Gets the MetadataPropertyType.

        Returns:
        The type of the property.
      • getRawValue

        public final Object getRawValue()

        Gets the raw value.

        Returns:
        The raw value.
      • toArray

        public final <TElement> TElement[] toArray(Class<TElement> elementType)

        Converts the property value to an array of the specified type.

        Returns:
        The value represented as an array of the specified type or null if there is no such conversion.

        TElement: The type of an element.

      • toClass

        public final <T> T toClass(Class<T> type)

        Converts the property value to a reference type.

        Returns:
        The converted value or null if there is no such conversion.

        T: The exact type to convert to.

      • toString

        public String toString()

        Returns a string that represents the property value.

        Overrides:
        toString in class Object
        Returns:
        A string that represents the property value.
      • acceptValue

        public void acceptValue(ValueAcceptor valueAcceptor)

        Extracts the property value using a custom ValueAcceptor.

        Parameters:
        valueAcceptor - An acceptor that extracts the value.