org.apache.jempbox.xmp

Class XMPSchemaDublinCore

public class XMPSchemaDublinCore extends XMPSchema

Define XMP properties used with the Dublin Core specification.

Version: $Revision: 1.3 $

Author: Ben Litchfield

Field Summary
static StringNAMESPACE
The namespace for this schema.
Constructor Summary
XMPSchemaDublinCore(XMPMetadata parent)
Construct a new blank Dublin Core schema.
XMPSchemaDublinCore(Element element, String prefix)
Constructor from existing XML element.
Method Summary
voidaddContributor(String contributor)
Add a contributor to the list of contributors.
voidaddCreator(String creator)
Add a creator.
voidaddDate(Calendar date)
Add a date of interest to this schema.
voidaddLanguage(String language)
Add a language to the list of languages.
voidaddPublisher(String publisher)
Add a publisher to the list of publishers.
voidaddRelation(String relation)
Add a relation to the list of relationships.
voidaddSubject(String subject)
Add a subject to the list of subjects.
voidaddType(String type)
Add a type to the bag of types of this resource.
ListgetContributors()
Get the complete list of contributors.
StringgetCoverage()
Get the coverage property.
ListgetCreators()
Get a complete list of creators.
ListgetDates()
Get a list of all dates of interest to this resource.
StringgetDescription()
Get the default value for the description.
StringgetDescription(String language)
Get the description in a specific language.
ListgetDescriptionLanguages()
Get a list of all languages that a description exists for.
StringgetFormat()
Get the format property.
StringgetIdentifier()
Get the resource id.
ListgetLanguages()
Get the complete list of languages.
ListgetPublishers()
Get the complete list of publishers.
ListgetRelationships()
Get the complete list of relationships.
StringgetRights()
Get the default value for the rights of this document.
StringgetRights(String language)
Get the rights in a specific language.
ListgetRightsLanguages()
Get a list of all languages that a rights description exists for.
StringgetSource()
Get the resource source id.
ListgetSubjects()
Get the complete list of subjects.
StringgetTitle()
Get the default value for the title.
StringgetTitle(String language)
Get the title in a specific language.
ListgetTitleLanguages()
Get a list of all languages that a title exists for.
ListgetTypes()
Get the list of types for this resource.
voidremoveContributor(String contributor)
Remove a contributor from the list of contributors.
voidremoveCreator(String creator)
Remove a creator from the list of creators.
voidremoveDate(Calendar date)
Remove a date from the list of 'interesting' dates.
voidremoveLanguage(String language)
Remove a language from the list of languages.
voidremovePublisher(String publisher)
Remove a publisher from the list of publishers.
voidremoveRelation(String relation)
Remove a relation from the list of relationships.
voidremoveSubject(String subject)
Remove a subject from the list of subjects.
voidsetCoverage(String coverage)
Set the coverage property.
voidsetDescription(String description)
Set the default value for the description.
voidsetDescription(String language, String description)
Set the description of this resource in a specific language.
voidsetFormat(String format)
Set the format property.
voidsetIdentifier(String id)
Set the resource identifier.
voidsetRights(String rights)
Set the default value for the rights of this document.
voidsetRights(String language, String rights)
Set the rights for this resource in a specific language.
voidsetSource(String id)
Set the resource source identifier.
voidsetTitle(String title)
Set the default value for the title.
voidsetTitle(String language, String title)
Set the title of this resource in a specific language.

Field Detail

NAMESPACE

public static final String NAMESPACE
The namespace for this schema.

Constructor Detail

XMPSchemaDublinCore

public XMPSchemaDublinCore(XMPMetadata parent)
Construct a new blank Dublin Core schema.

Parameters: parent The parent metadata schema that this will be part of.

XMPSchemaDublinCore

public XMPSchemaDublinCore(Element element, String prefix)
Constructor from existing XML element.

Parameters: element The existing element. prefix The schema prefix.

Method Detail

addContributor

public void addContributor(String contributor)
Add a contributor to the list of contributors. A contributor is someone other than an author.

Parameters: contributor The name of the contributor.

addCreator

public void addCreator(String creator)
Add a creator.

Parameters: creator The author of the resource.

addDate

public void addDate(Calendar date)
Add a date of interest to this schema.

Parameters: date The date to add to the schema.

addLanguage

public void addLanguage(String language)
Add a language to the list of languages.

Parameters: language The name of the language.

addPublisher

public void addPublisher(String publisher)
Add a publisher to the list of publishers.

Parameters: publisher The name of the publisher.

addRelation

public void addRelation(String relation)
Add a relation to the list of relationships. A relationship to another resource.

Parameters: relation The relation to the other resource.

addSubject

public void addSubject(String subject)
Add a subject to the list of subjects.

Parameters: subject The subject of this resource.

addType

public void addType(String type)
Add a type to the bag of types of this resource.

Parameters: type The type of resource to add (poem, novel).

getContributors

public List getContributors()
Get the complete list of contributors.

Returns: The list of contributors.

getCoverage

public String getCoverage()
Get the coverage property.

Returns: The extent or scope of the resource.

getCreators

public List getCreators()
Get a complete list of creators.

Returns: A list of java.lang.String objects.

getDates

public List getDates()
Get a list of all dates of interest to this resource.

Returns: A list of java.util.Calendar objects.

Throws: IOException If there is an error creating the date object.

getDescription

public String getDescription()
Get the default value for the description.

Returns: The description of this resource.

getDescription

public String getDescription(String language)
Get the description in a specific language.

Parameters: language The language code to get the description for.

Returns: The description in the specified language or null if it does not exist.

getDescriptionLanguages

public List getDescriptionLanguages()
Get a list of all languages that a description exists for.

Returns: A non-null list of languages, potentially an empty list.

getFormat

public String getFormat()
Get the format property.

Returns: The mime-type of the resource.

getIdentifier

public String getIdentifier()
Get the resource id.

Returns: A key that identifies this resource.

getLanguages

public List getLanguages()
Get the complete list of languages.

Returns: The list of languages.

getPublishers

public List getPublishers()
Get the complete list of publishers.

Returns: The list of publishers.

getRelationships

public List getRelationships()
Get the complete list of relationships.

Returns: The list of relationships.

getRights

public String getRights()
Get the default value for the rights of this document.

Returns: The informal rights for this resource.

getRights

public String getRights(String language)
Get the rights in a specific language.

Parameters: language The language code to get the description for.

Returns: The rights in the specified language or null if it does not exist.

getRightsLanguages

public List getRightsLanguages()
Get a list of all languages that a rights description exists for.

Returns: A non-null list of languages, potentially an empty list.

getSource

public String getSource()
Get the resource source id.

Returns: A key that identifies this source of this resource.

getSubjects

public List getSubjects()
Get the complete list of subjects.

Returns: The list of subjects.

getTitle

public String getTitle()
Get the default value for the title.

Returns: The title of this resource.

getTitle

public String getTitle(String language)
Get the title in a specific language.

Parameters: language The language code to get the description for.

Returns: The title in the specified language or null if it does not exist.

getTitleLanguages

public List getTitleLanguages()
Get a list of all languages that a title exists for.

Returns: A non-null list of languages, potentially an empty list.

getTypes

public List getTypes()
Get the list of types for this resource.

Returns: A list of types for this resource.

removeContributor

public void removeContributor(String contributor)
Remove a contributor from the list of contributors.

Parameters: contributor The contributor to remove.

removeCreator

public void removeCreator(String creator)
Remove a creator from the list of creators.

Parameters: creator The author of the resource.

removeDate

public void removeDate(Calendar date)
Remove a date from the list of 'interesting' dates.

Parameters: date The date to remove.

removeLanguage

public void removeLanguage(String language)
Remove a language from the list of languages.

Parameters: language The language to remove.

removePublisher

public void removePublisher(String publisher)
Remove a publisher from the list of publishers.

Parameters: publisher The publisher to remove.

removeRelation

public void removeRelation(String relation)
Remove a relation from the list of relationships. A relationship to another resource.

Parameters: relation The publisher to remove.

removeSubject

public void removeSubject(String subject)
Remove a subject from the list of subjects.

Parameters: subject The subject to remove.

setCoverage

public void setCoverage(String coverage)
Set the coverage property.

Parameters: coverage The extend or scope of the resource.

setDescription

public void setDescription(String description)
Set the default value for the description.

Parameters: description The description of this resource.

setDescription

public void setDescription(String language, String description)
Set the description of this resource in a specific language.

Parameters: language The language code. description The description in a specific language.

setFormat

public void setFormat(String format)
Set the format property.

Parameters: format The mime-type of the saved resource.

setIdentifier

public void setIdentifier(String id)
Set the resource identifier.

Parameters: id An id to the resource.

setRights

public void setRights(String rights)
Set the default value for the rights of this document. This property specifies informal rights of the document.

Parameters: rights The rights for this resource.

setRights

public void setRights(String language, String rights)
Set the rights for this resource in a specific language.

Parameters: language The language code. rights The rights in a specific language.

setSource

public void setSource(String id)
Set the resource source identifier.

Parameters: id An id to the resource source.

setTitle

public void setTitle(String title)
Set the default value for the title.

Parameters: title The title of this resource.

setTitle

public void setTitle(String language, String title)
Set the title of this resource in a specific language.

Parameters: language The language code. title The title in a specific language.