public class GlossaryDocument extends DocumentBase
Some documents, usually templates, can contain AutoText, AutoCorrect entries and/or Building Blocks (also known as glossary document entries, document parts or building blocks).
To access building blocks, you need to load a document into a Document object. Building blocks will be available via the Document.getGlossaryDocument() / Document.setGlossaryDocument(com.aspose.words.GlossaryDocument) property.
GlossaryDocument can contain any number of BuildingBlock objects. Each BuildingBlock represents one document part.
Corresponds to the glossaryDocument and docParts elements in OOXML.
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DocumentVisitor visitor)
Accepts a visitor.
|
BuildingBlock |
getBuildingBlock(int gallery,
java.lang.String category,
java.lang.String name) |
BuildingBlockCollection |
getBuildingBlocks()
Returns a typed collection that represents all building blocks in the glossary document.
|
BuildingBlock |
getFirstBuildingBlock()
Gets the first building block in the glossary document.
|
BuildingBlock |
getLastBuildingBlock()
Gets the last building block in the glossary document.
|
int |
getNodeType()
Returns the
NodeType.GLOSSARY_DOCUMENT value. |
getBackgroundShape, getDocument, getFontInfos, getLists, getNodeChangingCallback, getPageColor, getResourceLoadingCallback, getStyles, getWarningCallback, importNode, importNode, resetState, setBackgroundShape, setNodeChangingCallback, setPageColor, setResourceLoadingCallback, setWarningCallbackacceptChildren, acceptCore, appendChild, coreRemoveSelfOnly, getChild, getChildNodes, getChildNodes, getContainer, getCount, getCurrentNode, getFirstChild, getLastChild, getNextMatchingNode, getText, hasChildNodes, indexOf, insertAfter, insertBefore, isComposite, iterator, prependChild, removeAllChildren, removeChild, removeSmartTags, selectNodes, selectSingleNodedd, deepClone, getAncestor, getAncestor, getCustomNodeId, getNextSibling, getParentNode, getPreviousSibling, getRange, memberwiseClone, nextPreOrder, nodeTypeToString, previousPreOrder, remove, setCustomNodeId, toString, toString, toString, visitorActionToBoolpublic int getNodeType()
NodeType.GLOSSARY_DOCUMENT value.getNodeType in class NodeNodeType.GLOSSARY_DOCUMENT value. The returned value is one of NodeType constants.public BuildingBlockCollection getBuildingBlocks()
public BuildingBlock getFirstBuildingBlock()
null if there are no building blocks available.public BuildingBlock getLastBuildingBlock()
null if there are no building blocks available.public boolean accept(DocumentVisitor visitor) throws java.lang.Exception
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
public BuildingBlock getBuildingBlock(int gallery, java.lang.String category, java.lang.String name)