org.jempbox.xmp

Class XMPSchemaBasic


public class XMPSchemaBasic
extends XMPSchema

Define XMP properties that are common to all schemas.
Version:
$Revision: 1.1 $
Author:
Ben Litchfield (ben@benlitchfield.com)

Field Summary

static String
NAMESPACE
The namespace of this schema.

Fields inherited from class org.jempbox.xmp.XMPSchema

schema

Constructor Summary

XMPSchemaBasic(Element element)
Constructor from existing XML element.
XMPSchemaBasic(XMPMetadata parent)
Construct a new blank PDF schema.

Method Summary

void
addAdvisory(String advisory)
Add an advisory to the list.
void
addIdentifier(String id)
Add a new identifier for this resource.
List
getAdvisories()
Get the complete list of advisories.
String
getBaseURL()
Get the base URL of the resource.
Calendar
getCreateDate()
Get the creation date of the resource.
String
getCreateTool()
Get the tool that created this resource, in the form of "vendor app version", ie "Adobe Acrobat Distiller 5.0"
List
getIdentifiers()
Get the complete list of identifiers.
String
getLabel()
Get the short phrase that describes this resource.
Calendar
getMetadataDate()
Get the metadata change date for this resource.
Calendar
getModifyDate()
Get the date the resource was last modified.
String
getNickname()
Get the short informal name for this resource.
Integer
getRating()
Get a number that indicates the documents status.
Thumbnail
getThumbnail()
Get the default value for the thumbnail.
Thumbnail
getThumbnail(String language)
Get the thumbnail in a specific language.
List
getThumbnailLanguages()
Get a list of all languages that a thumbnail exists for.
void
removeAdvisory(String advisory)
Remove an Advisory xpath expression.
void
removeIdentifier(String id)
Remove an identifier to this resource.
void
setBaseURL(String url)
The base URL of the resource, for relative URLs in the document.
void
setCreateDate(Calendar date)
Set the creation date of the resource.
void
setCreateTool(String creator)
The creator tool for the resource.
void
setLabel(String label)
Set a short phrase that identifies this resource.
void
setMetadataDate(Calendar date)
Set the date that any metadata was updated.
void
setModifyDate(Calendar date)
Set the date that the resource was last modified.
void
setNickname(String nickname)
Set a short informal name for the resource.
void
setRating(Integer rating)
Set the document status.
void
setThumbnail(String language, Thumbnail thumbnail)
Set the thumbnail of this resource in a specific language.
void
setThumbnail(Thumbnail thumbnail)
Set the default value for the thumbnail.

Methods inherited from class org.jempbox.xmp.XMPSchema

addBagValue, addSequenceDateValue, addSequenceValue, addSequenceValue, getAbout, getBagList, getBooleanProperty, getDateProperty, getElement, getEventSequenceList, getIntegerProperty, getLanguageProperty, getLanguagePropertyLanguages, getSequenceDateList, getSequenceList, getTextProperty, getThumbnailProperty, removeBagValue, removeSequenceDateValue, removeSequenceValue, removeSequenceValue, setAbout, setBooleanProperty, setDateProperty, setIntegerProperty, setLanguageProperty, setTextProperty, setThumbnailProperty

Field Details

NAMESPACE

public static final String NAMESPACE
The namespace of this schema.

Constructor Details

XMPSchemaBasic

public XMPSchemaBasic(Element element)
Constructor from existing XML element.
Parameters:
element - The existing element.

XMPSchemaBasic

public XMPSchemaBasic(XMPMetadata parent)
Construct a new blank PDF schema.
Parameters:
parent - The parent metadata schema that this will be part of.

Method Details

addAdvisory

public void addAdvisory(String advisory)
Add an advisory to the list.
Parameters:
advisory - The new advisory xpath expression.

addIdentifier

public void addIdentifier(String id)
Add a new identifier for this resource.
Parameters:
id - A new identifier for this resource.

getAdvisories

public List getAdvisories()
Get the complete list of advisories.
Returns:
The list of advisories.

getBaseURL

public String getBaseURL()
Get the base URL of the resource.
Returns:
The base URL.

getCreateDate

public Calendar getCreateDate()
            throws IOException
Get the creation date of the resource.
Returns:
The creation date of the resource.

getCreateTool

public String getCreateTool()
Get the tool that created this resource, in the form of "vendor app version", ie "Adobe Acrobat Distiller 5.0"
Returns:
The creator tool.

getIdentifiers

public List getIdentifiers()
Get the complete list of identifiers.
Returns:
The list of identifiers.

getLabel

public String getLabel()
Get the short phrase that describes this resource.
Returns:
The label for this resource.

getMetadataDate

public Calendar getMetadataDate()
            throws IOException
Get the metadata change date for this resource.
Returns:
The metadata change date of the resource.

getModifyDate

public Calendar getModifyDate()
            throws IOException
Get the date the resource was last modified.
Returns:
The modify date of the resource.

getNickname

public String getNickname()
Get the short informal name for this resource.
Returns:
The short name for this resource.

getRating

public Integer getRating()
Get a number that indicates the documents status.
Returns:
The rating of the document.

getThumbnail

public Thumbnail getThumbnail()
Get the default value for the thumbnail.
Returns:
The thumbnail of this resource.

getThumbnail

public Thumbnail getThumbnail(String language)
Get the thumbnail in a specific language.
Parameters:
language - The language code to get the description for.
Returns:
The thumbnail in the specified language or null if it does not exist.

getThumbnailLanguages

public List getThumbnailLanguages()
Get a list of all languages that a thumbnail exists for.
Returns:
A non-null list of languages, potentially an empty list.

removeAdvisory

public void removeAdvisory(String advisory)
Remove an Advisory xpath expression.
Parameters:
advisory - An xpath expression specifying properties that were edited outside of the authoring application.

removeIdentifier

public void removeIdentifier(String id)
Remove an identifier to this resource.
Parameters:
id - An identifier to this resource.

setBaseURL

public void setBaseURL(String url)
The base URL of the resource, for relative URLs in the document.
Parameters:
url - The base URL.

setCreateDate

public void setCreateDate(Calendar date)
Set the creation date of the resource.
Parameters:
date - The creation date of the resource.

setCreateTool

public void setCreateTool(String creator)
The creator tool for the resource. In the form of "vendor app version", ie "Adobe Acrobat Distiller 5.0"
Parameters:
creator - The tool that was used to create the resource.

setLabel

public void setLabel(String label)
Set a short phrase that identifies this resource.
Parameters:
label - A short description of this resource.

setMetadataDate

public void setMetadataDate(Calendar date)
Set the date that any metadata was updated.
Parameters:
date - The metadata change date for this resource.

setModifyDate

public void setModifyDate(Calendar date)
Set the date that the resource was last modified.
Parameters:
date - The modify date for this resource.

setNickname

public void setNickname(String nickname)
Set a short informal name for the resource.
Parameters:
nickname - A short name of this resource.

setRating

public void setRating(Integer rating)
Set the document status.
Parameters:
rating - A number indicating status relative to other documents.

setThumbnail

public void setThumbnail(String language,
                         Thumbnail thumbnail)
Set the thumbnail of this resource in a specific language.
Parameters:
language - The language code.
thumbnail - The thumbnail in a specific language.

setThumbnail

public void setThumbnail(Thumbnail thumbnail)
Set the default value for the thumbnail.
Parameters:
thumbnail - The thumbnail of this resource.