public class Metadata extends java.lang.Object implements CreativeCommons, Geographic, HttpHeaders, Message, MSOffice, ClimateForcast, TIFF, TikaMetadataKeys, TikaMimeKeys, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTRIBUTOR
Deprecated.
use TikaCoreProperties#CONTRIBUTOR
|
static java.lang.String |
COVERAGE
Deprecated.
use TikaCoreProperties#COVERAGE
|
static java.lang.String |
CREATOR
Deprecated.
use TikaCoreProperties#CREATOR
|
static Property |
DATE
Deprecated.
use TikaCoreProperties#CREATED
|
static java.lang.String |
DESCRIPTION
Deprecated.
use TikaCoreProperties#DESCRIPTION
|
static java.lang.String |
FORMAT
Deprecated.
use TikaCoreProperties#FORMAT
|
static java.lang.String |
IDENTIFIER
Deprecated.
use TikaCoreProperties#IDENTIFIER
|
static java.lang.String |
LANGUAGE
Deprecated.
use TikaCoreProperties#LANGUAGE
|
static java.lang.String |
MODIFIED
Deprecated.
use TikaCoreProperties#MODIFIED
|
static java.lang.String |
NAMESPACE_PREFIX_DELIMITER
The common delimiter used between the namespace abbreviation and the property name
|
static java.lang.String |
PUBLISHER
Deprecated.
use TikaCoreProperties#PUBLISHER
|
static java.lang.String |
RELATION
Deprecated.
use TikaCoreProperties#RELATION
|
static java.lang.String |
RIGHTS
Deprecated.
use TikaCoreProperties#RIGHTS
|
static java.lang.String |
SOURCE
Deprecated.
use TikaCoreProperties#SOURCE
|
static java.lang.String |
SUBJECT
Deprecated.
use TikaCoreProperties#KEYWORDS
|
static java.lang.String |
TITLE
Deprecated.
use TikaCoreProperties#TITLE
|
static java.lang.String |
TYPE
Deprecated.
use TikaCoreProperties#TYPE
|
LICENSE_LOCATION, LICENSE_URL, WORK_TYPE
ALTITUDE, LATITUDE, LONGITUDE
CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_TYPE, LAST_MODIFIED, LOCATION
MESSAGE_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_SUBTYPE
APPLICATION_NAME, APPLICATION_VERSION, AUTHOR, CATEGORY, CHARACTER_COUNT, CHARACTER_COUNT_WITH_SPACES, COMMENTS, COMPANY, CONTENT_STATUS, CREATION_DATE, EDIT_TIME, IMAGE_COUNT, KEYWORDS, LAST_AUTHOR, LAST_PRINTED, LAST_SAVED, LINE_COUNT, MANAGER, NOTES, OBJECT_COUNT, PAGE_COUNT, PARAGRAPH_COUNT, PRESENTATION_FORMAT, REVISION_NUMBER, SECURITY, SLIDE_COUNT, TABLE_COUNT, TEMPLATE, TOTAL_TIME, USER_DEFINED_METADATA_NAME_PREFIX, VERSION, WORD_COUNT
ACKNOWLEDGEMENT, COMMAND_LINE, COMMENT, CONTACT, CONVENTIONS, EXPERIMENT_ID, HISTORY, INSTITUTION, MODEL_NAME_ENGLISH, PROGRAM_ID, PROJECT_ID, REALIZATION, REFERENCES, TABLE_ID
BITS_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, SOFTWARE
EMBEDDED_RELATIONSHIP_ID, EMBEDDED_RESOURCE_TYPE, EMBEDDED_STORAGE_CLASS_ID, PROTECTED, RESOURCE_NAME_KEY
MIME_TYPE_MAGIC, TIKA_MIME_FILE
Constructor and Description |
---|
Metadata()
Constructs a new, empty metadata.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Property property,
int value)
Adds the integer value of the identified metadata property.
|
void |
add(Property property,
java.lang.String value)
Add a metadata property/value mapping.
|
void |
add(java.lang.String name,
java.lang.String value)
Add a metadata name/value mapping.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
get(Property property)
Returns the value (if any) of the identified metadata property.
|
java.lang.String |
get(java.lang.String name)
Get the value associated to a metadata name.
|
java.util.Date |
getDate(Property property)
Returns the value of the identified Date based metadata property.
|
java.lang.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.
|
java.lang.String[] |
getValues(Property property)
Get the values associated to a metadata name.
|
java.lang.String[] |
getValues(java.lang.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(java.lang.String name)
Returns true if named value is multivalued.
|
java.lang.String[] |
names()
Returns an array of the names contained in the metadata.
|
void |
remove(java.lang.String name)
Remove a metadata and all its associated values.
|
void |
set(Property property,
java.util.Calendar date)
Sets the date value of the identified metadata property.
|
void |
set(Property property,
java.util.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,
java.lang.String value)
Sets the value of the identified metadata property.
|
void |
set(Property property,
java.lang.String[] values)
Sets the values of the identified metadata property.
|
void |
set(java.lang.String name,
java.lang.String value)
Set metadata name/value.
|
void |
setAll(java.util.Properties properties)
Copy All key-value pairs from properties.
|
int |
size()
Returns the number of metadata names in this metadata.
|
java.lang.String |
toString() |
public static final java.lang.String NAMESPACE_PREFIX_DELIMITER
public static final java.lang.String FORMAT
public static final java.lang.String IDENTIFIER
public static final java.lang.String MODIFIED
public static final java.lang.String CONTRIBUTOR
public static final java.lang.String COVERAGE
public static final java.lang.String CREATOR
public static final Property DATE
public static final java.lang.String DESCRIPTION
public static final java.lang.String LANGUAGE
public static final java.lang.String PUBLISHER
public static final java.lang.String RELATION
public static final java.lang.String RIGHTS
public static final java.lang.String SOURCE
public static final java.lang.String SUBJECT
public static final java.lang.String TITLE
public static final java.lang.String TYPE
public boolean isMultiValued(Property property)
property
- metadata propertypublic boolean isMultiValued(java.lang.String name)
name
- name of metadatapublic java.lang.String[] names()
public java.lang.String get(java.lang.String name)
name
- of the metadata.public java.lang.String get(Property property)
property
- property definitionnull
if the property is not setpublic java.lang.Integer getInt(Property property)
property
- simple integer property definitionnull
if the property is not set, or not a valid Integerpublic java.util.Date getDate(Property property)
property
- simple date property definitionnull
if the property is not set, or not a valid Datepublic java.lang.String[] getValues(Property property)
property
- of the metadata.public java.lang.String[] getValues(java.lang.String name)
name
- of the metadata.public void add(java.lang.String name, java.lang.String value)
name
- the metadata name.value
- the metadata value.public void add(Property property, java.lang.String value)
property
- the metadata property.value
- the metadata value.public void setAll(java.util.Properties properties)
properties
- properties to copy frompublic void set(java.lang.String name, java.lang.String value)
null
, then the
metadata entry is removed.name
- the metadata name.value
- the metadata value, or null
public void set(Property property, java.lang.String value)
property
- property definitionvalue
- property valuepublic void set(Property property, java.lang.String[] values)
property
- property definitionvalues
- property valuespublic void set(Property property, int 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, java.util.Date date)
property
- simple integer property definitiondate
- property valuepublic void set(Property property, java.util.Calendar date)
property
- simple integer property definitiondate
- property valuepublic void remove(java.lang.String name)
name
- metadata name to removepublic int size()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"