public class OdfOfficeMeta extends Object
OdfOfficeMeta represent the meta data feature in the ODF document.
It provides convenient method to get meta data info.
| Constructor and Description |
|---|
OdfOfficeMeta(OdfFileDom metaDom)
Constructor of
OdfOfficeMeta feature. |
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyword(String keyword)
Add the keyword to the current document.
|
OdfMetaAutoReload |
getAutoReload()
Receives the OdfMetaAutoReload feature.
|
Calendar |
getCreationDate()
Receives the value of the ODFDOM element representation
MetaCreationDateElement ,
See meta:creation-date |
String |
getCreator()
Receives the value of the ODFDOM element representation
DcCreatorElement , See
dc:creator |
Calendar |
getDate()
Receives the value of the ODFDOM element representation
DcDateElement , See
dc:date. |
String |
getDescription()
Receives the value of the ODFDOM element representation
DcDescriptionElement , See
dc:description. |
OdfMetaDocumentStatistic |
getDocumentStatistic()
Receives the sub feature of OdfMetaDocumentStatistic.
|
Integer |
getEditingCycles()
Receives the value of the ODFDOM element representation
MetaEditingCyclesElement ,
See meta:editing-cycles. |
Duration |
getEditingDuration()
Receives the value of the ODFDOM element representation
MetaEditingDurationElement
, See meta:editing-duration. |
String |
getGenerator()
Receives the value of the ODFDOM element representation
MetaGeneratorElement , See
meta:generator. |
OdfMetaHyperlinkBehaviour |
getHyperlinkBehaviour()
Receives the OdfMetaHyperlinkBehaviour feature.
|
String |
getInitialCreator()
Receives the value of the ODFDOM element representation
MetaInitialCreatorElement
, See meta:initial-creator. |
List<String> |
getKeywords()
Receives the list value of the ODFDOM element representation
MetaKeywordElement ,
See meta:keyword. |
String |
getLanguage()
Receives the value of the ODFDOM element representation
DcLanguageElement , See
dc:language. |
OfficeMetaElement |
getOfficeMetaElement()
Get the instance of
OfficeMetaElement which represents this feature. |
Calendar |
getPrintDate()
Receives the value of the ODFDOM element representation
MetaPrintDateElement , See
meta:print-date. |
String |
getPrintedBy()
Receives the value of the ODFDOM element representation
MetaPrintedByElement , See
meta:printed-by |
String |
getSubject()
Receives the value of the ODFDOM element representation
DcSubjectElement , See
dc:subject. |
OdfMetaTemplate |
getTemplate()
Receives the OdfMetaTemplate feature.
|
String |
getTitle()
Receives the value of the ODFDOM element representation
DcTitleElement , See
dc:title. |
List<String> |
getUserDefinedDataNames()
Receives the list value of the ODFDOM element representation
MetaUserDefinedElement
, See meta:user-defined. |
String |
getUserDefinedDataType(String name)
Receives the data type of the ODFDOM element representation
MetaUserDefinedElement
by attribute name, See meta:user-defined. |
String |
getUserDefinedDataValue(String name)
Receives the value of the ODFDOM element representation
MetaUserDefinedElement by
attribute name, See meta:user-defined. |
MetaUserDefinedElement |
getUserDefinedElementByAttributeName(String name)
Receives the ODFDOM element representation
MetaUserDefinedElement by attribute
name, See meta:user-defined. |
boolean |
hasAutomaticUpdate() |
void |
removeUserDefinedDataByName(String name)
Remove the ODFDOM element representation
MetaUserDefinedElement by attribute name,
See meta:user-defined. |
void |
setAutomaticUpdate(boolean enableAutomaticUpdate) |
void |
setCreationDate(Calendar creationDate)
Sets the value of the ODFDOM element representation
MetaCreationDateElement , See
meta:creation-date. |
void |
setCreator(String creator)
Sets the value of the ODFDOM element representation
DcCreatorElement , See
dc:creator. |
void |
setDate(Calendar date)
Sets the value of the ODFDOM element representation
DcDateElement , See
dc:date. |
void |
setDescription(String description)
Sets the value of the ODFDOM element representation
DcDescriptionElement , See
dc:description. |
void |
setEditingCycles(Integer editingCycles)
Sets the value of the ODFDOM element representation
MetaEditingCyclesElement , See
meta:editing-cycles. |
void |
setEditingDuration(Duration editingDuration)
Sets the value of the ODFDOM element representation
MetaEditingDurationElement ,
See meta:editing-duration. |
void |
setGenerator(String generator)
Sets the value of the ODFDOM element representation
MetaGeneratorElement , See
meta:generator. |
void |
setInitialCreator(String initialCreator)
Sets the value of the ODFDOM element representation
MetaInitialCreatorElement ,
See meta:initial-creator. |
void |
setKeywords(List<String> keyList)
Sets the list value of the ODFDOM element representation
MetaKeywordElement , See
meta:keyword. |
void |
setLanguage(String language)
Sets the value of the ODFDOM element representation
DcLanguageElement , See
dc:language. |
void |
setPrintDate(Calendar printDate)
Sets the value of the ODFDOM element representation
MetaPrintDateElement , See
meta:print-date. |
void |
setPrintedBy(String printedBy)
Sets the value of the ODFDOM element representation
MetaPrintedByElement , See
meta:printed-by. |
void |
setSubject(String subject)
Sets the value of the ODFDOM element representation
DcSubjectElement , See
dc:subject. |
void |
setTitle(String title)
Sets the value of the ODFDOM element representation
DcTitleElement , See
dc:title. |
void |
setUserDefinedData(String name,
String type,
String value)
Sets the ODFDOM element representation
MetaUserDefinedElement , See meta:user-defined 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 ODFDOM element representation
MetaUserDefinedElement by
attribute name, See meta:user-defined. |
void |
setUserDefinedDataValue(String name,
String value)
Sets the value of the ODFDOM element representation
MetaUserDefinedElement by
attribute name, See meta:user-defined. |
String |
toString() |
public OdfOfficeMeta(OdfFileDom metaDom)
OdfOfficeMeta feature.metaDom - the file DOM element of meta.xmlpublic OfficeMetaElement getOfficeMetaElement()
OfficeMetaElement which represents this feature.public String getGenerator()
MetaGeneratorElement , See
meta:generator.null, if the element is not set.
public void setGenerator(String generator)
MetaGeneratorElement , See
meta:generator.generator - set the specified document generator. NULL will remove the element from the
meta.xml.public String getTitle()
DcTitleElement , See
dc:title.null, if the element is not set.
public void setTitle(String title)
DcTitleElement , See
dc:title.title - set the specified document title. NULL will remove the element from the meta.xml.public String getDescription()
DcDescriptionElement , See
dc:description.null, if the element is not set.
public void setDescription(String description)
DcDescriptionElement , See
dc:description.description - set the specified document description. NULL will remove the element from
the meta.xml.public String getSubject()
DcSubjectElement , See
dc:subject.null, if the element is not set.
public void setSubject(String subject)
DcSubjectElement , See
dc:subject.subject - set the specified document subject. NULL will remove the element from the
meta.xml.public List<String> getKeywords()
MetaKeywordElement ,
See meta:keyword.null, if the element is not set.
public void setKeywords(List<String> keyList)
MetaKeywordElement , See
meta:keyword.keyList - set the specified list of keywordspublic void addKeyword(String keyword)
keyword - the value of child element meta:keyword.public List<String> getUserDefinedDataNames()
MetaUserDefinedElement
, See meta:user-defined.null, if the element is not set.
public MetaUserDefinedElement getUserDefinedElementByAttributeName(String name)
MetaUserDefinedElement by attribute
name, See meta:user-defined.name - the name of the user-defined metadataMetaUserDefinedElement which is identified by the specified name;
null, if the element is not set.
public String getUserDefinedDataValue(String name)
MetaUserDefinedElement by
attribute name, See meta:user-defined.name - the name of the user-defined metadatanull, if the element is not set.
public String getUserDefinedDataType(String name)
MetaUserDefinedElement
by attribute name, See meta:user-defined.name - the name of the user-defined metadatanull, if the element is not set.
public void removeUserDefinedDataByName(String name)
MetaUserDefinedElement by attribute name,
See meta:user-defined.name - the name of the user-defined metadatapublic void setUserDefinedDataValue(String name, String value)
MetaUserDefinedElement by
attribute name, See meta:user-defined.name - the name need to set for the user-defined metadatavalue - the value need to set for the user-defined metadatapublic void setUserDefinedDataType(String name, String value)
MetaUserDefinedElement by
attribute name, See meta:user-defined.name - the name need to set for the user-defined metadatavalue - the value need to set for the user-defined metadatapublic void setUserDefinedData(String name, String type, String value)
MetaUserDefinedElement , See meta:user-defined 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.name - the name need to set for the user-defined metadatatype - the data type need to set for the user-defined metadatavalue - the value need to set for the user-defined metadatapublic String getInitialCreator()
MetaInitialCreatorElement
, See meta:initial-creator.null, if the element is not set.
public void setInitialCreator(String initialCreator)
MetaInitialCreatorElement ,
See meta:initial-creator.initialCreator - set the specified initial creator. NULL will remove the element from the
meta.xml.public String getCreator()
DcCreatorElement , See
dc:creatornull, if the element is not set.
public void setCreator(String creator)
DcCreatorElement , See
dc:creator.creator - set the specified creator. NULL will remove the element from the meta.xml.public String getPrintedBy()
MetaPrintedByElement , See
meta:printed-bynull, if element is not set
public void setPrintedBy(String printedBy)
MetaPrintedByElement , See
meta:printed-by.printedBy - the name need to set for the last person who printed the current document.
NULL will remove the element from the meta.xml.public Calendar getCreationDate()
MetaCreationDateElement ,
See meta:creation-datenull, if element is not set
public void setCreationDate(Calendar creationDate)
MetaCreationDateElement , See
meta:creation-date.creationDate - the date and time need to set. NULL will remove the element from the
meta.xml.public Calendar getDate()
DcDateElement , See
dc:date.null, if the element is not set.
public void setDate(Calendar date)
DcDateElement , See
dc:date.date - the date and time need to set. NULL will remove the element from the meta.xml.public Calendar getPrintDate()
MetaPrintDateElement , See
meta:print-date.null, if the element is not set.
public void setPrintDate(Calendar printDate)
MetaPrintDateElement , See
meta:print-date.printDate - the date and time need to set. NULL will remove the element from the meta.xml.public String getLanguage()
DcLanguageElement , See
dc:language.null, if the element is not set.
public void setLanguage(String language)
DcLanguageElement , See
dc:language.language - the default language need to set fo the current document. NULL will remove the
element from the meta.xml.public Integer getEditingCycles()
MetaEditingCyclesElement ,
See meta:editing-cycles.null, if the element is not set.
public void setEditingCycles(Integer editingCycles)
MetaEditingCyclesElement , See
meta:editing-cycles.editingCycles - set the specified edit times. NULL will remove the element from the
meta.xml.public Duration getEditingDuration()
MetaEditingDurationElement
, See meta:editing-duration.null, if the element is not set.
public void setEditingDuration(Duration editingDuration)
MetaEditingDurationElement ,
See meta:editing-duration.editingDuration - the time need to set. NULL will remove the element from the meta.xml.public OdfMetaDocumentStatistic getDocumentStatistic()
OdfMetaDocumentStatistic feature;
null, if the feature is not exist.
public OdfMetaHyperlinkBehaviour getHyperlinkBehaviour()
OdfMetaHyperlinkBehaviour feature;
null, if the feature is not exist.
public OdfMetaAutoReload getAutoReload()
It can be represented by OdfMetaAutoReload feature;
null, if the feature is not exist.
public OdfMetaTemplate getTemplate()
It can be represented by OdfMetaTemplate feature;
null, if the feature is not exist.
public void setAutomaticUpdate(boolean enableAutomaticUpdate)
enableAutomaticUpdate - If the automatic update of metadata is enabled, metadata such as
last modified data is set during saving the document. The default is true,
disabling the default allows to load and save a document without changing any data.public boolean hasAutomaticUpdate()
true, disabling the default
allows to load and save a document without changing any data.Copyright © 2008–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.