Class BindingHyperlinkResolver

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

public class BindingHyperlinkResolver
extends java.lang.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

  • Method Details

    • setHyperlinkStyle

      public void setHyperlinkStyle​(java.lang.String hyperlinkStyleID)
    • getHyperlinkStyleId

      public java.lang.String getHyperlinkStyleId()
    • getIndexOfURL

      public int getIndexOfURL​(java.lang.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​(java.lang.String relId, java.lang.String url) throws javax.xml.bind.JAXBException
      Parameters:
      relId -
      url -
      Returns:
      Throws:
      javax.xml.bind.JAXBException
    • activateHyperlinkStyle

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