public class DocumentInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.List<java.lang.String> |
reservedContentType
List of ContentType attribute value in [Content_Type].xml that should be at most one can have the value in the file
|
static java.util.List<java.lang.String> |
reservedRelationshipType
List of Type attribute value in word/_rels/document.xml.rels that should be at most one in the file
|
Constructor and Description |
---|
DocumentInfo(java.lang.String id,
DocumentInfo mainDocInfo,
java.lang.String filePath)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addContentTypes(DocumentContentType contentTypes)
Add a DocumentContentType object to set of DocumentContentType.
|
java.util.Map<java.lang.String,java.lang.String> |
getAbstractNumberingMap()
Get map of old id and new id to handle w:abstractNumId.
|
java.util.Map<java.lang.String,DocumentInfo> |
getChildDocumentInfoMap()
Get map of child id and child DocumentInfo.
|
java.util.Map<java.lang.String,java.lang.String> |
getChildPathAndIDMap()
Get map of child path and child id.
|
java.util.Map<java.lang.String,java.lang.String> |
getChildStyleIdMap() |
java.lang.StringBuffer |
getContentTypeContent()
Get content of [Content_Type].xml
|
java.util.Map<java.lang.String,java.lang.String> |
getContentTypeNameSpaceMap() |
java.util.Set<DocumentContentType> |
getContentTypes()
Get set of DocumentContentType.
|
java.lang.StringBuffer |
getDocumentBuffer()
Get documentation content.
|
java.util.Map<java.lang.String,java.lang.String> |
getDocumentNameSpaceMap() |
java.util.Map<java.lang.String,DynamicDocumentRelationship> |
getDynamicRelationshipMap()
Get map of dynamic relationship.
{dynamic relationship id, DocumentRelationship} |
java.io.File |
getFile()
Get document file
|
java.lang.String |
getFilePath()
Get path of document
|
java.lang.String |
getId()
Get document id
|
DocumentInfo |
getMainDocInfo()
Get main document
|
java.lang.StringBuffer |
getNumberingContent()
Get content of word/numbering.xml
|
java.util.Map<java.lang.String,java.lang.String> |
getNumberingMap()
Get map of old id and new id to handle w:numId.
|
java.lang.StringBuffer |
getRelationshipContent()
Get content of word/_rels/document.xml.rels.
|
java.util.Map<java.lang.String,DocumentRelationship> |
getRelationshipMap()
Get map of relationship.
{relationship id, DocumentRelationship} |
java.util.Map<java.lang.String,DocumentSection> |
getSectionInfoMap()
Get map of section id and DocumentSection.
|
java.util.Map<java.lang.String,DocumentRelationship> |
getStaticRelationshipMap()
Get map of static relationship.
{static relationship id, DocumentRelationship} |
java.lang.StringBuffer |
getStyleContent()
Get content of word/styles.xml
|
boolean |
isUpdateChildStyleAndNumbering()
Check if child style has been updated or not.
|
void |
setAbstractNumberingMap(java.util.Map<java.lang.String,java.lang.String> abstractNumberingMap)
Set map of old id and new id from w:abstractNumId in numbering.xml.
|
void |
setChildDocumentInfoMap(java.util.Map<java.lang.String,DocumentInfo> childDocumentInfoMap)
Set map of child id and child DocumentInfo.
|
void |
setChildPathAndIDMap(java.util.Map<java.lang.String,java.lang.String> childPathAndIDMap)
Set map of child path and child id.
|
void |
setChildStyleIdMap(java.util.Map<java.lang.String,java.lang.String> childStyleIdMap) |
void |
setContentTypeContent(java.lang.StringBuffer contentTypeContent)
Set content of [Content_Type].xml
|
void |
setContentTypeNameSpaceMap(java.util.Map<java.lang.String,java.lang.String> contentTypeNameSpaceMap) |
void |
setContentTypes(java.util.Set<DocumentContentType> contentTypes)
Set set of DocumentContentType.
|
void |
setDocumentBuffer(java.lang.StringBuffer documentBuffer)
Set documentation content.
|
void |
setDocumentNameSpaceMap(java.util.Map<java.lang.String,java.lang.String> documentNameSpaceMap) |
void |
setDynamicRelationshipMap(java.util.Map<java.lang.String,DynamicDocumentRelationship> dynamicRelationshipMap)
Set map of dynamic relationship.
|
void |
setFilePath(java.lang.String filePath)
Set path of document
|
void |
setId(java.lang.String id)
Set document id
|
void |
setMainDocInfo(DocumentInfo mainDocInfo)
set main document
|
void |
setNumberingContent(java.lang.StringBuffer numberingContent)
Set content of word/numbering.xml
|
void |
setNumberingMap(java.util.Map<java.lang.String,java.lang.String> numberingMap)
Set map of old id and new id from w:numId in numbering.xml.
|
void |
setRelationshipContent(java.lang.StringBuffer relationshipContent)
Set content of word/_rels/document.xml.rels.
|
void |
setRelationshipMap(java.util.Map<java.lang.String,DocumentRelationship> relationshipMap)
Set map of relationship.
|
void |
setSectionInfoMap(java.util.Map<java.lang.String,DocumentSection> sectionInfoMap)
Set map of section id and DocumentSection.
|
void |
setStaticRelationshipMap(java.util.Map<java.lang.String,DocumentRelationship> staticRelationshipMap)
Set map of static relationship.
|
void |
setStyleContent(java.lang.StringBuffer styleContent)
Set content of word/styles.xml
|
void |
setUpdateChildStyleAndNumbering(boolean updateChildStyleAndNumbering) |
void |
upateSectionChildMap(java.lang.String childid,
DocumentInfo childDocumentInfo)
Update map of child id and child DocumentInfo.
When the engine found child template, child DocumentInfo will be created. The child id and child DocumentInfo will be added to this map of Main DocumentInfo. For example: #includeSection("child.docx", "A") child path = "child.docx" child id = "sectionChild1" The pair of {"child.docx", "sectionChild1"} will be added to childPathAndIDMap of Main DocumentInfo. The child DocumentInfo of "child.docx" template will be created. The pair of {"sectionChild1", childDocumentInfo} will be added to childDocumentInfoMap of Main DocumentInfo. |
void |
updateAbstractNumberingMap(java.lang.String oldId,
java.lang.String newId)
Add or update old id and new id from w:abstractNumId
|
void |
updateChildPathAndIDMap(java.lang.String childPath,
java.lang.String childId)
Update map of child path and child id.
|
void |
updateChildStyleIdMap(java.lang.String oldStyleId,
java.lang.String newStyleId) |
void |
updateContentTypeNameSpaceMap(java.lang.String key,
java.lang.String value) |
void |
updateDocumentNameSpaceMap(java.lang.String key,
java.lang.String value) |
void |
updateDynamicRelationshipMap(java.lang.String id,
DynamicDocumentRelationship documentRelationship)
Update map of dynamic relationship.
|
void |
updateNumberingMap(java.lang.String oldId,
java.lang.String newId)
Add or update old id and new id from w:numId.
|
void |
updateRelationshipMap(java.lang.String id,
DocumentRelationship relationship)
Update map of relationship.
|
void |
updateSectionInfoMap(java.lang.String sectionName,
DocumentSection documentSection)
Update map of section id and DocumentSection.
When the engine found section of child document, DocumentSection will be created. The sectionName and DocumentSection will be added to this map of child DocumentInfo. For example: #includeSection("child.docx", "A") child path = "child.docx" child id = "sectionChild1" The pair of {"child.docx", "sectionChild1"} will be added to childPathAndIDMap of Main DocumentInfo. The child DocumentInfo of "child.docx" template will be created. The pair of {"sectionChild1", childDocumentInfo} will be added to childDocumentInfoMap of Main DocumentInfo. The DocumentSection of section A will be created. The pair of {"A", aDocumentSection} will be added to sectionInfoMap of childDocumentInfo. |
void |
updateStaticRelationshipMap(java.lang.String id,
DocumentRelationship documentRelationship)
Update map of static relationship.
|
public static java.util.List<java.lang.String> reservedRelationshipType
public static java.util.List<java.lang.String> reservedContentType
public DocumentInfo(java.lang.String id, DocumentInfo mainDocInfo, java.lang.String filePath)
id
- document idmainDocInfo
- main document infofilePath
- file path of documentpublic java.lang.String getId()
public void setId(java.lang.String id)
id
- document idpublic java.io.File getFile()
public java.lang.String getFilePath()
public void setFilePath(java.lang.String filePath)
filePath
- path of documentpublic DocumentInfo getMainDocInfo()
public void setMainDocInfo(DocumentInfo mainDocInfo)
mainDocInfo
- documentpublic java.lang.StringBuffer getDocumentBuffer()
public void setDocumentBuffer(java.lang.StringBuffer documentBuffer)
documentBuffer
- documentation contentpublic java.util.Map<java.lang.String,java.lang.String> getDocumentNameSpaceMap()
public void setDocumentNameSpaceMap(java.util.Map<java.lang.String,java.lang.String> documentNameSpaceMap)
public void updateDocumentNameSpaceMap(java.lang.String key, java.lang.String value)
public java.util.Set<DocumentContentType> getContentTypes()
public void setContentTypes(java.util.Set<DocumentContentType> contentTypes)
contentTypes
- set of DocumentContentTypepublic void addContentTypes(DocumentContentType contentTypes)
contentTypes
- content type objectpublic java.util.Map<java.lang.String,java.lang.String> getContentTypeNameSpaceMap()
public void setContentTypeNameSpaceMap(java.util.Map<java.lang.String,java.lang.String> contentTypeNameSpaceMap)
public void updateContentTypeNameSpaceMap(java.lang.String key, java.lang.String value)
public java.util.Map<java.lang.String,DocumentRelationship> getRelationshipMap()
public void setRelationshipMap(java.util.Map<java.lang.String,DocumentRelationship> relationshipMap)
relationshipMap
- map of relationshippublic void updateRelationshipMap(java.lang.String id, DocumentRelationship relationship)
id
- relationship idrelationship
- DocumentRelationship objectpublic java.util.Map<java.lang.String,DocumentRelationship> getStaticRelationshipMap()
public void setStaticRelationshipMap(java.util.Map<java.lang.String,DocumentRelationship> staticRelationshipMap)
staticRelationshipMap
- map of static relationshippublic void updateStaticRelationshipMap(java.lang.String id, DocumentRelationship documentRelationship)
id
- static relationship iddocumentRelationship
- DocumentRelationship objectpublic java.util.Map<java.lang.String,DynamicDocumentRelationship> getDynamicRelationshipMap()
public void setDynamicRelationshipMap(java.util.Map<java.lang.String,DynamicDocumentRelationship> dynamicRelationshipMap)
dynamicRelationshipMap
- map of dynamic relationshippublic void updateDynamicRelationshipMap(java.lang.String id, DynamicDocumentRelationship documentRelationship)
id
- dynamic relationship iddocumentRelationship
- DocumentRelationship objectpublic java.util.Map<java.lang.String,java.lang.String> getChildPathAndIDMap()
public void setChildPathAndIDMap(java.util.Map<java.lang.String,java.lang.String> childPathAndIDMap)
childPathAndIDMap
- map of child path and child idpublic void updateChildPathAndIDMap(java.lang.String childPath, java.lang.String childId)
childPath
- child pathchildId
- child idpublic java.util.Map<java.lang.String,DocumentInfo> getChildDocumentInfoMap()
public void setChildDocumentInfoMap(java.util.Map<java.lang.String,DocumentInfo> childDocumentInfoMap)
childDocumentInfoMap
- map of child id and DocumentInfo of childpublic void upateSectionChildMap(java.lang.String childid, DocumentInfo childDocumentInfo)
childid
- child template idchildDocumentInfo
- child DocumentInfopublic java.util.Map<java.lang.String,DocumentSection> getSectionInfoMap()
public void setSectionInfoMap(java.util.Map<java.lang.String,DocumentSection> sectionInfoMap)
sectionInfoMap
- map of section id and DocumentSection.public void updateSectionInfoMap(java.lang.String sectionName, DocumentSection documentSection)
sectionName
- section namedocumentSection
- DocumentSectionpublic java.lang.StringBuffer getRelationshipContent()
public void setRelationshipContent(java.lang.StringBuffer relationshipContent)
relationshipContent
- content of word/_rels/document.xml.relspublic java.lang.StringBuffer getContentTypeContent()
public void setContentTypeContent(java.lang.StringBuffer contentTypeContent)
contentTypeContent
- content of [Content_Type].xmlpublic java.lang.StringBuffer getStyleContent()
public void setStyleContent(java.lang.StringBuffer styleContent)
styleContent
- content of word/styles.xmlpublic java.util.Map<java.lang.String,java.lang.String> getAbstractNumberingMap()
public void setAbstractNumberingMap(java.util.Map<java.lang.String,java.lang.String> abstractNumberingMap)
abstractNumberingMap
- map of abstractNumIdpublic void updateAbstractNumberingMap(java.lang.String oldId, java.lang.String newId)
oldId
- original value id of w:abstractNumIdnewId
- new value id of w:abstractNumIdpublic java.util.Map<java.lang.String,java.lang.String> getNumberingMap()
public void setNumberingMap(java.util.Map<java.lang.String,java.lang.String> numberingMap)
numberingMap
- map of numIdpublic void updateNumberingMap(java.lang.String oldId, java.lang.String newId)
oldId
- original value id of w:numIdnewId
- new value id of w:numIdpublic java.lang.StringBuffer getNumberingContent()
public void setNumberingContent(java.lang.StringBuffer numberingContent)
numberingContent
- content of word/numbering.xmlpublic java.util.Map<java.lang.String,java.lang.String> getChildStyleIdMap()
public void setChildStyleIdMap(java.util.Map<java.lang.String,java.lang.String> childStyleIdMap)
public void updateChildStyleIdMap(java.lang.String oldStyleId, java.lang.String newStyleId)
public boolean isUpdateChildStyleAndNumbering()
public void setUpdateChildStyleAndNumbering(boolean updateChildStyleAndNumbering)
Copyright © 2010 - No Magic Asia