public class Metadata extends Object implements CreativeCommons, Geographic, HttpHeaders, Message, ClimateForcast, TIFF, TikaMimeKeys, Serializable
LICENSE_LOCATION, LICENSE_URL, WORK_TYPEALTITUDE, LATITUDE, LONGITUDECONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_TYPE, LOCATIONMESSAGE_BCC, MESSAGE_BCC_DISPLAY_NAME, MESSAGE_BCC_EMAIL, MESSAGE_BCC_NAME, MESSAGE_CC, MESSAGE_CC_DISPLAY_NAME, MESSAGE_CC_EMAIL, MESSAGE_CC_NAME, MESSAGE_FROM, MESSAGE_FROM_EMAIL, MESSAGE_FROM_NAME, MESSAGE_PREFIX, MESSAGE_RAW_HEADER_PREFIX, MESSAGE_RECIPIENT_ADDRESS, MESSAGE_TO, MESSAGE_TO_DISPLAY_NAME, MESSAGE_TO_EMAIL, MESSAGE_TO_NAME, MULTIPART_BOUNDARY, MULTIPART_SUBTYPEACKNOWLEDGEMENT, COMMAND_LINE, COMMENT, CONTACT, CONVENTIONS, EXPERIMENT_ID, HISTORY, INSTITUTION, MODEL_NAME_ENGLISH, PROGRAM_ID, PROJECT_ID, REALIZATION, REFERENCES, SOURCE, TABLE_IDBITS_PER_SAMPLE, EQUIPMENT_MAKE, EQUIPMENT_MODEL, EXIF_PAGE_COUNT, EXPOSURE_TIME, F_NUMBER, FLASH_FIRED, FOCAL_LENGTH, IMAGE_LENGTH, IMAGE_WIDTH, ISO_SPEED_RATINGS, ORIENTATION, ORIGINAL_DATE, RESOLUTION_HORIZONTAL, RESOLUTION_UNIT, RESOLUTION_VERTICAL, SAMPLES_PER_PIXEL, SOFTWAREMIME_TYPE_MAGIC, TIKA_MIME_FILE| Constructor and Description | 
|---|
| Metadata()Constructs a new, empty metadata. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(Property property,
   Calendar date)Adds the date value of the identified metadata property. | 
| void | add(Property property,
   int value)Adds the integer value of the identified metadata property. | 
| void | add(Property property,
   String value)Add a metadata property/value mapping. | 
| void | add(String name,
   String value)Add a metadata name/value mapping. | 
| protected void | add(String name,
   String[] newValues)Add a metadata name/value mapping. | 
| boolean | equals(Object o) | 
| String | get(Property property)Returns the value (if any) of the identified metadata property. | 
| String | get(String name)Get the value associated to a metadata name. | 
| Date | getDate(Property property)Returns the value of the identified Date based metadata property. | 
| Integer | getInt(Property property)Returns the value of the identified Integer based metadata property. | 
| int[] | getIntValues(Property property)Gets the array of ints of the identified "seq" integer metadata property. | 
| String[] | getValues(Property property)Get the values associated to a metadata name. | 
| String[] | getValues(String name)Get the values associated to a metadata name. | 
| int | hashCode() | 
| boolean | isMultiValued(Property property)Returns true if named value is multivalued. | 
| boolean | isMultiValued(String name)Returns true if named value is multivalued. | 
| String[] | names()Returns an array of the names contained in the metadata. | 
| void | remove(String name)Remove a metadata and all its associated values. | 
| void | set(Property property,
   boolean value)Sets the integer value of the identified metadata property. | 
| void | set(Property property,
   Calendar date)Sets the date value of the identified metadata property. | 
| void | set(Property property,
   Date date)Sets the date value of the identified metadata property. | 
| void | set(Property property,
   double value)Sets the real or rational value of the identified metadata property. | 
| void | set(Property property,
   int value)Sets the integer value of the identified metadata property. | 
| void | set(Property property,
   long value)Sets the integer value of the identified metadata property. | 
| void | set(Property property,
   String value)Sets the value of the identified metadata property. | 
| void | set(Property property,
   String[] values)Sets the values of the identified metadata property. | 
| void | set(String name,
   String value)Set metadata name/value. | 
| protected void | set(String name,
   String[] values) | 
| void | setAll(Properties properties)Copy All key-value pairs from properties. | 
| void | setMetadataWriteFilter(MetadataWriteFilter writeFilter)Sets the writeFilter that is called before  set(String, String)set(String, String[]),add(String, String),add(String, String[]). | 
| int | size()Returns the number of metadata names in this metadata. | 
| String | toString() | 
public boolean isMultiValued(Property property)
property - metadata propertypublic boolean isMultiValued(String name)
name - name of metadatapublic String[] names()
public String get(String name)
name - of the metadata.public void setMetadataWriteFilter(MetadataWriteFilter writeFilter)
set(String, String)
 set(String, String[]), add(String, String),
 add(String, String[]).  The default is ACCEPT_ALL.
 This is intended for expert use only.  Some parsers rely on metadata
 during the parse, and if the metadata they need is excluded, they
 will not function properly.writeFilter - public String get(Property property)
property - property definitionnull if the property is not setpublic Integer getInt(Property property)
property - simple integer property definitionnull if the property is not set, or
 not a valid Integerpublic Date getDate(Property property)
property - simple date property definitionnull if the property is not set, or not
 a valid Datepublic String[] getValues(Property property)
property - of the metadata.public String[] getValues(String name)
name - of the metadata.public void add(String name, String value)
name - the metadata name.value - the metadata value.protected void add(String name, String[] newValues)
name - the metadata name.newValues - the metadata valuespublic void add(Property property, String value)
property - the metadata property.value - the metadata value.public void setAll(Properties properties)
properties - properties to copy frompublic void set(String name, String value)
null, then the
 metadata entry is removed.name - the metadata name.value - the metadata value, or nullpublic void set(Property property, String value)
property - property definitionvalue - property valuepublic void set(Property property, String[] values)
property - property definitionvalues - property valuespublic void set(Property property, int value)
property - simple integer property definitionvalue - property valuepublic void set(Property property, long value)
property - simple integer property definitionvalue - property valuepublic void set(Property property, boolean value)
property - simple integer property definitionvalue - property valuepublic void add(Property property, int value)
property - seq integer property definitionvalue - property valuepublic int[] getIntValues(Property property)
property - seq integer property definitionpublic void set(Property property, double value)
property - simple real or simple rational property definitionvalue - property valuepublic void set(Property property, Date date)
property - simple integer property definitiondate - property valuepublic void set(Property property, Calendar date)
property - simple integer property definitiondate - property valuepublic void add(Property property, Calendar date)
property - simple calendar property definitiondate - property valuepublic void remove(String name)
name - metadata name to removepublic int size()
Copyright © 2007–2023 The Apache Software Foundation. All rights reserved.