StructuredDocumentTag

Inheritance: java.lang.Object, com.aspose.words.Node, com.aspose.words.CompositeNode

All Implemented Interfaces: com.aspose.words.IStructuredDocumentTag

public class StructuredDocumentTag extends CompositeNode implements IStructuredDocumentTag

Represents a structured document tag (SDT or content control) in a document.

To learn more, visit the Structured Document Tags or Content Control documentation article.

Structured document tags (SDTs) allow to embed customer-defined semantics as well as its behavior and appearance into a document.

In this version Aspose.Words provides a number of public methods and properties to manipulate the behavior and content of StructuredDocumentTag. Mapping of SDT nodes to custom XML packages within a document can be performed with using the getXmlMapping() property.

StructuredDocumentTag can occur in a document in the following places:

Constructors

Constructor Description
StructuredDocumentTag(DocumentBase doc, int type, int level) Initializes a new instance of this class.

Methods

Method Description
accept(DocumentVisitor visitor) Accepts a visitor.
appendChild(Node newChild) Adds the specified node to the end of the list of child nodes for this node.
clear() Clears contents of this structured document tag and displays a placeholder if it is defined.
clearRunAttrs()
dd()
deepClone(boolean isCloneChildren) Creates a duplicate of the node.
equals(Object arg0)
fetchInheritedRunAttr(int key)
getAncestor(int ancestorType)
getAncestor(Class ancestorType) Gets the first ancestor of the specified object type.
getAppearance() Gets/sets the appearance of a structured document tag.
getBuildingBlockCategory() Specifies category of building block for this SDT node.
getBuildingBlockGallery() Specifies type of building block for this SDT.
getCalendarType() Specifies the type of calendar for this SDT.
getChecked() Gets/Sets current state of the Checkbox SDT.
getChild(int nodeType, int index, boolean isDeep)
getChildNodes() Gets all immediate child nodes of this node.
getChildNodes(int nodeType, boolean isDeep)
getClass()
getColor() Gets the color of the structured document tag.
getContainer()
getContentsFont() Font formatting that will be applied to text entered into SDT.
getCount() Gets the number of immediate children of this node.
getCurrentNode()
getCustomNodeId() Specifies custom node identifier.
getDateDisplayFormat() String that represents the format in which dates are displayed.
getDateDisplayLocale() Allows to set/get the language format for the date displayed in this SDT.
getDateStorageFormat() Gets/sets format in which the date for a date SDT is stored when the SDT is bound to an XML node in the document’s data store.
getDirectRunAttr(int key)
getDirectRunAttr(int key, int revisionsView)
getDocument() Gets the document to which this node belongs.
getEndCharacterFont() Font formatting that will be applied to the last character of text entered into SDT.
getFirstChild() Gets the first child of the node.
getFullDate() Specifies the full date and time last entered into this SDT.
getId() Specifies a unique read-only persistent numerical Id for this SDT.
getLastChild() Gets the last child of the node.
getLevel() Gets the level at which this SDT occurs in the document tree.
getLevel_IMarkupNode()
getListItems() Gets SdtListItemCollection associated with this SDT.
getLockContentControl() When set to true , this property will prohibit a user from deleting this SDT.
getLockContents() When set to true , this property will prohibit a user from editing the contents of this SDT.
getMultiline() Specifies whether this SDT allows multiple lines of text.
getNextMatchingNode(Node curNode)
getNextSibling() Gets the node immediately following this node.
getNodeType() Returns NodeType.STRUCTURED_DOCUMENT_TAG.
getParentNode() Gets the immediate parent of this node.
getPlaceholder() Gets the BuildingBlock containing placeholder text which should be displayed when this SDT run contents are empty, the associated mapped XML element is empty as specified via the getXmlMapping() element or the isShowingPlaceholderText() / isShowingPlaceholderText(boolean) element is true .
getPlaceholderName() Gets or sets Name of the BuildingBlock containing placeholder text.
getPreviousSibling() Gets the node immediately preceding this node.
getRange() Returns a Range object that represents the portion of a document that is contained in this node.
getSdtType() Gets type of this Structured document tag.
getStyle() Gets the Style of the structured document tag.
getStyleName() Gets the name of the style applied to the structured document tag.
getTag() Specifies a tag associated with the current SDT node.
getText() Gets the text of this node and of all its children.
getTitle() Specifies the friendly name associated with this SDT.
getWordOpenXML() Gets a string that represents the XML contained within the node in the SaveFormat.FLAT_OPC format.
getXmlMapping() Gets an object that represents the mapping of this structured document tag to XML data in a custom XML part of the current document.
hasChildNodes() Returns true if this node has any child nodes.
hashCode()
indexOf(Node child) Returns the index of the specified child node in the child node array.
insertAfter(Node newChild, Node refChild) Inserts the specified node immediately after the specified reference node.
insertBefore(Node newChild, Node refChild) Inserts the specified node immediately before the specified reference node.
isComposite() Returns true as this node can have child nodes.
isRanged()
isShowingPlaceholderText() Specifies whether the content of this SDT shall be interpreted to contain placeholder text (as opposed to regular text contents within the SDT).
isShowingPlaceholderText(boolean value) Specifies whether the content of this SDT shall be interpreted to contain placeholder text (as opposed to regular text contents within the SDT).
isTemporary() Specifies whether this SDT shall be removed from the WordProcessingML document when its contents are modified.
isTemporary(boolean value) Specifies whether this SDT shall be removed from the WordProcessingML document when its contents are modified.
iterator() Provides support for the for each style iteration over the child nodes of this node.
nextPreOrder(Node rootNode) Gets next node according to the pre-order tree traversal algorithm.
nodeTypeToString(int nodeType)
notify()
notifyAll()
prependChild(Node newChild) Adds the specified node to the beginning of the list of child nodes for this node.
previousPreOrder(Node rootNode) Gets the previous node according to the pre-order tree traversal algorithm.
remove() Removes itself from the parent.
removeAllChildren() Removes all the child nodes of the current node.
removeChild(Node oldChild) Removes the specified child node.
removeMoveRevisions()
removeRunAttr(int key)
removeSelfOnly() Removes just this SDT node itself, but keeps the content of it inside the document tree.
removeSmartTags() Removes all SmartTag descendant nodes of the current node.
selectNodes(String xpath) Selects a list of nodes matching the XPath expression.
selectSingleNode(String xpath) Selects the first Node that matches the XPath expression.
setAppearance(int value) Gets/sets the appearance of a structured document tag.
setBuildingBlockCategory(String value) Specifies category of building block for this SDT node.
setBuildingBlockGallery(String value) Specifies type of building block for this SDT.
setCalendarType(int value) Specifies the type of calendar for this SDT.
setChecked(boolean value) Gets/Sets current state of the Checkbox SDT.
setCheckedSymbol(int characterCode, String fontName) Sets the symbol used to represent the checked state of a check box content control.
setColor(Color value) Sets the color of the structured document tag.
setCustomNodeId(int value) Specifies custom node identifier.
setDateDisplayFormat(String value) String that represents the format in which dates are displayed.
setDateDisplayLocale(int value) Allows to set/get the language format for the date displayed in this SDT.
setDateStorageFormat(int value) Gets/sets format in which the date for a date SDT is stored when the SDT is bound to an XML node in the document’s data store.
setFullDate(Date value) Specifies the full date and time last entered into this SDT.
setLockContentControl(boolean value) When set to true , this property will prohibit a user from deleting this SDT.
setLockContents(boolean value) When set to true , this property will prohibit a user from editing the contents of this SDT.
setMultiline(boolean value) Specifies whether this SDT allows multiple lines of text.
setPlaceholderName(String value) Gets or sets Name of the BuildingBlock containing placeholder text.
setRunAttr(int key, Object value)
setStyle(Style value) Sets the Style of the structured document tag.
setStyleName(String value) Sets the name of the style applied to the structured document tag.
setTag(String value) Specifies a tag associated with the current SDT node.
setTitle(String value) Specifies the friendly name associated with this SDT.
setUncheckedSymbol(int characterCode, String fontName) Sets the symbol used to represent the unchecked state of a check box content control.
structuredDocumentTagNode()
toString()
toString(SaveOptions saveOptions) Exports the content of the node into a string using the specified save options.
toString(int saveFormat)
wait()
wait(long arg0)
wait(long arg0, int arg1)

StructuredDocumentTag(DocumentBase doc, int type, int level)

public StructuredDocumentTag(DocumentBase doc, int type, int level)

Initializes a new instance of this class.

Parameters:

Parameter Type Description
doc DocumentBase
type int
level int

accept(DocumentVisitor visitor)

public boolean accept(DocumentVisitor visitor)

Accepts a visitor.

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.

Parameters:

Parameter Type Description
visitor DocumentVisitor The visitor that will visit the nodes.

Returns: boolean - True if all nodes were visited; false if DocumentVisitor stopped the operation before visiting all nodes. Calls DocumentVisitor.visitStructuredDocumentTagStart(com.aspose.words.StructuredDocumentTag), then calls Node.accept(com.aspose.words.DocumentVisitor) for all child nodes of the smart tag and calls DocumentVisitor.visitStructuredDocumentTagEnd(com.aspose.words.StructuredDocumentTag) at the end.

appendChild(Node newChild)

public Node appendChild(Node newChild)

Adds the specified node to the end of the list of child nodes for this node.

If the newChild is already in the tree, it is first removed.

If the node being inserted was created from another document, you should use M:Aspose.Words.DocumentBase.ImportNode(Aspose.Words.Node,System.Boolean,Aspose.Words.ImportFormatMode) to import the node to the current document. The imported node can then be inserted into the current document.

Parameters:

Parameter Type Description
newChild Node The node to add.

Returns: Node - The node added.

clear()

public void clear()

Clears contents of this structured document tag and displays a placeholder if it is defined.

It is not possible to clear contents of a structured document tag if it has revisions.

If this structured document tag is mapped to custom XML (with using the getXmlMapping() property), the referenced XML node is cleared.

clearRunAttrs()

public void clearRunAttrs()

dd()

public void dd()

deepClone(boolean isCloneChildren)

public Node deepClone(boolean isCloneChildren)

Creates a duplicate of the node.

This method serves as a copy constructor for nodes. The cloned node has no parent, but belongs to the same document as the original node.

This method always performs a deep copy of the node. The isCloneChildren parameter specifies whether to perform copy all child nodes as well.

Parameters:

Parameter Type Description
isCloneChildren boolean True to recursively clone the subtree under the specified node; false to clone only the node itself.

Returns: Node - The cloned node.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

fetchInheritedRunAttr(int key)

public Object fetchInheritedRunAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

getAncestor(int ancestorType)

public CompositeNode getAncestor(int ancestorType)

Parameters:

Parameter Type Description
ancestorType int

Returns: CompositeNode

getAncestor(Class ancestorType)

public CompositeNode getAncestor(Class ancestorType)

Gets the first ancestor of the specified object type.

Parameters:

Parameter Type Description
ancestorType java.lang.Class The object type of the ancestor to retrieve.

Returns: CompositeNode - The ancestor of the specified type or null if no ancestor of this type was found.

The ancestor type matches if it is equal to ancestorType or derived from ancestorType .

getAppearance()

public int getAppearance()

Gets/sets the appearance of a structured document tag.

Returns: int - The corresponding int value. The returned value is one of SdtAppearance constants.

getBuildingBlockCategory()

public String getBuildingBlockCategory()

Specifies category of building block for this SDT node. Can not be null .

Accessing this property will only work for SdtType.BUILDING_BLOCK_GALLERY and SdtType.DOC_PART_OBJ SDT types. It is read-only for SDT of the document part type.

For all other SDT types exception will occur.

Returns: java.lang.String - The corresponding java.lang.String value.

getBuildingBlockGallery()

public String getBuildingBlockGallery()

Specifies type of building block for this SDT. Can not be null .

Accessing this property will only work for SdtType.BUILDING_BLOCK_GALLERY and SdtType.DOC_PART_OBJ SDT types. It is read-only for SDT of the document part type.

For all other SDT types exception will occur.

Returns: java.lang.String - The corresponding java.lang.String value.

getCalendarType()

public int getCalendarType()

Specifies the type of calendar for this SDT. Default is SdtCalendarType.DEFAULT

Accessing this property will only work for SdtType.DATE SDT type.

For all other SDT types exception will occur.

Returns: int - The corresponding int value. The returned value is one of SdtCalendarType constants.

getChecked()

public boolean getChecked()

Gets/Sets current state of the Checkbox SDT. Default value for this property is false .

Accessing this property will only work for SdtType.CHECKBOX SDT types.

For all other SDT types exception will occur.

Returns: boolean - The corresponding boolean value.

getChild(int nodeType, int index, boolean isDeep)

public Node getChild(int nodeType, int index, boolean isDeep)

Parameters:

Parameter Type Description
nodeType int
index int
isDeep boolean

Returns: Node

getChildNodes()

public NodeCollection getChildNodes()

Gets all immediate child nodes of this node.

Note, getChildNodes() is equivalent to calling M:Aspose.Words.CompositeNode.GetChildNodes(Aspose.Words.NodeType,System.Boolean) with arguments ( NodeType.ANY, false ) and creates and returns a new collection every time it is accessed.

If there are no child nodes, this property returns an empty collection.

Returns: NodeCollection - All immediate child nodes of this node.

getChildNodes(int nodeType, boolean isDeep)

public NodeCollection getChildNodes(int nodeType, boolean isDeep)

Parameters:

Parameter Type Description
nodeType int
isDeep boolean

Returns: NodeCollection

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getColor()

public Color getColor()

Gets the color of the structured document tag.

Returns: java.awt.Color - The color of the structured document tag.

getContainer()

public CompositeNode getContainer()

Returns: CompositeNode

getContentsFont()

public Font getContentsFont()

Font formatting that will be applied to text entered into SDT.

Returns: Font - The corresponding Font value.

getCount()

public int getCount()

Gets the number of immediate children of this node.

Returns: int - The number of immediate children of this node.

getCurrentNode()

public Node getCurrentNode()

Returns: Node

getCustomNodeId()

public int getCustomNodeId()

Specifies custom node identifier.

Default is zero.

This identifier can be set and used arbitrarily. For example, as a key to get external data.

Important note, specified value is not saved to an output file and exists only during the node lifetime.

Returns: int - The corresponding int value.

getDateDisplayFormat()

public String getDateDisplayFormat()

String that represents the format in which dates are displayed. Can not be null . The dates for English (U.S.) is “mm/dd/yyyy”

Accessing this property will only work for SdtType.DATE SDT type.

For all other SDT types exception will occur.

Returns: java.lang.String - The corresponding java.lang.String value.

getDateDisplayLocale()

public int getDateDisplayLocale()

Allows to set/get the language format for the date displayed in this SDT.

Accessing this property will only work for SdtType.DATE SDT type.

For all other SDT types exception will occur.

Returns: int - The corresponding int value.

getDateStorageFormat()

public int getDateStorageFormat()

Gets/sets format in which the date for a date SDT is stored when the SDT is bound to an XML node in the document’s data store. Default value is SdtDateStorageFormat.DATE_TIME

Accessing this property will only work for SdtType.DATE SDT type.

For all other SDT types exception will occur.

Returns: int - The corresponding int value. The returned value is one of SdtDateStorageFormat constants.

getDirectRunAttr(int key)

public Object getDirectRunAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

getDirectRunAttr(int key, int revisionsView)

public Object getDirectRunAttr(int key, int revisionsView)

Parameters:

Parameter Type Description
key int
revisionsView int

Returns: java.lang.Object

getDocument()

public DocumentBase getDocument()

Gets the document to which this node belongs.

The node always belongs to a document even if it has just been created and not yet added to the tree, or if it has been removed from the tree.

Returns: DocumentBase - The document to which this node belongs.

getEndCharacterFont()

public Font getEndCharacterFont()

Font formatting that will be applied to the last character of text entered into SDT.

Returns: Font - The corresponding Font value.

getFirstChild()

public Node getFirstChild()

Gets the first child of the node. If there is no first child node, a null is returned.

Returns: Node - The first child of the node.

getFullDate()

public Date getFullDate()

Specifies the full date and time last entered into this SDT.

Accessing this property will only work for SdtType.DATE SDT type.

For all other SDT types exception will occur.

Returns: java.util.Date - The corresponding java.util.Date value.

getId()

public int getId()

Specifies a unique read-only persistent numerical Id for this SDT.

Id attribute shall follow these rules:

  • The document shall retain SDT ids only if the whole document is cloned Document.deepClone().
  • During DocumentBase.importNode(com.aspose.words.Node, boolean) Id shall be retained if import does not cause conflicts with other SDT Ids in the target document.
  • If multiple SDT nodes specify the same decimal number value for the Id attribute, then the first SDT in the document shall maintain this original Id, and all subsequent SDT nodes shall have new identifiers assigned to them when the document is loaded.
  • During standalone SDT M:Aspose.Words.Markup.StructuredDocumentTag.Clone(System.Boolean,Aspose.Words.INodeCloningListener) operation new unique ID will be generated for the cloned SDT node.
  • If Id is not specified in the source document, then the SDT node shall have a new unique identifier assigned to it when the document is loaded.

Returns: int - The corresponding int value.

getLastChild()

public Node getLastChild()

Gets the last child of the node. If there is no last child node, a null is returned.

Returns: Node - The last child of the node.

getLevel()

public int getLevel()

Gets the level at which this SDT occurs in the document tree.

Returns: int - The level at which this SDT occurs in the document tree. The returned value is one of MarkupLevel constants.

getLevel_IMarkupNode()

public int getLevel_IMarkupNode()

Returns: int

getListItems()

public SdtListItemCollection getListItems()

Gets SdtListItemCollection associated with this SDT.

Accessing this property will only work for SdtType.COMBO_BOX or SdtType.DROP_DOWN_LIST SDT types.

For all other SDT types exception will occur.

Returns: SdtListItemCollection - {SdtListItemCollection associated with this SDT.

getLockContentControl()

public boolean getLockContentControl()

When set to true , this property will prohibit a user from deleting this SDT.

Returns: boolean - The corresponding boolean value.

getLockContents()

public boolean getLockContents()

When set to true , this property will prohibit a user from editing the contents of this SDT.

Returns: boolean - The corresponding boolean value.

getMultiline()

public boolean getMultiline()

Specifies whether this SDT allows multiple lines of text.

Accessing this property will only work for SdtType.RICH_TEXT and SdtType.PLAIN_TEXT SDT type.

For all other SDT types exception will occur.

Returns: boolean - The corresponding boolean value.

getNextMatchingNode(Node curNode)

public Node getNextMatchingNode(Node curNode)

Parameters:

Parameter Type Description
curNode Node

Returns: Node

getNextSibling()

public Node getNextSibling()

Gets the node immediately following this node. If there is no next node, a null is returned.

Returns: Node - The node immediately following this node.

getNodeType()

public int getNodeType()

Returns NodeType.STRUCTURED_DOCUMENT_TAG.

Returns: int - {NodeType.STRUCTURED_DOCUMENT_TAG. The returned value is one of NodeType constants.

getParentNode()

public CompositeNode getParentNode()

Gets the immediate parent of this node.

If a node has just been created and not yet added to the tree, or if it has been removed from the tree, the parent is null .

Returns: CompositeNode - The immediate parent of this node.

getPlaceholder()

public BuildingBlock getPlaceholder()

Gets the BuildingBlock containing placeholder text which should be displayed when this SDT run contents are empty, the associated mapped XML element is empty as specified via the getXmlMapping() element or the isShowingPlaceholderText() / isShowingPlaceholderText(boolean) element is true . Can be null , meaning that the placeholder is not applicable for this Sdt.

Returns: BuildingBlock - The BuildingBlock containing placeholder text which should be displayed when this SDT run contents are empty, the associated mapped XML element is empty as specified via the getXmlMapping() element or the isShowingPlaceholderText() / isShowingPlaceholderText(boolean) element is true .

getPlaceholderName()

public String getPlaceholderName()

Gets or sets Name of the BuildingBlock containing placeholder text.

BuildingBlock with this name BuildingBlock.getName() / BuildingBlock.setName(java.lang.String) has to be present in the Document.getGlossaryDocument() / Document.setGlossaryDocument(com.aspose.words.GlossaryDocument) otherwise java.lang.IllegalStateException will occur.

Returns: java.lang.String - The corresponding java.lang.String value.

getPreviousSibling()

public Node getPreviousSibling()

Gets the node immediately preceding this node. If there is no preceding node, a null is returned.

Returns: Node - The node immediately preceding this node.

getRange()

public Range getRange()

Returns a Range object that represents the portion of a document that is contained in this node.

Returns: Range - A Range object that represents the portion of a document that is contained in this node.

getSdtType()

public int getSdtType()

Gets type of this Structured document tag.

Returns: int - Type of this Structured document tag. The returned value is one of SdtType constants.

getStyle()

public Style getStyle()

Gets the Style of the structured document tag. Only StyleType.CHARACTER style or StyleType.PARAGRAPH style with linked character style can be set.

Returns: Style - The Style of the structured document tag.

getStyleName()

public String getStyleName()

Gets the name of the style applied to the structured document tag.

Returns: java.lang.String - The name of the style applied to the structured document tag.

getTag()

public String getTag()

Specifies a tag associated with the current SDT node. Can not be null . A tag is an arbitrary string which applications can associate with SDT in order to identify it without providing a visible friendly name.

Returns: java.lang.String - The corresponding java.lang.String value.

getText()

public String getText()

Gets the text of this node and of all its children.

The returned string includes all control and special characters as described in ControlChar.

Returns: java.lang.String

getTitle()

public String getTitle()

Specifies the friendly name associated with this SDT. Can not be null .

Returns: java.lang.String - The corresponding java.lang.String value.

getWordOpenXML()

public String getWordOpenXML()

Gets a string that represents the XML contained within the node in the SaveFormat.FLAT_OPC format.

Returns: java.lang.String - A string that represents the XML contained within the node in the SaveFormat.FLAT_OPC format.

getXmlMapping()

public XmlMapping getXmlMapping()

Gets an object that represents the mapping of this structured document tag to XML data in a custom XML part of the current document. You can use the XmlMapping.setMapping(com.aspose.words.CustomXmlPart, java.lang.String, java.lang.String) method of this object to map a structured document tag to XML data.

Returns: XmlMapping - An object that represents the mapping of this structured document tag to XML data in a custom XML part of the current document.

hasChildNodes()

public boolean hasChildNodes()

Returns true if this node has any child nodes.

Returns: boolean - { true if this node has any child nodes.

hashCode()

public native int hashCode()

Returns: int

indexOf(Node child)

public int indexOf(Node child)

Returns the index of the specified child node in the child node array. Returns -1 if the node is not found in the child nodes.

Parameters:

Parameter Type Description
child Node

Returns: int

insertAfter(Node newChild, Node refChild)

public Node insertAfter(Node newChild, Node refChild)

Inserts the specified node immediately after the specified reference node.

If refChild is null , inserts newChild at the beginning of the list of child nodes.

If the newChild is already in the tree, it is first removed.

If the node being inserted was created from another document, you should use M:Aspose.Words.DocumentBase.ImportNode(Aspose.Words.Node,System.Boolean,Aspose.Words.ImportFormatMode) to import the node to the current document. The imported node can then be inserted into the current document.

Parameters:

Parameter Type Description
newChild Node The Node to insert.
refChild Node The Node that is the reference node. The newChild is placed after the refChild .

Returns: Node - The inserted node.

insertBefore(Node newChild, Node refChild)

public Node insertBefore(Node newChild, Node refChild)

Inserts the specified node immediately before the specified reference node.

If refChild is null , inserts newChild at the end of the list of child nodes.

If the newChild is already in the tree, it is first removed.

If the node being inserted was created from another document, you should use M:Aspose.Words.DocumentBase.ImportNode(Aspose.Words.Node,System.Boolean,Aspose.Words.ImportFormatMode) to import the node to the current document. The imported node can then be inserted into the current document.

Parameters:

Parameter Type Description
newChild Node The Node to insert.
refChild Node The Node that is the reference node. The newChild is placed before this node.

Returns: Node - The inserted node.

isComposite()

public boolean isComposite()

Returns true as this node can have child nodes.

Returns: boolean - { true as this node can have child nodes.

isRanged()

public boolean isRanged()

Returns true if this instance is a ranged structured document tag.

Returns: boolean

isShowingPlaceholderText()

public boolean isShowingPlaceholderText()

Specifies whether the content of this SDT shall be interpreted to contain placeholder text (as opposed to regular text contents within the SDT).

if set to true , this state shall be resumed (showing placeholder text) upon opening this document.

Returns: boolean - The corresponding boolean value.

isShowingPlaceholderText(boolean value)

public void isShowingPlaceholderText(boolean value)

Specifies whether the content of this SDT shall be interpreted to contain placeholder text (as opposed to regular text contents within the SDT).

if set to true , this state shall be resumed (showing placeholder text) upon opening this document.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

isTemporary()

public boolean isTemporary()

Specifies whether this SDT shall be removed from the WordProcessingML document when its contents are modified.

Returns: boolean - The corresponding boolean value.

isTemporary(boolean value)

public void isTemporary(boolean value)

Specifies whether this SDT shall be removed from the WordProcessingML document when its contents are modified.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

iterator()

public Iterator iterator()

Provides support for the for each style iteration over the child nodes of this node.

Returns: java.util.Iterator

nextPreOrder(Node rootNode)

public Node nextPreOrder(Node rootNode)

Gets next node according to the pre-order tree traversal algorithm.

Parameters:

Parameter Type Description
rootNode Node The top node (limit) of traversal.

Returns: Node - Next node in pre-order order. Null if reached the rootNode .

nodeTypeToString(int nodeType)

public static String nodeTypeToString(int nodeType)

Parameters:

Parameter Type Description
nodeType int

Returns: java.lang.String

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

prependChild(Node newChild)

public Node prependChild(Node newChild)

Adds the specified node to the beginning of the list of child nodes for this node.

If the newChild is already in the tree, it is first removed.

If the node being inserted was created from another document, you should use M:Aspose.Words.DocumentBase.ImportNode(Aspose.Words.Node,System.Boolean,Aspose.Words.ImportFormatMode) to import the node to the current document. The imported node can then be inserted into the current document.

Parameters:

Parameter Type Description
newChild Node The node to add.

Returns: Node - The node added.

previousPreOrder(Node rootNode)

public Node previousPreOrder(Node rootNode)

Gets the previous node according to the pre-order tree traversal algorithm.

Parameters:

Parameter Type Description
rootNode Node The top node (limit) of traversal.

Returns: Node - Previous node in pre-order order. Null if reached the rootNode .

remove()

public void remove()

Removes itself from the parent.

removeAllChildren()

public void removeAllChildren()

Removes all the child nodes of the current node.

removeChild(Node oldChild)

public Node removeChild(Node oldChild)

Removes the specified child node.

The parent of oldChild is set to null after the node is removed.

Parameters:

Parameter Type Description
oldChild Node The node to remove.

Returns: Node - The removed node.

removeMoveRevisions()

public void removeMoveRevisions()

removeRunAttr(int key)

public void removeRunAttr(int key)

Parameters:

Parameter Type Description
key int

removeSelfOnly()

public void removeSelfOnly()

Removes just this SDT node itself, but keeps the content of it inside the document tree.

removeSmartTags()

public void removeSmartTags()

Removes all SmartTag descendant nodes of the current node. This method does not remove the content of the smart tags.

selectNodes(String xpath)

public NodeList selectNodes(String xpath)

Selects a list of nodes matching the XPath expression.

Only expressions with element names are supported at the moment. Expressions that use attribute names are not supported.

Parameters:

Parameter Type Description
xpath java.lang.String The XPath expression.

Returns: NodeList - A list of nodes matching the XPath query.

selectSingleNode(String xpath)

public Node selectSingleNode(String xpath)

Selects the first Node that matches the XPath expression.

Only expressions with element names are supported at the moment. Expressions that use attribute names are not supported.

Parameters:

Parameter Type Description
xpath java.lang.String The XPath expression.

Returns: Node - The first Node that matches the XPath query or null if no matching node is found.

setAppearance(int value)

public void setAppearance(int value)

Gets/sets the appearance of a structured document tag.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of SdtAppearance constants.

setBuildingBlockCategory(String value)

public void setBuildingBlockCategory(String value)

Specifies category of building block for this SDT node. Can not be null .

Accessing this property will only work for SdtType.BUILDING_BLOCK_GALLERY and SdtType.DOC_PART_OBJ SDT types. It is read-only for SDT of the document part type.

For all other SDT types exception will occur.

Parameters:

Parameter Type Description
value java.lang.String The corresponding java.lang.String value.

setBuildingBlockGallery(String value)

public void setBuildingBlockGallery(String value)

Specifies type of building block for this SDT. Can not be null .

Accessing this property will only work for SdtType.BUILDING_BLOCK_GALLERY and SdtType.DOC_PART_OBJ SDT types. It is read-only for SDT of the document part type.

For all other SDT types exception will occur.

Parameters:

Parameter Type Description
value java.lang.String The corresponding java.lang.String value.

setCalendarType(int value)

public void setCalendarType(int value)

Specifies the type of calendar for this SDT. Default is SdtCalendarType.DEFAULT

Accessing this property will only work for SdtType.DATE SDT type.

For all other SDT types exception will occur.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of SdtCalendarType constants.

setChecked(boolean value)

public void setChecked(boolean value)

Gets/Sets current state of the Checkbox SDT. Default value for this property is false .

Accessing this property will only work for SdtType.CHECKBOX SDT types.

For all other SDT types exception will occur.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setCheckedSymbol(int characterCode, String fontName)

public void setCheckedSymbol(int characterCode, String fontName)

Sets the symbol used to represent the checked state of a check box content control.

Parameters:

Parameter Type Description
characterCode int The character code for the specified symbol.
fontName java.lang.String The name of the font that contains the symbol.

Accessing this method will only work for SdtType.CHECKBOX SDT types.

For all other SDT types exception will occur. |

setColor(Color value)

public void setColor(Color value)

Sets the color of the structured document tag.

Parameters:

Parameter Type Description
value java.awt.Color The color of the structured document tag.

setCustomNodeId(int value)

public void setCustomNodeId(int value)

Specifies custom node identifier.

Default is zero.

This identifier can be set and used arbitrarily. For example, as a key to get external data.

Important note, specified value is not saved to an output file and exists only during the node lifetime.

Parameters:

Parameter Type Description
value int The corresponding int value.

setDateDisplayFormat(String value)

public void setDateDisplayFormat(String value)

String that represents the format in which dates are displayed. Can not be null . The dates for English (U.S.) is “mm/dd/yyyy”

Accessing this property will only work for SdtType.DATE SDT type.

For all other SDT types exception will occur.

Parameters:

Parameter Type Description
value java.lang.String The corresponding java.lang.String value.

setDateDisplayLocale(int value)

public void setDateDisplayLocale(int value)

Allows to set/get the language format for the date displayed in this SDT.

Accessing this property will only work for SdtType.DATE SDT type.

For all other SDT types exception will occur.

Parameters:

Parameter Type Description
value int The corresponding int value.

setDateStorageFormat(int value)

public void setDateStorageFormat(int value)

Gets/sets format in which the date for a date SDT is stored when the SDT is bound to an XML node in the document’s data store. Default value is SdtDateStorageFormat.DATE_TIME

Accessing this property will only work for SdtType.DATE SDT type.

For all other SDT types exception will occur.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of SdtDateStorageFormat constants.

setFullDate(Date value)

public void setFullDate(Date value)

Specifies the full date and time last entered into this SDT.

Accessing this property will only work for SdtType.DATE SDT type.

For all other SDT types exception will occur.

Parameters:

Parameter Type Description
value java.util.Date The corresponding java.util.Date value.

setLockContentControl(boolean value)

public void setLockContentControl(boolean value)

When set to true , this property will prohibit a user from deleting this SDT.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setLockContents(boolean value)

public void setLockContents(boolean value)

When set to true , this property will prohibit a user from editing the contents of this SDT.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setMultiline(boolean value)

public void setMultiline(boolean value)

Specifies whether this SDT allows multiple lines of text.

Accessing this property will only work for SdtType.RICH_TEXT and SdtType.PLAIN_TEXT SDT type.

For all other SDT types exception will occur.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setPlaceholderName(String value)

public void setPlaceholderName(String value)

Gets or sets Name of the BuildingBlock containing placeholder text.

BuildingBlock with this name BuildingBlock.getName() / BuildingBlock.setName(java.lang.String) has to be present in the Document.getGlossaryDocument() / Document.setGlossaryDocument(com.aspose.words.GlossaryDocument) otherwise java.lang.IllegalStateException will occur.

Parameters:

Parameter Type Description
value java.lang.String The corresponding java.lang.String value.

setRunAttr(int key, Object value)

public void setRunAttr(int key, Object value)

Parameters:

Parameter Type Description
key int
value java.lang.Object

setStyle(Style value)

public void setStyle(Style value)

Sets the Style of the structured document tag. Only StyleType.CHARACTER style or StyleType.PARAGRAPH style with linked character style can be set.

Parameters:

Parameter Type Description
value Style The Style of the structured document tag.

setStyleName(String value)

public void setStyleName(String value)

Sets the name of the style applied to the structured document tag.

Parameters:

Parameter Type Description
value java.lang.String The name of the style applied to the structured document tag.

setTag(String value)

public void setTag(String value)

Specifies a tag associated with the current SDT node. Can not be null . A tag is an arbitrary string which applications can associate with SDT in order to identify it without providing a visible friendly name.

Parameters:

Parameter Type Description
value java.lang.String The corresponding java.lang.String value.

setTitle(String value)

public void setTitle(String value)

Specifies the friendly name associated with this SDT. Can not be null .

Parameters:

Parameter Type Description
value java.lang.String The corresponding java.lang.String value.

setUncheckedSymbol(int characterCode, String fontName)

public void setUncheckedSymbol(int characterCode, String fontName)

Sets the symbol used to represent the unchecked state of a check box content control.

Parameters:

Parameter Type Description
characterCode int The character code for the specified symbol.
fontName java.lang.String The name of the font that contains the symbol.

Accessing this method will only work for SdtType.CHECKBOX SDT types.

For all other SDT types exception will occur. |

structuredDocumentTagNode()

public Node structuredDocumentTagNode()

Returns Node object that implements this interface.

Returns: Node

toString()

public String toString()

Returns: java.lang.String

toString(SaveOptions saveOptions)

public String toString(SaveOptions saveOptions)

Exports the content of the node into a string using the specified save options.

Parameters:

Parameter Type Description
saveOptions SaveOptions Specifies the options that control how the node is saved.

Returns: java.lang.String - The content of the node in the specified format.

toString(int saveFormat)

public String toString(int saveFormat)

Parameters:

Parameter Type Description
saveFormat int

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int