Package org.docx4j.model.datastorage
Class BindingHyperlinkResolver
java.lang.Object
org.docx4j.model.datastorage.BindingHyperlinkResolver
- Direct Known Subclasses:
BindingHyperlinkResolverForOpenAPI3
Override this class if you want to customise hyperlink handling.
You can override what is recognised as a URL, and how that is
converted into a hyperlink.
- Since:
- 3.0.0
- Author:
- jharrop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateHyperlinkStyle(WordprocessingMLPackage wordMLPackage) Enable the hyperlinkStyle in the docx.generateHyperlink(String relId, String url) intgetIndexOfURL(String text) Return the index of the position you wish to treat as a hyperlink.voidsetHyperlinkStyle(String hyperlinkStyleID)
-
Constructor Details
-
BindingHyperlinkResolver
public BindingHyperlinkResolver()
-
-
Method Details
-
setHyperlinkStyle
-
getHyperlinkStyleId
-
getIndexOfURL
Return the index of the position you wish to treat as a hyperlink. The characters from there to the first whitespace following will be treated as the URL- Parameters:
text-- Returns:
-
generateHyperlink
public P.Hyperlink generateHyperlink(String relId, String url) throws jakarta.xml.bind.JAXBException - Parameters:
relId-url-- Returns:
- Throws:
jakarta.xml.bind.JAXBException
-
activateHyperlinkStyle
Enable the hyperlinkStyle in the docx.- Parameters:
wordMLPackage-hyperlinkStyleId-
-