xmlgraphics-commons 1.3

org.apache.xmlgraphics.xmp.schemas
Class DublinCoreAdapter

java.lang.Object
  extended by org.apache.xmlgraphics.xmp.XMPSchemaAdapter
      extended by org.apache.xmlgraphics.xmp.schemas.DublinCoreAdapter

public class DublinCoreAdapter
extends XMPSchemaAdapter

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
DublinCoreAdapter(Metadata meta)
          Constructs a new adapter for Dublin Core around the given metadata object.
 
Method Summary
 void addCreator(java.lang.String value)
          Adds a new entry to the list of creators (authors of the resource).
 void addDate(java.util.Date value)
          Adds a new entry to the list of dates indicating points in time something interesting happened to the resource.
 void addLanguage(java.lang.String value)
          Adds a new entry to the list of languages (RFC 3066).
 void addSubject(java.lang.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).
 java.lang.String[] getCreators()
           
 java.lang.String getDescription()
           
 java.lang.String getDescription(java.lang.String lang)
          Returns the description of the content of the resource in a language-dependant way.
 java.lang.String[] getLanguages()
           
 java.lang.String[] getSubjects()
           
 java.lang.String getTitle()
           
 java.lang.String getTitle(java.lang.String lang)
          Returns the title of the resource in a language-dependant way.
 void setDescription(java.lang.String lang, java.lang.String value)
          Sets the description of the content of the resource.
 void setTitle(java.lang.String value)
          Sets the title of the resource (in the default language).
 void setTitle(java.lang.String lang, java.lang.String value)
          Sets the title of the resource.
 
Methods inherited from class org.apache.xmlgraphics.xmp.XMPSchemaAdapter
addDateToSeq, addStringToBag, addStringToSeq, formatISO8601Date, formatISO8601Date, getDateValue, getLangAlt, getObjectArray, getQName, getSchema, getStringArray, getValue, parseISO8601Date, removeLangAlt, setDateValue, setLangAlt, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DublinCoreAdapter

public DublinCoreAdapter(Metadata meta)
Constructs a new adapter for Dublin Core around the given metadata object.

Parameters:
meta - the underlying metadata
Method Detail

addCreator

public void addCreator(java.lang.String value)
Adds a new entry to the list of creators (authors of the resource).

Parameters:
value - the new value

getCreators

public java.lang.String[] getCreators()
Returns:
a String array of all creators

addDate

public void addDate(java.util.Date value)
Adds a new entry to the list of dates indicating points in time something interesting happened to the resource.

Parameters:
value - the date value

addSubject

public void addSubject(java.lang.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).

Parameters:
value - the new value

getSubjects

public java.lang.String[] getSubjects()
Returns:
a String array of all subjects

setTitle

public void setTitle(java.lang.String value)
Sets the title of the resource (in the default language).

Parameters:
value - the new value

setTitle

public void setTitle(java.lang.String lang,
                     java.lang.String value)
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

public java.lang.String getTitle()
Returns:
the title of the resource (in the default language)

getTitle

public java.lang.String getTitle(java.lang.String lang)
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.

setDescription

public void setDescription(java.lang.String lang,
                           java.lang.String value)
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

public java.lang.String getDescription()
Returns:
the description of the content of the resource (in the default language)

getDescription

public java.lang.String getDescription(java.lang.String lang)
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.

addLanguage

public void addLanguage(java.lang.String value)
Adds a new entry to the list of languages (RFC 3066).

Parameters:
value - the new value

getLanguages

public java.lang.String[] getLanguages()
Returns:
a String array of all language

xmlgraphics-commons 1.3

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.