|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectOpenDocumentMetadata
OpenDocumentMetadata describes the content of an
OASIS Open Document Format meta-information file.
The declarations of the fields in this class closely
mirror the element and attribute names in the meta.xml
file. For example, the printedBy
field
contains the information that comes from the
<meta:printed-by>
element. This
is no accident--it allows code that analyzes a
meta.xml file to use reflection to call the methods
for setting the fields in this class.
Field Summary | |
protected Hashtable |
userDefined
|
Constructor Summary | |
OpenDocumentMetadata()
|
Method Summary | |
int |
getCellCount()
Return the total number of cells in this spreadsheet document. |
int |
getCharacterCount()
Return the total number of characters in the document. |
Date |
getCreationDate()
Return the document's creation date and time. |
String |
getCreator()
Return the last editor of the document. |
Date |
getDate()
Return the document's last edit date and time. |
String |
getDescription()
Return the document description. |
int |
getDrawCount()
Return the total number of drawings in the document. |
int |
getEditingCycles()
Return the number of editing cycles for this document. |
Duration |
getEditingDuration()
Return the total time spent editing the document. |
Object |
getFieldByName(String fieldName)
Returns an Object for a field by name. |
int |
getFrameCount()
Return the total number of frames in the document. |
String |
getGenerator()
Return the generator meta information. |
int |
getImageCount()
Return the total number of images in the document. |
String |
getInitialCreator()
Return the document's initial creator. |
String |
getKeyword()
Return the list of keywords for this document. |
String |
getLanguage()
Return the document's language. |
int |
getNonWhitespaceCharacterCount()
Return the total number of non-whitespace characters in the document. |
int |
getObjectCount()
Return the total number of graphic objects in this spreadsheet or graphics document. |
int |
getOleObjectCount()
Return the total number of OLE objects in the document. |
int |
getPageCount()
Return the total number of pages in the document. |
int |
getParagraphCount()
Return the total number of paragraphs in the document. |
Date |
getPrintDate()
Return the date and time the document was last printed. |
String |
getPrintedBy()
Return the last person to print the document. |
int |
getRowCount()
Return the total number of rows in the document. |
int |
getSentenceCount()
Return the total number of sentences in the document. |
String |
getSubject()
Return the document subject. |
int |
getSyllableCount()
Return the total number of syllables in the document. |
int |
getTableCount()
Return the total number of tables in this text or spreadsheet document. |
String |
getTitle()
Return the document title. |
Hashtable |
getUserDefined()
Return the user-defined meta information. |
int |
getWordCount()
Return the total number of words in the document. |
void |
setCellCount(int cellCount)
Set the information corresponding to <meta:cell-count> to given value. |
void |
setCharacterCount(int characterCount)
Set the information corresponding to <meta:character-count> to given value. |
void |
setCreationDate(Date creationDate)
Set the information corresponding to <meta:creation-date> to given value. |
void |
setCreationDate(String strCreationDate)
Set the information corresponding to <meta:creation-date> to given value. |
void |
setCreator(String creator)
Set the information corresponding to <dc:creator> to given value. |
void |
setDate(Date date)
Set the information corresponding to <dc:date> (the last editing date) to given value. |
void |
setDate(String strDate)
Set the information corresponding to <dc:date> (the last editing date) to given value. |
void |
setDescription(String description)
Set the information corresponding to <dc:description> to given value. |
void |
setDrawCount(int drawCount)
Set the information corresponding to meta:draw-count to given value. |
void |
setEditingCycles(int editingCycles)
Set the information corresponding to <meta:editing-cycles> to given value. |
void |
setEditingCycles(String strEditingCycles)
Set the information corresponding to <meta:editing-cycles> to given value. |
void |
setEditingDuration(Duration editingDuration)
Set the information corresponding to <meta:editing-duration> to given value. |
void |
setEditingDuration(String strEditingDuration)
Set the information corresponding to <meta:editing-duration> to given value. |
void |
setFrameCount(int frameCount)
Set the information corresponding to <meta:frame-count> to given value. |
void |
setGenerator(String generator)
Set the information corresponding to <meta:generator> to given value. |
void |
setImageCount(int imageCount)
Set the information corresponding to meta:image-count to given value. |
void |
setInitialCreator(String initialCreator)
Set the information corresponding to <meta:initial-creator> to given value. |
void |
setKeyword(String keyword)
Set the information corresponding to <meta:keyword> to given value. |
void |
setLanguage(String language)
Set the information corresponding to <dc:language> to given value. |
void |
setNonWhitespaceCharacterCount(int nonWhitespaceCharacterCount)
Set the information corresponding to <meta:non-whitespace-character-count> to given value. |
void |
setObjectCount(int objectCount)
Set the information corresponding to <meta:object-count> to given value. |
void |
setOleObjectCount(int oleObjectCount)
Set the information corresponding to meta:ole-object-count to given value. |
void |
setPageCount(int pageCount)
Set the information corresponding to meta:page-count to given value. |
void |
setParagraphCount(int paragraphCount)
Set the information corresponding to meta:paragraph-count to given value. |
void |
setPrintDate(Date printDate)
Set the information corresponding to <meta:print-date> to given value. |
void |
setPrintDate(String strPrintDate)
Set the information corresponding to <meta:print-date> to given value. |
void |
setPrintedBy(String printedBy)
Set the information corresponding to <meta:printed-by> to given value. |
void |
setRowCount(int rowCount)
Set the information corresponding to <meta:row-count> to given value. |
void |
setSentenceCount(int sentenceCount)
Set the information corresponding to <meta:sentence-count> to given value. |
void |
setSubject(String subject)
Set the information corresponding to <dc:subject> to given value. |
void |
setSyllableCount(int syllableCount)
Set the information corresponding to <meta:syllable-count> to given value. |
void |
setTableCount(int tableCount)
Set the information corresponding to meta:table-count to given value. |
void |
setTitle(String title)
Set the information corresponding to <dc:title> to given value. |
void |
setUserDefined(Hashtable userDefined)
Set the information corresponding to all <meta:user-defined> elements. |
void |
setUserDefined(String name,
boolean value)
Set user-defined info for given name to a boolean value. |
void |
setUserDefined(String name,
double value)
Set user-defined info for given name to a double value. |
void |
setUserDefined(String name,
int value)
Set user-defined info for given name to an integer value. |
void |
setUserDefined(String name,
Object value)
Set user-defined info for given name to an Object value. |
void |
setWordCount(int wordCount)
Set the information corresponding to <meta:wod-count> to given value. |
String |
toString()
Returns a string representation of this OpenDocumentMetadata . |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Hashtable userDefined
Constructor Detail |
public OpenDocumentMetadata()
Method Detail |
public String getGenerator()
public void setGenerator(String generator)
<meta:generator>
to given value.
generator
- the generator.public String getTitle()
public void setTitle(String title)
<dc:title>
to given value.
title
- the title.public String getDescription()
public void setDescription(String description)
<dc:description>
to given value.
description
- the description.public String getSubject()
public void setSubject(String subject)
<dc:subject>
to given value.
subject
- the subject.public String getKeyword()
public void setKeyword(String keyword)
<meta:keyword>
to given value.
keyword
- the keyword.public String getInitialCreator()
public void setInitialCreator(String initialCreator)
<meta:initial-creator>
to given value.
initialCreator
- the initial creator.public String getCreator()
public void setCreator(String creator)
<dc:creator>
to given value.
This is actually the last person to edit the document.
creator
- the last editor.public String getPrintedBy()
public void setPrintedBy(String printedBy)
<meta:printed-by>
to given value.
printedBy
- the last person to print document.public Date getCreationDate()
YYYY-MM-DDThh:mm:ss
.
public void setCreationDate(Date creationDate)
<meta:creation-date>
to given value.
creationDate
- the creationDate.public void setCreationDate(String strCreationDate)
<meta:creation-date>
to given value.
strCreationDate
- the creation date
in the form yyyy-mm-ddTHH:mm:ss
.public Date getDate()
YYYY-MM-DDThh:mm:ss
.
public void setDate(Date date)
<dc:date>
(the last editing date) to given value.
date
- the last date document was edited.public void setDate(String strDate)
<dc:date>
(the last editing date) to given value.
strDate
- the last editing date
in form yyyy-mm-ddTHH:mm:ss
.public Date getPrintDate()
YYYY-MM-DDThh:mm:ss
.
public void setPrintDate(Date printDate)
<meta:print-date>
to given value.
printDate
- the last editing date.public void setPrintDate(String strPrintDate)
<meta:print-date>
to given value.
strPrintDate
- the last printed date
in form yyyy-mm-ddTHH:mm:ss
.public String getLanguage()
public void setLanguage(String language)
<dc:language>
to given value.
language
- the language as a two-letter code, optionally followed by
hyphen and two-letter country code.public int getEditingCycles()
public void setEditingCycles(int editingCycles)
<meta:editing-cycles>
to given value.
editingCycles
- the number of editing cycles.public void setEditingCycles(String strEditingCycles)
<meta:editing-cycles>
to given value.
strEditingCycles
- the number of editing cycles.public Duration getEditingDuration()
PnYnMnDTnHnMnS
.
public void setEditingDuration(Duration editingDuration)
<meta:editing-duration>
to given value.
editingDuration
- the total editing time.public void setEditingDuration(String strEditingDuration)
<meta:editing-duration>
to given value.
strEditingDuration
- the total editing time
in the form PnYnMnDTnHnMnS
.public int getPageCount()
public void setPageCount(int pageCount)
meta:page-count
to given value.
pageCount
- the total number of pages.public int getTableCount()
public void setTableCount(int tableCount)
meta:table-count
to given value.
tableCount
- the total number of tables.public int getDrawCount()
public void setDrawCount(int drawCount)
meta:draw-count
to given value.
drawCount
- the total number of drawings.public int getImageCount()
public void setImageCount(int imageCount)
meta:image-count
to given value.
imageCount
- the total number of images.public int getOleObjectCount()
public void setOleObjectCount(int oleObjectCount)
meta:ole-object-count
to given value.
oleObjectCount
- the total number of OLE objects.public int getParagraphCount()
public void setParagraphCount(int paragraphCount)
meta:paragraph-count
to given value.
paragraphCount
- the total number of paragraphs.public int getWordCount()
public void setWordCount(int wordCount)
<meta:wod-count>
to given value.
wordCount
- the total number of words.public int getCharacterCount()
public void setCharacterCount(int characterCount)
<meta:character-count>
to given value.
characterCount
- the total number of characters.public int getFrameCount()
public void setFrameCount(int frameCount)
<meta:frame-count>
to given value.
frameCount
- the total number of frames.public int getSentenceCount()
public void setSentenceCount(int sentenceCount)
<meta:sentence-count>
to given value.
sentenceCount
- the total number of sentences.public int getSyllableCount()
public void setSyllableCount(int syllableCount)
<meta:syllable-count>
to given value.
syllableCount
- the total number of syllables.public int getNonWhitespaceCharacterCount()
public void setNonWhitespaceCharacterCount(int nonWhitespaceCharacterCount)
<meta:non-whitespace-character-count>
to given value.
nonWhitespaceCharacterCount
- the total number of non-whitespace
characters.public int getRowCount()
public void setRowCount(int rowCount)
<meta:row-count>
to given value.
rowCount
- the total number of rows.public int getCellCount()
public void setCellCount(int cellCount)
<meta:cell-count>
to given value.
cellCount
- the total number of cells.public int getObjectCount()
public void setObjectCount(int objectCount)
<meta:object-count>
to given value.
objectCount
- the total number of graphic objects.public Hashtable getUserDefined()
public void setUserDefined(Hashtable userDefined)
<meta:user-defined>
elements.
userDefined
- all user-defined meta-information.public void setUserDefined(String name, int value)
name
- the name for this user-defined infovalue
- the integer valuepublic void setUserDefined(String name, double value)
name
- the name for this user-defined infovalue
- the double valuepublic void setUserDefined(String name, boolean value)
name
- the name for this user-defined infovalue
- the boolean valuepublic void setUserDefined(String name, Object value)
name
- the name for this user-defined infovalue
- the object valuepublic Object getFieldByName(String fieldName)
public String toString()
OpenDocumentMetadata
.
This method is intended to be used only for debugging purposes.
It lists all the non-static fields of the object in the order
returned by getDeclaredFields()
,
with their values converted via toString()
.
OpenDocumentMetadata
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |