Class Property

  • All Implemented Interfaces:

    public final class Property
    extends Object
    implements Comparable<Property>
    XMP property definition. Each instance of this class defines a single metadata property like "dc:format". In addition to the property name, the value type and category (internal or external) of the property are included in the property definition. The available choice values are also stored for open and closed choice value types.
    Apache Tika 0.7
    • Method Detail

      • getName

        public String getName()
      • isInternal

        public boolean isInternal()
      • isExternal

        public boolean isExternal()
      • isMultiValuePermitted

        public boolean isMultiValuePermitted()
        Is the PropertyType one which accepts multiple values?
      • getPropertyType

        public static Property.PropertyType getPropertyType​(String key)
        Get the type of a property
        key - name of the property
        the type of the property
      • get

        public static Property get​(String key)
        Retrieve the property object that corresponds to the given key
        key - the property key or name
        the Property object
      • getChoices

        public Set<String> getChoices()
        Returns the (immutable) set of choices for the values of this property. Only defined for open and closed choice value types.
        available choices, or null
      • getPrimaryProperty

        public Property getPrimaryProperty()
        Gets the primary property for a composite property
        the primary property
      • getSecondaryExtractProperties

        public Property[] getSecondaryExtractProperties()
        Gets the secondary properties for a composite property
        the secondary properties
      • internalBoolean

        public static Property internalBoolean​(String name)
      • internalClosedChoise

        public static Property internalClosedChoise​(String name,
                                                    String... choices)
      • internalInteger

        public static Property internalInteger​(String name)
      • internalIntegerSequence

        public static Property internalIntegerSequence​(String name)
      • internalRational

        public static Property internalRational​(String name)
      • internalOpenChoise

        public static Property internalOpenChoise​(String name,
                                                  String... choices)
      • internalTextBag

        public static Property internalTextBag​(String name)
      • externalClosedChoise

        public static Property externalClosedChoise​(String name,
                                                    String... choices)
      • externalOpenChoise

        public static Property externalOpenChoise​(String name,
                                                  String... choices)
      • externalInteger

        public static Property externalInteger​(String name)
      • externalBoolean

        public static Property externalBoolean​(String name)
      • externalTextBag

        public static Property externalTextBag​(String name)
      • composite

        public static Property composite​(Property primaryProperty,
                                         Property[] secondaryExtractProperties)
        Constructs a new composite property from the given primary and array of secondary properties.

        Note that name of the composite property is taken from its primary property, and primary and secondary properties must not be composite properties themselves.

        primaryProperty -
        secondaryExtractProperties -
        the composite property
      • hashCode

        public int hashCode()
        hashCode in class Object