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 Summary

    Constructors
    Constructor Description
    BindingHyperlinkResolver()  
  • Method Summary

    Modifier and Type Method Description
    void activateHyperlinkStyle​(WordprocessingMLPackage wordMLPackage)
    Enable the hyperlinkStyle in the docx.
    P.Hyperlink generateHyperlink​(java.lang.String relId, java.lang.String url)  
    java.lang.String getHyperlinkStyleId()  
    int getIndexOfURL​(java.lang.String text)
    Return the index of the position you wish to treat as a hyperlink.
    void setHyperlinkStyle​(java.lang.String hyperlinkStyleID)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BindingHyperlinkResolver

      public BindingHyperlinkResolver()
  • 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 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 -