org.odftoolkit.odfdom.incubator.meta
Class OdfOfficeMeta

java.lang.Object
  extended by org.odftoolkit.odfdom.incubator.meta.OdfOfficeMeta

public class OdfOfficeMeta
extends java.lang.Object

OdfOfficeMeta represent the meta data feature in the ODF document.

It provides convenient method to get meta data info.


Constructor Summary
OdfOfficeMeta(OdfFileDom metaDom)
          Constructor of OdfOfficeMeta feature.
 
Method Summary
 void addKeyword(java.lang.String keyword)
          Add the keyword to the current document.
 OdfMetaAutoReload getAutoReload()
          Receives the OdfMetaAutoReload feature.
 java.util.Calendar getCreationDate()
          Receives the value of the ODFDOM element representation MetaCreationDateElement , See
 java.lang.String getCreator()
          Receives the value of the ODFDOM element representation DcCreatorElement , See
 java.util.Calendar getDcdate()
          Receives the value of the ODFDOM element representation DcDateElement , See .
 java.lang.String getDescription()
          Receives the value of the ODFDOM element representation DcDescriptionElement , See .
 OdfMetaDocumentStatistic getDocumentStatistic()
          Receives the sub feature of OdfMetaDocumentStatistic.
 java.lang.Integer getEditingCycles()
          Receives the value of the ODFDOM element representation MetaEditingCyclesElement , See .
 Duration getEditingDuration()
          Receives the value of the ODFDOM element representation MetaEditingDurationElement , See .
 java.lang.String getGenerator()
          Receives the value of the ODFDOM element representation MetaGeneratorElement , See .
 OdfMetaHyperlinkBehaviour getHyperlinkBehaviour()
          Receives the OdfMetaHyperlinkBehaviour feature.
 java.lang.String getInitialCreator()
          Receives the value of the ODFDOM element representation MetaInitialCreatorElement , See .
 java.util.List<java.lang.String> getKeywords()
          Receives the list value of the ODFDOM element representation MetaKeywordElement , See .
 java.lang.String getLanguage()
          Receives the value of the ODFDOM element representation DcLanguageElement , See .
 OfficeMetaElement getOfficeMetaElement()
          Get the instance of OfficeMetaElement which represents this feature.
 java.util.Calendar getPrintDate()
          Receives the value of the ODFDOM element representation MetaPrintDateElement , See .
 java.lang.String getPrintedBy()
          Receives the value of the ODFDOM element representation MetaPrintedByElement , See
 java.lang.String getSubject()
          Receives the value of the ODFDOM element representation DcSubjectElement , See .
 OdfMetaTemplate getTemplate()
          Receives the OdfMetaTemplate feature.
 java.lang.String getTitle()
          Receives the value of the ODFDOM element representation DcTitleElement , See .
 java.util.List<java.lang.String> getUserDefinedDataNames()
          Receives the list value of the ODFDOM element representation MetaUserDefinedElement , See .
 java.lang.String getUserDefinedDataType(java.lang.String name)
          Receives the data type of the ODFDOM element representation MetaUserDefinedElement by attribute name, See .
 java.lang.String getUserDefinedDataValue(java.lang.String name)
          Receives the value of the ODFDOM element representation MetaUserDefinedElement by attribute name, See .
 MetaUserDefinedElement getUserDefinedElementByAttributeName(java.lang.String name)
          Receives the ODFDOM element representation MetaUserDefinedElement by attribute name, See .
 void removeUserDefinedDataByName(java.lang.String name)
          Remove the ODFDOM element representation MetaUserDefinedElement by attribute name, See .
 void setCreationDate(java.util.Calendar creationDate)
          Sets the value of the ODFDOM element representation MetaCreationDateElement , See .
 void setCreator(java.lang.String creator)
          Sets the value of the ODFDOM element representation DcCreatorElement , See .
 void setDcdate(java.util.Calendar dcdate)
          Sets the value of the ODFDOM element representation DcDateElement , See .
 void setDescription(java.lang.String description)
          Sets the value of the ODFDOM element representation DcDescriptionElement , See .
 void setEditingCycles(java.lang.Integer editingCycles)
          Sets the value of the ODFDOM element representation MetaEditingCyclesElement , See .
 void setEditingDuration(Duration editingDuration)
          Sets the value of the ODFDOM element representation MetaEditingDurationElement , See .
 void setGenerator(java.lang.String generator)
          Sets the value of the ODFDOM element representation MetaGeneratorElement , See .
 void setInitialCreator(java.lang.String initialCreator)
          Sets the value of the ODFDOM element representation MetaInitialCreatorElement , See .
 void setKeywords(java.util.List<java.lang.String> keyList)
          Sets the list value of the ODFDOM element representation MetaKeywordElement , See .
 void setLanguage(java.lang.String language)
          Sets the value of the ODFDOM element representation DcLanguageElement , See .
 void setPrintDate(java.util.Calendar printDate)
          Sets the value of the ODFDOM element representation MetaPrintDateElement , See .
 void setPrintedBy(java.lang.String printedBy)
          Sets the value of the ODFDOM element representation MetaPrintedByElement , See .
 void setSubject(java.lang.String subject)
          Sets the value of the ODFDOM element representation DcSubjectElement , See .
 void setTitle(java.lang.String title)
          Sets the value of the ODFDOM element representation DcTitleElement , See .
 void setUserDefinedData(java.lang.String name, java.lang.String type, java.lang.String value)
          Sets the ODFDOM element representation MetaUserDefinedElement , See if the element with the attribute name exists,then update;or create a new element if type or value is null,the original will not be updated.
 void setUserDefinedDataType(java.lang.String name, java.lang.String value)
          Sets the data type of the ODFDOM element representation MetaUserDefinedElement by attribute name, See .
 void setUserDefinedDataValue(java.lang.String name, java.lang.String value)
          Sets the value of the ODFDOM element representation MetaUserDefinedElement by attribute name, See .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OdfOfficeMeta

public OdfOfficeMeta(OdfFileDom metaDom)
Constructor of OdfOfficeMeta feature.

Parameters:
metaDom - the file DOM element of meta.xml
Method Detail

getOfficeMetaElement

public OfficeMetaElement getOfficeMetaElement()
Get the instance of OfficeMetaElement which represents this feature.

Returns:
the instance of OfficeMetaElement

getGenerator

public java.lang.String getGenerator()
Receives the value of the ODFDOM element representation MetaGeneratorElement , See .

Returns:
the generator info of the current document;

null, if the element is not set.


setGenerator

public void setGenerator(java.lang.String generator)
Sets the value of the ODFDOM element representation MetaGeneratorElement , See .

Parameters:
generator - set the specified document generator

getTitle

public java.lang.String getTitle()
Receives the value of the ODFDOM element representation DcTitleElement , See .

Returns:
the title of the current document;

null, if the element is not set.


setTitle

public void setTitle(java.lang.String title)
Sets the value of the ODFDOM element representation DcTitleElement , See .

Parameters:
title - set the specified document title

getDescription

public java.lang.String getDescription()
Receives the value of the ODFDOM element representation DcDescriptionElement , See .

Returns:
the description of the current document;

null, if the element is not set.


setDescription

public void setDescription(java.lang.String description)
Sets the value of the ODFDOM element representation DcDescriptionElement , See .

Parameters:
description - set the specified document description

getSubject

public java.lang.String getSubject()
Receives the value of the ODFDOM element representation DcSubjectElement , See .

Returns:
the subject of the current document;

null, if the element is not set.


setSubject

public void setSubject(java.lang.String subject)
Sets the value of the ODFDOM element representation DcSubjectElement , See .

Parameters:
subject - set the specified document subject

getKeywords

public java.util.List<java.lang.String> getKeywords()
Receives the list value of the ODFDOM element representation MetaKeywordElement , See .

Returns:
the keywords of the current document;

null, if the element is not set.


setKeywords

public void setKeywords(java.util.List<java.lang.String> keyList)
Sets the list value of the ODFDOM element representation MetaKeywordElement , See .

Parameters:
keyList - set the specified list of keywords

addKeyword

public void addKeyword(java.lang.String keyword)
Add the keyword to the current document. Create child element .

Parameters:
keyword - the value of child element .

getUserDefinedDataNames

public java.util.List<java.lang.String> getUserDefinedDataNames()
Receives the list value of the ODFDOM element representation MetaUserDefinedElement , See .

Returns:
get the list of user-defined metadata names;

null, if the element is not set.


getUserDefinedElementByAttributeName

public MetaUserDefinedElement getUserDefinedElementByAttributeName(java.lang.String name)
Receives the ODFDOM element representation MetaUserDefinedElement by attribute name, See .

Parameters:
name - the name of the user-defined metadata
Returns:
the MetaUserDefinedElement which is identified by the specified name;

null, if the element is not set.


getUserDefinedDataValue

public java.lang.String getUserDefinedDataValue(java.lang.String name)
Receives the value of the ODFDOM element representation MetaUserDefinedElement by attribute name, See .

Parameters:
name - the name of the user-defined metadata
Returns:
the value of the user-defined metadata with the specified name;

null, if the element is not set.


getUserDefinedDataType

public java.lang.String getUserDefinedDataType(java.lang.String name)
Receives the data type of the ODFDOM element representation MetaUserDefinedElement by attribute name, See .

Parameters:
name - the name of the user-defined metadata
Returns:
the data type of the user-defined metadata with the specified name;

null, if the element is not set.


removeUserDefinedDataByName

public void removeUserDefinedDataByName(java.lang.String name)
Remove the ODFDOM element representation MetaUserDefinedElement by attribute name, See .

Parameters:
name - the name of the user-defined metadata

setUserDefinedDataValue

public void setUserDefinedDataValue(java.lang.String name,
                                    java.lang.String value)
Sets the value of the ODFDOM element representation MetaUserDefinedElement by attribute name, See .

Parameters:
name - the name need to set for the user-defined metadata
value - the value need to set for the user-defined metadata

setUserDefinedDataType

public void setUserDefinedDataType(java.lang.String name,
                                   java.lang.String value)
Sets the data type of the ODFDOM element representation MetaUserDefinedElement by attribute name, See .

Parameters:
name - the name need to set for the user-defined metadata
value - the value need to set for the user-defined metadata

setUserDefinedData

public void setUserDefinedData(java.lang.String name,
                               java.lang.String type,
                               java.lang.String value)
Sets the ODFDOM element representation MetaUserDefinedElement , See if the element with the attribute name exists,then update;or create a new element if type or value is null,the original will not be updated.

Parameters:
name - the name need to set for the user-defined metadata
type - the data type need to set for the user-defined metadata
value - the value need to set for the user-defined metadata

getInitialCreator

public java.lang.String getInitialCreator()
Receives the value of the ODFDOM element representation MetaInitialCreatorElement , See .

Returns:
get the initial creator of the current document;

null, if the element is not set.


setInitialCreator

public void setInitialCreator(java.lang.String initialCreator)
Sets the value of the ODFDOM element representation MetaInitialCreatorElement , See .

Parameters:
initialCreator - set the specified initial creator

getCreator

public java.lang.String getCreator()
Receives the value of the ODFDOM element representation DcCreatorElement , See

Returns:
the creator of the current document;

null, if the element is not set.


setCreator

public void setCreator(java.lang.String creator)
Sets the value of the ODFDOM element representation DcCreatorElement , See .

Parameters:
creator - set the specified creator

getPrintedBy

public java.lang.String getPrintedBy()
Receives the value of the ODFDOM element representation MetaPrintedByElement , See

Returns:
the name of the last person who printed the current document;

null, if element is not set


setPrintedBy

public void setPrintedBy(java.lang.String printedBy)
Sets the value of the ODFDOM element representation MetaPrintedByElement , See .

Parameters:
printedBy - the name need to set for the last person who printed the current document

getCreationDate

public java.util.Calendar getCreationDate()
Receives the value of the ODFDOM element representation MetaCreationDateElement , See

Returns:
the date and time when the document was created initially;

null, if element is not set


setCreationDate

public void setCreationDate(java.util.Calendar creationDate)
Sets the value of the ODFDOM element representation MetaCreationDateElement , See .

Parameters:
creationDate - the date and time need to set

getDcdate

public java.util.Calendar getDcdate()
Receives the value of the ODFDOM element representation DcDateElement , See .

Returns:
the date and time when the document was last modified;

null, if the element is not set.


setDcdate

public void setDcdate(java.util.Calendar dcdate)
Sets the value of the ODFDOM element representation DcDateElement , See .

Parameters:
dcdate - the date and time need to set

getPrintDate

public java.util.Calendar getPrintDate()
Receives the value of the ODFDOM element representation MetaPrintDateElement , See .

Returns:
the date and time when the document was last printed;

null, if the element is not set.


setPrintDate

public void setPrintDate(java.util.Calendar printDate)
Sets the value of the ODFDOM element representation MetaPrintDateElement , See .

Parameters:
printDate - the date and time need to set

getLanguage

public java.lang.String getLanguage()
Receives the value of the ODFDOM element representation DcLanguageElement , See .

Returns:
the default language of the document;

null, if the element is not set.


setLanguage

public void setLanguage(java.lang.String language)
Sets the value of the ODFDOM element representation DcLanguageElement , See .

Parameters:
language - the default language need to set fo the current document

getEditingCycles

public java.lang.Integer getEditingCycles()
Receives the value of the ODFDOM element representation MetaEditingCyclesElement , See .

Returns:
the number of times that the document has been edited;

null, if the element is not set.


setEditingCycles

public void setEditingCycles(java.lang.Integer editingCycles)
Sets the value of the ODFDOM element representation MetaEditingCyclesElement , See .

Parameters:
editingCycles - set the specified edit times

getEditingDuration

public Duration getEditingDuration()
Receives the value of the ODFDOM element representation MetaEditingDurationElement , See .

Returns:
the total time spent editing the document;

null, if the element is not set.


setEditingDuration

public void setEditingDuration(Duration editingDuration)
Sets the value of the ODFDOM element representation MetaEditingDurationElement , See .

Parameters:
editingDuration - the time need to set

getDocumentStatistic

public OdfMetaDocumentStatistic getDocumentStatistic()
Receives the sub feature of OdfMetaDocumentStatistic.

Returns:
the statistics about the document which can be represented by OdfMetaDocumentStatistic feature;

null, if the feature is not exist.


getHyperlinkBehaviour

public OdfMetaHyperlinkBehaviour getHyperlinkBehaviour()
Receives the OdfMetaHyperlinkBehaviour feature.

Returns:
the default behavior of hyperlinks in the current document which can be represented by OdfMetaHyperlinkBehaviour feature;

null, if the feature is not exist.


getAutoReload

public OdfMetaAutoReload getAutoReload()
Receives the OdfMetaAutoReload feature.

Returns:
the information whether the document is reloaded or replaced by another document after a certain period of time has elapsed.

It can be represented by OdfMetaAutoReload feature;

null, if the feature is not exist.


getTemplate

public OdfMetaTemplate getTemplate()
Receives the OdfMetaTemplate feature.

Returns:
the information specified the URL for the document that was used to create a document.

It can be represented by OdfMetaTemplate feature;

null, if the feature is not exist.



Copyright © 2008-2010 ODF Toolkit Project. All Rights Reserved.