Class LinkURIBuilder

java.lang.Object
com.scroogexhtml.fields.LinkURIBuilder

public class LinkURIBuilder extends Object
Helper class which converts HYPERLINK field expressions to a document path (with an optional anchor).

Limitations: - the only extension conversion supported is ".rtf" to ".html"

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LinkURIBuilder(String fieldExpression)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Constructs an HTTP link from the HYPERLINK field expression.
    boolean
     
    boolean
    It is recommended to use only Latin letters, Arabic numerals (digits), hyphen (-), underscore (_) and dot (.) for anchors, to support as many HTML versions and web browsers as possible.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • LinkURIBuilder

      public LinkURIBuilder(String fieldExpression)
  • Method Details

    • isHyperlinkField

      public boolean isHyperlinkField()
    • isValidFragment

      public boolean isValidFragment()
      It is recommended to use only Latin letters, Arabic numerals (digits), hyphen (-), underscore (_) and dot (.) for anchors, to support as many HTML versions and web browsers as possible.
      Returns:
      true if the fragment string matches the regular expression [a-zA-Z0-9-_.]+
    • getHyperlinkTarget

      public String getHyperlinkTarget()
      Constructs an HTTP link from the HYPERLINK field expression.
      Returns:
      the HTTP link URL