Package org.docx4j.model.datastorage
Class BindingHandler
java.lang.Object
org.docx4j.model.datastorage.BindingHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidapplyBindings(WordprocessingMLPackage wordMLPackage) Deprecated.voidapplyBindings(JaxbXmlPart part) static BindingHyperlinkResolverstatic StringDeprecated.static ValueInserterPlainTextprotected AtomicIntegervoidsetDomToXPathMap(DomToXPathMap domToXPathMap) static voidsetHyperlinkResolver(BindingHyperlinkResolver hyperlinkResolver) static voidsetHyperlinkStyle(String hyperlinkStyleID) Deprecated.voidsetStartingIdForNewBookmarks(AtomicInteger bookmarkId) Provide a way to set the starting bookmark ID number for the purposes of Binding Traverse.static voidsetValueInserterPlainText(ValueInserterPlainText valueInserterPlainText) Allow user to customise what is inserted into the document when the bind is performed.static StringxpathGetString(WordprocessingMLPackage pkg, Map<String, CustomXmlPart> customXmlDataStorageParts, String storeItemId, String xpath, String prefixMappings) Used by OpenDoPE handler, but not directly by bind.xslt anymore.static StringxpathGetString(WordprocessingMLPackage pkg, Map<String, CustomXmlPart> customXmlDataStorageParts, CTDataBinding db)
-
Field Details
-
CORE_PROPERTIES_STOREITEMID
- See Also:
-
EXTENDED_PROPERTIES_STOREITEMID
- See Also:
-
COVERPAGE_PROPERTIES_STOREITEMID
- See Also:
-
-
Constructor Details
-
BindingHandler
-
-
Method Details
-
setHyperlinkStyle
Deprecated.Configure, how the handler handles links found in Custom XML. If hyperlinkStyleId is set tonull, strings containing 'http://' or 'https://' are not converted to w:hyperlink. This is the default behavior. If hyperlinkStyleId is set to"someWordHyperlinkStyleName", strings containing 'http://' or 'https://' or or 'mailto:' are converted to w:hyperlink. The default Word hyperlink style name is "Hyperlink". Due to the architecture of this class, this is a static flag changing the behavior of all following calls toapplyBindings(org.docx4j.openpackaging.packages.WordprocessingMLPackage).- Parameters:
hyperlinkStyleID- The style to use for hyperlinks (eg Hyperlink)
-
getHyperlinkStyleId
Deprecated. -
getHyperlinkResolver
- Returns:
- the hyperlinkResolver
- Since:
- 3.0.0
-
setHyperlinkResolver
- Parameters:
hyperlinkResolver- the hyperlinkResolver to set- Since:
- 3.0.0
-
getValueInserterPlainText
-
setValueInserterPlainText
Allow user to customise what is inserted into the document when the bind is performed.- Parameters:
valueInserterPlainText-- Since:
- 6.0.1
-
setDomToXPathMap
-
setStartingIdForNewBookmarks
Provide a way to set the starting bookmark ID number for the purposes of Binding Traverse. For efficiency, user code needs to pass this value through from the previous stage (repeats/condition handing). If it isn't, the value will be calculated (less efficient). New bookmarks could be created from XHTML, or renumbered in Flat OPC XML (TODO).- Parameters:
bookmarkId-- Since:
- 3.2.1
-
initBookmarkIdStart
-
applyBindings
@Deprecated public static void applyBindings(WordprocessingMLPackage wordMLPackage) throws Docx4JException Deprecated.- Throws:
Docx4JException
-
applyBindings
- Throws:
Docx4JException
-
getXpathsMap
-
applyBindings
- Throws:
Docx4JException
-
xpathGetString
public static String xpathGetString(WordprocessingMLPackage pkg, Map<String, CustomXmlPart> customXmlDataStorageParts, CTDataBinding db) -
xpathGetString
public static String xpathGetString(WordprocessingMLPackage pkg, Map<String, CustomXmlPart> customXmlDataStorageParts, String storeItemId, String xpath, String prefixMappings) Used by OpenDoPE handler, but not directly by bind.xslt anymore. Not multiLine aware.- Parameters:
customXmlDataStorageParts-storeItemId-xpath-prefixMappings- a string such as "xmlns:ns0='http://schemas.medchart'"- Returns:
-