Class DublinCoreAdapter
java.lang.Object
org.apache.xmlgraphics.xmp.XMPSchemaAdapter
org.apache.xmlgraphics.xmp.schemas.DublinCoreAdapter
Schema adapter implementation for the Dublin Core schema.
Note: In Adobe's XMP specification dc:subject is defined as "bag Text", but in PDF/A-1 it is defined as "Text". Here it is implemented as "bag Text".
-
Field Summary
Fields inherited from class org.apache.xmlgraphics.xmp.XMPSchemaAdapter
meta
-
Constructor Summary
ConstructorsConstructorDescriptionDublinCoreAdapter
(Metadata meta) Constructs a new adapter for Dublin Core around the given metadata object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContributor
(String value) Adds a new entry to the list of contributors (other than the authors).void
addCreator
(String value) Adds a new entry to the list of creators (authors of the resource).void
Adds a new entry to the list of dates indicating points in time something interesting happened to the resource.void
addLanguage
(String value) Adds a new entry to the list of languages (RFC 3066).void
addPublisher
(String value) Adds a new entry to the list of publishers.void
addRelation
(String value) Adds a new entry to the list of relationships to other documents.void
addSubject
(String value) Adds a new entry to the list of subjects (descriptive phrases or keywords that specify the topic of the content of the resource).void
Adds a new entry to the list of document types (for example: novel, poem or working paper).String[]
Returns an array of all contributors.Returns the extent or scope of the resource.String[]
Returns an array of all creators.getDate()
Returns a latest date indicating point in time something interesting happened to the resource.Date[]
getDates()
Returns a list of dates indicating point in time something interesting happened to the resource.Returns the description of the content of the resource (in the default language).getDescription
(String lang) Returns the description of the content of the resource in a language-dependant way.Returns the file format used when saving this resource.Returns the unique identifier of the resource.String[]
Returns an array of languages.String[]
Returns an array of publishers.String[]
Returns an array of all relationship to other documents.Returns the informal rights statement.Returns the informal rights statement in a language-dependant way.Returns unique identifier of the work from which this resource was derived.String[]
Returns an array of all subjects.getTitle()
Returns the title of the resource (in the default language).Returns the title of the resource in a language-dependant way.String[]
getTypes()
Returns an array of all document types.boolean
removeContributor
(String value) Removes an entry from the list of contributors.boolean
removeCreator
(String value) Removes an entry from the list of creators (authors of the resource).removeTitle
(String lang) Removes a title of the resource.void
setCoverage
(String value) Sets the extent or scope of the resource.void
setDescription
(String lang, String value) Sets the description of the content of the resource.void
Sets the file format used when saving the resource.void
setIdentifier
(String value) Sets the unique identifier of the resource.void
Sets the informal rights statement.void
Sets the unique identifier of the work from which this resource was derived.void
Sets the title of the resource (in the default language).void
Sets the title of the resource.Methods inherited from class org.apache.xmlgraphics.xmp.XMPSchemaAdapter
addDateToSeq, addObjectToArray, addStringToBag, addStringToSeq, findQualifiedStructure, findQualifiedValue, formatISO8601Date, formatISO8601Date, getDateArray, getDateValue, getLangAlt, getObjectArray, getQName, getSchema, getStringArray, getValue, removeLangAlt, removeStringFromArray, setCompact, setDateValue, setLangAlt, setProperty, setValue
-
Constructor Details
-
DublinCoreAdapter
Constructs a new adapter for Dublin Core around the given metadata object.- Parameters:
meta
- the underlying metadata
-
-
Method Details
-
addContributor
Adds a new entry to the list of contributors (other than the authors).- Parameters:
value
- the new value
-
removeContributor
Removes an entry from the list of contributors.- Parameters:
value
- the value to be removed- Returns:
- the removed entry
-
getContributors
Returns an array of all contributors.- Returns:
- a String array of all contributors (or null if not set)
-
setCoverage
Sets the extent or scope of the resource.- Parameters:
value
- the new value.
-
getCoverage
Returns the extent or scope of the resource.- Returns:
- the property value (or null if not set)
-
addCreator
Adds a new entry to the list of creators (authors of the resource).- Parameters:
value
- the new value
-
removeCreator
Removes an entry from the list of creators (authors of the resource).- Parameters:
value
- the value to be removed- Returns:
- the removed entry
-
getCreators
Returns an array of all creators.- Returns:
- a String array of all creators (or null if not set)
-
addDate
Adds a new entry to the list of dates indicating points in time something interesting happened to the resource.- Parameters:
value
- the date value
-
getDates
Returns a list of dates indicating point in time something interesting happened to the resource.- Returns:
- the list of dates or null if no dates are set
-
getDate
Returns a latest date indicating point in time something interesting happened to the resource.- Returns:
- the last date or null
-
setDescription
Sets the description of the content of the resource.- Parameters:
lang
- the language of the value ("x-default" or null for the default language)value
- the new value
-
getDescription
Returns the description of the content of the resource (in the default language).- Returns:
- the description of the content of the resource (or null if not set)
-
getDescription
Returns the description of the content of the resource in a language-dependant way.- Parameters:
lang
- the language ("x-default" or null for the default language)- Returns:
- the language-dependent value (or null if not set)
-
setFormat
Sets the file format used when saving the resource. Tools and applications should set this property to the save format of the data. It may include appropriate qualifiers.- Parameters:
value
- a MIME type
-
getFormat
Returns the file format used when saving this resource.- Returns:
- the MIME type of the file format (or null if not set)
-
setIdentifier
Sets the unique identifier of the resource.- Parameters:
value
- the new value
-
getIdentifier
Returns the unique identifier of the resource.- Returns:
- the unique identifier (or null if not set)
-
addLanguage
Adds a new entry to the list of languages (RFC 3066).- Parameters:
value
- the new value
-
getLanguages
Returns an array of languages.- Returns:
- a String array of all languages (or null if not set)
-
addPublisher
Adds a new entry to the list of publishers.- Parameters:
value
- the new value
-
getPublisher
Returns an array of publishers.- Returns:
- a String array of all publishers (or null if not set)
-
addRelation
Adds a new entry to the list of relationships to other documents.- Parameters:
value
- the new value
-
getRelations
Returns an array of all relationship to other documents.- Returns:
- a String array of all relationships (or null if none are set)
-
setRights
Sets the informal rights statement.- Parameters:
lang
- the language of the value ("x-default" or null for the default language)value
- the new value
-
getRights
Returns the informal rights statement.- Returns:
- the informal right statement (or null if not set)
-
getRights
Returns the informal rights statement in a language-dependant way.- Parameters:
lang
- the language ("x-default" or null for the default language)- Returns:
- the language-dependent value (or null if not set)
-
setSource
Sets the unique identifier of the work from which this resource was derived.- Parameters:
value
- the new value
-
getSource
Returns unique identifier of the work from which this resource was derived.- Returns:
- the source (or null if not set)
-
addSubject
Adds a new entry to the list of subjects (descriptive phrases or keywords that specify the topic of the content of the resource).- Parameters:
value
- the new value
-
getSubjects
Returns an array of all subjects.- Returns:
- a String array of all subjects
-
setTitle
Sets the title of the resource (in the default language).- Parameters:
value
- the new value
-
setTitle
Sets the title of the resource.- Parameters:
lang
- the language of the value ("x-default" or null for the default language)value
- the new value
-
getTitle
Returns the title of the resource (in the default language).- Returns:
- the title of the resource (in the default language)
-
getTitle
Returns the title of the resource in a language-dependant way.- Parameters:
lang
- the language ("x-default" or null for the default language)- Returns:
- the language-dependent value (or null if not set)
-
removeTitle
Removes a title of the resource.- Parameters:
lang
- the language variant to be removed- Returns:
- the previously set value or null if this language variant wasn't set
-
addType
Adds a new entry to the list of document types (for example: novel, poem or working paper).- Parameters:
value
- the new value
-
getTypes
Returns an array of all document types.- Returns:
- a String array of all document types (or null if not set)
-