org.apache.tika.metadata
Class Property

java.lang.Object
  extended by org.apache.tika.metadata.Property
All Implemented Interfaces:
Comparable<Property>

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.

Since:
Apache Tika 0.7

Nested Class Summary
static class Property.PropertyType
           
static class Property.ValueType
           
 
Method Summary
 int compareTo(Property o)
           
 boolean equals(Object o)
           
static Property externalBoolean(String name)
           
static Property externalClosedChoise(String name, String... choices)
           
static Property externalDate(String name)
           
static Property externalInteger(String name)
           
static Property externalReal(String name)
           
static Property externalText(String name)
           
 Set<String> getChoices()
          Returns the (immutable) set of choices for the values of this property.
 String getName()
           
static SortedSet<Property> getProperties(String prefix)
           
 Property.PropertyType getPropertyType()
           
 Property.ValueType getValueType()
           
 int hashCode()
           
static Property internalBoolean(String name)
           
static Property internalClosedChoise(String name, String... choices)
           
static Property internalDate(String name)
           
static Property internalInteger(String name)
           
static Property internalIntegerSequence(String name)
           
static Property internalOpenChoise(String name, String... choices)
           
static Property internalRational(String name)
           
static Property internalReal(String name)
           
static Property internalText(String name)
           
static Property internalURI(String name)
           
 boolean isExternal()
           
 boolean isInternal()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()

isInternal

public boolean isInternal()

isExternal

public boolean isExternal()

getPropertyType

public Property.PropertyType getPropertyType()

getValueType

public Property.ValueType getValueType()

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.

Returns:
available choices, or null

getProperties

public static SortedSet<Property> getProperties(String prefix)

internalBoolean

public static Property internalBoolean(String name)

internalClosedChoise

public static Property internalClosedChoise(String name,
                                            String... choices)

internalDate

public static Property internalDate(String name)

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)

internalReal

public static Property internalReal(String name)

internalText

public static Property internalText(String name)

internalURI

public static Property internalURI(String name)

externalClosedChoise

public static Property externalClosedChoise(String name,
                                            String... choices)

externalDate

public static Property externalDate(String name)

externalReal

public static Property externalReal(String name)

externalInteger

public static Property externalInteger(String name)

externalBoolean

public static Property externalBoolean(String name)

externalText

public static Property externalText(String name)

compareTo

public int compareTo(Property o)
Specified by:
compareTo in interface Comparable<Property>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.