org.odftoolkit.simple.meta
Class Meta

java.lang.Object
  extended by org.odftoolkit.simple.meta.Meta

public class Meta
extends Object

Meta represent the meta data feature in the ODF document.

It provides convenient method to get meta data info.


Constructor Summary
Meta(OdfFileDom metaDom)
          Constructor of Meta feature.
 
Method Summary
 void addKeyword(String keyword)
          Add the keyword to the current document.
 Calendar getCreationDate()
          Receives the value of the odf dom element representation MetaCreationDateElement
 String getCreator()
          Receives the value of the odf dom element representation DcCreatorElement.
 Calendar getDcdate()
          Receives the value of the odf dom element representation DcDateElement.
 String getDescription()
          Receives the value of the odf dom element representation DcDescriptionElement.
 DocumentStatistic getDocumentStatistic()
          Receives the sub feature of DocumentStatistic.
 Integer getEditingCycles()
          Receives the value of the odf dom element representation MetaEditingCyclesElement .
 Duration getEditingDuration()
          Receives the value of the odf dom element representation MetaEditingDurationElement.
 String getGenerator()
          Receives the value of the odf dom element representation MetaGeneratorElement.
 String getInitialCreator()
          Receives the value of the odf dom element representation MetaInitialCreatorElement.
 List<String> getKeywords()
          Receives the list value of the odf dom element representation MetaKeywordElement.
 String getLanguage()
          Receives the value of the odf dom element representation DcLanguageElement.
 OfficeMetaElement getOfficeMetaElement()
          Get the instance of OfficeMetaElement which represents this feature.
 Calendar getPrintDate()
          Receives the value of the odf dom element representation MetaPrintDateElement.
 String getPrintedBy()
          Receives the value of the odf dom element representation MetaPrintedByElement
 String getSubject()
          Receives the value of the odf dom element representation DcSubjectElement.
 String getTitle()
          Receives the value of the odf dom element representation DcTitleElement.
 List<String> getUserDefinedDataNames()
          Receives the list value of the odf dom element representation MetaUserDefinedElement.
 String getUserDefinedDataType(String name)
          Receives the data type of the odf dom element representation MetaUserDefinedElement by attribute name.
 String getUserDefinedDataValue(String name)
          Receives the value of the odf dom element representation MetaUserDefinedElement by attribute name.
 MetaUserDefinedElement getUserDefinedElementByAttributeName(String name)
          Receives the odf dom element representation MetaUserDefinedElement by attribute name.
 void removeUserDefinedDataByName(String name)
          Remove the odf dom element representation MetaUserDefinedElement by attribute name.
 void setCreationDate(Calendar creationDate)
          Sets the value of the odf dom element representation MetaCreationDateElement .
 void setCreator(String creator)
          Sets the value of the odf dom element representation DcCreatorElement.
 void setDcdate(Calendar dcdate)
          Sets the value of the odf dom element representation DcDateElement.
 void setDescription(String description)
          Sets the value of the odf dom element representation DcDescriptionElement.
 void setEditingCycles(Integer editingCycles)
          Sets the value of the odf dom element representation MetaEditingCyclesElement .
 void setEditingDuration(Duration editingDuration)
          Sets the value of the odf dom element representation MetaEditingDurationElement.
 void setGenerator(String generator)
          Sets the value of the odf dom element representation MetaGeneratorElement.
 void setInitialCreator(String initialCreator)
          Sets the value of the odf dom element representation MetaInitialCreatorElement.
 void setKeywords(List<String> keyList)
          Sets the list value of the odf dom element representation MetaKeywordElement.
 void setLanguage(String language)
          Sets the value of the odf dom element representation DcLanguageElement.
 void setPrintDate(Calendar printDate)
          Sets the value of the odf dom element representation MetaPrintDateElement.
 void setPrintedBy(String printedBy)
          Sets the value of the odf dom element representation MetaPrintedByElement.
 void setSubject(String subject)
          Sets the value of the odf dom element representation DcSubjectElement.
 void setTitle(String title)
          Sets the value of the odf dom element representation DcTitleElement.
 void setUserDefinedData(String name, String type, String value)
          Sets the odf dom element representation MetaUserDefinedElement, 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(String name, String value)
          Sets the data type of the odf dom element representation MetaUserDefinedElement by attribute name.
 void setUserDefinedDataValue(String name, String value)
          Sets the value of the odf dom element representation MetaUserDefinedElement by attribute name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Meta

public Meta(OdfFileDom metaDom)
Constructor of Meta 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 String getGenerator()
Receives the value of the odf dom element representation MetaGeneratorElement.

Returns:
the generator info of the current document.

null, if the element is not set.

See Also:
MetaGeneratorElement

setGenerator

public void setGenerator(String generator)
Sets the value of the odf dom element representation MetaGeneratorElement.

Parameters:
generator - set the specified document generator.
See Also:
MetaGeneratorElement

getTitle

public String getTitle()
Receives the value of the odf dom element representation DcTitleElement.

Returns:
the title of the current document.

null, if the element is not set.

See Also:
DcTitleElement

setTitle

public void setTitle(String title)
Sets the value of the odf dom element representation DcTitleElement.

Parameters:
title - set the specified document title
See Also:
DcTitleElement

getDescription

public String getDescription()
Receives the value of the odf dom element representation DcDescriptionElement.

Returns:
the description of the current document;

null, if the element is not set.

See Also:
DcDescriptionElement

setDescription

public void setDescription(String description)
Sets the value of the odf dom element representation DcDescriptionElement.

Parameters:
description - set the specified document description
See Also:
DcDescriptionElement

getSubject

public String getSubject()
Receives the value of the odf dom element representation DcSubjectElement.

Returns:
the subject of the current document.

null, if the element is not set.

See Also:
DcSubjectElement

setSubject

public void setSubject(String subject)
Sets the value of the odf dom element representation DcSubjectElement.

Parameters:
subject - set the specified document subject.
See Also:
DcSubjectElement

getKeywords

public List<String> getKeywords()
Receives the list value of the odf dom element representation MetaKeywordElement.

Returns:
the keywords of the current document.

null, if the element is not set.

See Also:
MetaKeywordElement

setKeywords

public void setKeywords(List<String> keyList)
Sets the list value of the odf dom element representation MetaKeywordElement.

Parameters:
keyList - set the specified list of keywords.
See Also:
MetaKeywordElement

addKeyword

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

Parameters:
keyword - the value of child element MetaKeywordElement.
See Also:
MetaKeywordElement

getUserDefinedDataNames

public List<String> getUserDefinedDataNames()
Receives the list value of the odf dom element representation MetaUserDefinedElement.

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

null, if the element is not set.

See Also:
MetaUserDefinedElement

getUserDefinedElementByAttributeName

public MetaUserDefinedElement getUserDefinedElementByAttributeName(String name)
Receives the odf dom element representation MetaUserDefinedElement by attribute name.

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.

See Also:
MetaUserDefinedElement

getUserDefinedDataValue

public String getUserDefinedDataValue(String name)
Receives the value of the odf dom element representation MetaUserDefinedElement by attribute name.

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.

See Also:
MetaUserDefinedElement

getUserDefinedDataType

public String getUserDefinedDataType(String name)
Receives the data type of the odf dom element representation MetaUserDefinedElement by attribute name.

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.

See Also:
MetaUserDefinedElement

removeUserDefinedDataByName

public void removeUserDefinedDataByName(String name)
Remove the odf dom element representation MetaUserDefinedElement by attribute name.

Parameters:
name - the name of the user-defined metadata
See Also:
MetaUserDefinedElement

setUserDefinedDataValue

public void setUserDefinedDataValue(String name,
                                    String value)
Sets the value of the odf dom element representation MetaUserDefinedElement by attribute name.

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

setUserDefinedDataType

public void setUserDefinedDataType(String name,
                                   String value)
Sets the data type of the odf dom element representation MetaUserDefinedElement by attribute name.

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

setUserDefinedData

public void setUserDefinedData(String name,
                               String type,
                               String value)
Sets the odf dom element representation MetaUserDefinedElement, 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
See Also:
MetaUserDefinedElement

getInitialCreator

public String getInitialCreator()
Receives the value of the odf dom element representation MetaInitialCreatorElement.

Returns:
get the initial creator of the current document;

null, if the element is not set.

See Also:
MetaInitialCreatorElement

setInitialCreator

public void setInitialCreator(String initialCreator)
Sets the value of the odf dom element representation MetaInitialCreatorElement.

Parameters:
initialCreator - set the specified initial creator
See Also:
MetaInitialCreatorElement

getCreator

public String getCreator()
Receives the value of the odf dom element representation DcCreatorElement.

Returns:
the creator of the current document;

null, if the element is not set.

See Also:
DcCreatorElement

setCreator

public void setCreator(String creator)
Sets the value of the odf dom element representation DcCreatorElement.

Parameters:
creator - set the specified creator
See Also:
DcCreatorElement

getPrintedBy

public String getPrintedBy()
Receives the value of the odf dom element representation MetaPrintedByElement

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

null, if element is not set

See Also:
MetaPrintedByElement

setPrintedBy

public void setPrintedBy(String printedBy)
Sets the value of the odf dom element representation MetaPrintedByElement.

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

getCreationDate

public Calendar getCreationDate()
Receives the value of the odf dom element representation MetaCreationDateElement

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

null, if element is not set

See Also:
MetaCreationDateElement

setCreationDate

public void setCreationDate(Calendar creationDate)
Sets the value of the odf dom element representation MetaCreationDateElement .

Parameters:
creationDate - the date and time need to set
See Also:
MetaCreationDateElement

getDcdate

public Calendar getDcdate()
Receives the value of the odf dom element representation DcDateElement.

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

null, if the element is not set.

See Also:
DcDateElement

setDcdate

public void setDcdate(Calendar dcdate)
Sets the value of the odf dom element representation DcDateElement.

Parameters:
dcdate - the date and time need to set
See Also:
DcDateElement

getPrintDate

public Calendar getPrintDate()
Receives the value of the odf dom element representation MetaPrintDateElement.

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

null, if the element is not set.

See Also:
MetaPrintDateElement

setPrintDate

public void setPrintDate(Calendar printDate)
Sets the value of the odf dom element representation MetaPrintDateElement.

Parameters:
printDate - the date and time need to set
See Also:
MetaPrintDateElement

getLanguage

public String getLanguage()
Receives the value of the odf dom element representation DcLanguageElement.

Returns:
the default language of the document;

null, if the element is not set.

See Also:
DcLanguageElement

setLanguage

public void setLanguage(String language)
Sets the value of the odf dom element representation DcLanguageElement.

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

getEditingCycles

public Integer getEditingCycles()
Receives the value of the odf dom element representation MetaEditingCyclesElement .

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

null, if the element is not set.

See Also:
MetaEditingCyclesElement

setEditingCycles

public void setEditingCycles(Integer editingCycles)
Sets the value of the odf dom element representation MetaEditingCyclesElement .

Parameters:
editingCycles - set the specified edit times
See Also:
MetaEditingCyclesElement

getEditingDuration

public Duration getEditingDuration()
Receives the value of the odf dom element representation MetaEditingDurationElement.

Returns:
the total time spent editing the document;

null, if the element is not set.

See Also:
MetaEditingDurationElement

setEditingDuration

public void setEditingDuration(Duration editingDuration)
Sets the value of the odf dom element representation MetaEditingDurationElement.

Parameters:
editingDuration - the time need to set
See Also:
MetaEditingDurationElement

getDocumentStatistic

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

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

null, if the feature is not exist.

See Also:
DocumentStatistic


Copyright © 2010-2017 The Apache Software Foundation. All Rights Reserved.