Package org.docx4j.model.datastorage
Class BindingHandler
java.lang.Object
org.docx4j.model.datastorage.BindingHandler
public class BindingHandler
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCORE_PROPERTIES_STOREITEMIDstatic java.lang.StringCOVERPAGE_PROPERTIES_STOREITEMIDstatic java.lang.StringEXTENDED_PROPERTIES_STOREITEMID -
Constructor Summary
Constructors Constructor Description BindingHandler(WordprocessingMLPackage wordMLPackage) -
Method Summary
Modifier and Type Method Description voidapplyBindings()static voidapplyBindings(WordprocessingMLPackage wordMLPackage)Deprecated.voidapplyBindings(JaxbXmlPart part)static BindingHyperlinkResolvergetHyperlinkResolver()static java.lang.StringgetHyperlinkStyleId()Deprecated.static ValueInserterPlainTextgetValueInserterPlainText()java.util.Map<java.lang.String,Xpaths.Xpath>getXpathsMap()protected java.util.concurrent.atomic.AtomicIntegerinitBookmarkIdStart()voidsetDomToXPathMap(DomToXPathMap domToXPathMap)static voidsetHyperlinkResolver(BindingHyperlinkResolver hyperlinkResolver)static voidsetHyperlinkStyle(java.lang.String hyperlinkStyleID)Deprecated.voidsetStartingIdForNewBookmarks(java.util.concurrent.atomic.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 java.lang.StringxpathGetString(WordprocessingMLPackage pkg, java.util.Map<java.lang.String,CustomXmlPart> customXmlDataStorageParts, java.lang.String storeItemId, java.lang.String xpath, java.lang.String prefixMappings)Used by OpenDoPE handler, but not directly by bind.xslt anymore.static java.lang.StringxpathGetString(WordprocessingMLPackage pkg, java.util.Map<java.lang.String,CustomXmlPart> customXmlDataStorageParts, CTDataBinding db)
-
Field Details
-
CORE_PROPERTIES_STOREITEMID
public static final java.lang.String CORE_PROPERTIES_STOREITEMID- See Also:
- Constant Field Values
-
EXTENDED_PROPERTIES_STOREITEMID
public static final java.lang.String EXTENDED_PROPERTIES_STOREITEMID- See Also:
- Constant Field Values
-
COVERPAGE_PROPERTIES_STOREITEMID
public static final java.lang.String COVERPAGE_PROPERTIES_STOREITEMID- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
setHyperlinkStyle
public static void setHyperlinkStyle(java.lang.String hyperlinkStyleID)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
public static java.lang.String 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
public void setStartingIdForNewBookmarks(java.util.concurrent.atomic.AtomicInteger bookmarkId)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
protected java.util.concurrent.atomic.AtomicInteger initBookmarkIdStart() -
applyBindings
@Deprecated public static void applyBindings(WordprocessingMLPackage wordMLPackage) throws Docx4JExceptionDeprecated.- Throws:
Docx4JException
-
applyBindings
- Throws:
Docx4JException
-
getXpathsMap
-
applyBindings
- Throws:
Docx4JException
-
xpathGetString
public static java.lang.String xpathGetString(WordprocessingMLPackage pkg, java.util.Map<java.lang.String,CustomXmlPart> customXmlDataStorageParts, CTDataBinding db) -
xpathGetString
public static java.lang.String xpathGetString(WordprocessingMLPackage pkg, java.util.Map<java.lang.String,CustomXmlPart> customXmlDataStorageParts, java.lang.String storeItemId, java.lang.String xpath, java.lang.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:
-