Class BindingHyperlinkResolver

java.lang.Object
org.docx4j.model.datastorage.BindingHyperlinkResolver
Direct Known Subclasses:
BindingHyperlinkResolverForOpenAPI3

public class BindingHyperlinkResolver extends Object
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 Details

    • BindingHyperlinkResolver

      public BindingHyperlinkResolver()
  • Method Details

    • setHyperlinkStyle

      public void setHyperlinkStyle(String hyperlinkStyleID)
    • getHyperlinkStyleId

      public String getHyperlinkStyleId()
    • getIndexOfURL

      public int getIndexOfURL(String text)
      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

      public void activateHyperlinkStyle(WordprocessingMLPackage wordMLPackage)
      Enable the hyperlinkStyle in the docx.
      Parameters:
      wordMLPackage -
      hyperlinkStyleId -