Package org.apache.tika.metadata
Class Property
java.lang.Object
org.apache.tika.metadata.Property
- All Implemented Interfaces:
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.- Since:
- Apache Tika 0.7
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Method Summary
Modifier and TypeMethodDescriptionint
static Property
Constructs a new composite property from the given primary and array of secondary properties.boolean
static Property
externalBoolean
(String name) static Property
externalBooleanSeq
(String name) static Property
externalClosedChoise
(String name, String... choices) static Property
externalDate
(String name) static Property
externalInteger
(String name) static Property
externalOpenChoise
(String name, String... choices) static Property
externalReal
(String name) static Property
externalRealSeq
(String name) static Property
externalText
(String name) static Property
externalTextBag
(String name) static Property
Retrieve the property object that corresponds to the given keyReturns the (immutable) set of choices for the values of this property.getName()
Gets the primary property for a composite propertygetProperties
(String prefix) static Property.PropertyType
getPropertyType
(String key) Get the type of a propertyProperty[]
Gets the secondary properties for a composite propertyint
hashCode()
static Property
internalBoolean
(String name) static Property
internalClosedChoise
(String name, String... choices) static Property
internalDate
(String name) static Property
internalDateBag
(String name) static Property
internalInteger
(String name) static Property
static Property
internalOpenChoise
(String name, String... choices) static Property
internalRational
(String name) static Property
internalReal
(String name) static Property
internalText
(String name) static Property
internalTextBag
(String name) static Property
internalURI
(String name) boolean
boolean
boolean
Is the PropertyType one which accepts multiple values?
-
Method Details
-
getPropertyType
Get the type of a property- Parameters:
key
- name of the property- Returns:
- the type of the property
-
get
Retrieve the property object that corresponds to the given key- Parameters:
key
- the property key or name- Returns:
- the Property object
-
getProperties
-
internalBoolean
-
internalClosedChoise
-
internalDate
-
internalDateBag
-
internalInteger
-
internalIntegerSequence
-
internalRational
-
internalOpenChoise
-
internalReal
-
internalText
-
internalTextBag
-
internalURI
-
externalClosedChoise
-
externalOpenChoise
-
externalDate
-
externalReal
-
externalRealSeq
-
externalInteger
-
externalBoolean
-
externalBooleanSeq
-
externalText
-
externalTextBag
-
composite
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.
- Parameters:
primaryProperty
-secondaryExtractProperties
-- Returns:
- the composite property
-
getName
-
isInternal
public boolean isInternal() -
isExternal
public boolean isExternal() -
isMultiValuePermitted
public boolean isMultiValuePermitted()Is the PropertyType one which accepts multiple values? -
getPropertyType
-
getValueType
-
getChoices
Returns the (immutable) set of choices for the values of this property. Only defined foropen
andclosed choice
value types.- Returns:
- available choices, or
null
-
getPrimaryProperty
Gets the primary property for a composite property- Returns:
- the primary property
-
getSecondaryExtractProperties
Gets the secondary properties for a composite property- Returns:
- the secondary properties
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Property>
-
equals
-
hashCode
public int hashCode()
-