Package adalid.commons.util
Class MarkupUtils
- java.lang.Object
-
- adalid.commons.util.MarkupUtils
-
public class MarkupUtils extends Object
- Author:
- Jorge Campins
-
-
Field Summary
Fields Modifier and Type Field Description static Stringaxstatic StringAXstatic Stringaystatic StringAYstatic Stringazstatic StringAZstatic Stringb1static StringB1static Stringb2static StringB2static Stringbbstatic Stringbrstatic StringBRstatic Stringbulletstatic StringBULLETstatic Stringcxstatic StringCXstatic Stringcystatic StringCYstatic Stringczstatic StringCZstatic Stringh1t1static StringH1T1static Stringh1t2static StringH1T2static Stringh2t1static StringH2T1static Stringh2t2static StringH2T2static Stringh3t1static StringH3T1static Stringh3t2static StringH3T2static Stringh4t1static StringH4T1static Stringh4t2static StringH4T2static Stringh5t1static StringH5T1static Stringh5t2static StringH5T2static Stringh6t1static StringH6T1static Stringh6t2static StringH6T2static Stringhhstatic Stringhtstatic StringHTstatic Stringi1static StringI1static Stringi2static StringI2static Stringiistatic StringLAQUOstatic Stringlilistatic StringLILIstatic Stringliulstatic StringLIULstatic Stringm1static StringM1static Stringm2static StringM2static Stringmiddotstatic StringMIDDOTstatic Stringnbspstatic StringNBSPstatic StringRAQUOstatic Strings1static StringS1static Strings2static StringS2static Stringssstatic Stringu1static StringU1static Stringu2static StringU2static Stringullistatic StringULLIstatic Stringuu
-
Constructor Summary
Constructors Constructor Description MarkupUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringa(String href, String text)This method builds an HTML<a>pseudo-tag, which defines a hyperlink.static Stringb(String string)This method builds an HTML<b>pseudo-tag, which defines bold text without any extra importance.static Stringb(String separator, String... strings)This method builds several HTML<b>pseudo-tags, separated byseparator.static booleancontainsHTML(String string)Returns true ifstringcontains HTML tags.static StringgetCreoleFormattedString(String string)Returnsstringreplacing the pseudo-tags with their corresponding Creole tags.static StringgetHtmlFormattedString(String string)Returnsstringreplacing the pseudo-tags with their corresponding HTML tags.static StringgetTextFormattedString(String string)Returnsstringremoving the pseudo-tags.static StringgetXhtmlFormattedString(String string)Returnsstringreplacing the pseudo-tags with their corresponding XHTML tags.static Stringh1(String string)This method builds an HTML<h1>pseudo-tag, which defines a level 1 heading.static Stringh2(String string)This method builds an HTML<h2>pseudo-tag, which defines a level 2 heading.static Stringh3(String string)This method builds an HTML<h3>pseudo-tag, which defines a level 3 heading.static Stringh4(String string)This method builds an HTML<h4>pseudo-tag, which defines a level 4 heading.static Stringh5(String string)This method builds an HTML<h5>pseudo-tag, which defines a level 5 heading.static Stringh6(String string)This method builds an HTML<h6>pseudo-tag, which defines a level 6 heading.static Stringi(String string)This method builds an HTML<i>pseudo-tag, which defines italic text.static Stringi(String separator, String... strings)This method builds several HTML<i>pseudo-tags, separated byseparator.static Stringic(String clazz)This method builds an HTML<i>pseudo-tag for a CSS class.static Stringic(String clazz, String text)This method builds an HTML<i>pseudo-tag, which defines text with a CSS class.static booleanisPseudoHTML(String string)Returns true ifstringcontains any of the HTML pseudo-tags.static Stringm(String string)This method builds an HTML<mark>pseudo-tag, which defines text that should be marked or highlighted.static Stringm(String separator, String... strings)This method builds several HTML<mark>pseudo-tags, separated byseparator.static Strings(String string)This method builds an HTML<del>pseudo-tag, which defines text that should be struck out.static Strings(String separator, String... strings)This method builds several HTML<del>pseudo-tags, separated byseparator.static Stringu(String string)This method builds an HTML<ins>pseudo-tag, which defines text that should be underlined.static Stringu(String separator, String... strings)This method builds several HTML<ins>pseudo-tags, separated byseparator.static Stringul(String... strings)This method builds anHTML <ul> pseudo-tag, which defines an unordered (bulleted) list.
-
-
-
Field Detail
-
AX
public static final String AX
- See Also:
- Constant Field Values
-
AY
public static final String AY
- See Also:
- Constant Field Values
-
AZ
public static final String AZ
- See Also:
- Constant Field Values
-
B1
public static final String B1
- See Also:
- Constant Field Values
-
B2
public static final String B2
- See Also:
- Constant Field Values
-
CX
public static final String CX
- See Also:
- Constant Field Values
-
CY
public static final String CY
- See Also:
- Constant Field Values
-
CZ
public static final String CZ
- See Also:
- Constant Field Values
-
I1
public static final String I1
- See Also:
- Constant Field Values
-
I2
public static final String I2
- See Also:
- Constant Field Values
-
M1
public static final String M1
- See Also:
- Constant Field Values
-
M2
public static final String M2
- See Also:
- Constant Field Values
-
S1
public static final String S1
- See Also:
- Constant Field Values
-
S2
public static final String S2
- See Also:
- Constant Field Values
-
U1
public static final String U1
- See Also:
- Constant Field Values
-
U2
public static final String U2
- See Also:
- Constant Field Values
-
H1T1
public static final String H1T1
- See Also:
- Constant Field Values
-
H1T2
public static final String H1T2
- See Also:
- Constant Field Values
-
H2T1
public static final String H2T1
- See Also:
- Constant Field Values
-
H2T2
public static final String H2T2
- See Also:
- Constant Field Values
-
H3T1
public static final String H3T1
- See Also:
- Constant Field Values
-
H3T2
public static final String H3T2
- See Also:
- Constant Field Values
-
H4T1
public static final String H4T1
- See Also:
- Constant Field Values
-
H4T2
public static final String H4T2
- See Also:
- Constant Field Values
-
H5T1
public static final String H5T1
- See Also:
- Constant Field Values
-
H5T2
public static final String H5T2
- See Also:
- Constant Field Values
-
H6T1
public static final String H6T1
- See Also:
- Constant Field Values
-
H6T2
public static final String H6T2
- See Also:
- Constant Field Values
-
BR
public static final String BR
- See Also:
- Constant Field Values
-
HT
public static final String HT
- See Also:
- Constant Field Values
-
ULLI
public static final String ULLI
- See Also:
- Constant Field Values
-
LILI
public static final String LILI
- See Also:
- Constant Field Values
-
LIUL
public static final String LIUL
- See Also:
- Constant Field Values
-
NBSP
public static final String NBSP
- See Also:
- Constant Field Values
-
LAQUO
public static final String LAQUO
- See Also:
- Constant Field Values
-
RAQUO
public static final String RAQUO
- See Also:
- Constant Field Values
-
BULLET
public static final String BULLET
- See Also:
- Constant Field Values
-
MIDDOT
public static final String MIDDOT
- See Also:
- Constant Field Values
-
bb
public static final String bb
- See Also:
- Constant Field Values
-
hh
public static final String hh
- See Also:
- Constant Field Values
-
ii
public static final String ii
- See Also:
- Constant Field Values
-
ss
public static final String ss
- See Also:
- Constant Field Values
-
uu
public static final String uu
- See Also:
- Constant Field Values
-
ax
public static final String ax
- See Also:
- Constant Field Values
-
ay
public static final String ay
- See Also:
- Constant Field Values
-
az
public static final String az
- See Also:
- Constant Field Values
-
b1
public static final String b1
- See Also:
- Constant Field Values
-
b2
public static final String b2
- See Also:
- Constant Field Values
-
br
public static final String br
- See Also:
- Constant Field Values
-
cx
public static final String cx
- See Also:
- Constant Field Values
-
cy
public static final String cy
- See Also:
- Constant Field Values
-
cz
public static final String cz
- See Also:
- Constant Field Values
-
ht
public static final String ht
-
i1
public static final String i1
- See Also:
- Constant Field Values
-
i2
public static final String i2
- See Also:
- Constant Field Values
-
m1
public static final String m1
- See Also:
- Constant Field Values
-
m2
public static final String m2
- See Also:
- Constant Field Values
-
s1
public static final String s1
- See Also:
- Constant Field Values
-
s2
public static final String s2
- See Also:
- Constant Field Values
-
u1
public static final String u1
- See Also:
- Constant Field Values
-
u2
public static final String u2
- See Also:
- Constant Field Values
-
h1t1
public static final String h1t1
- See Also:
- Constant Field Values
-
h1t2
public static final String h1t2
- See Also:
- Constant Field Values
-
h2t1
public static final String h2t1
- See Also:
- Constant Field Values
-
h2t2
public static final String h2t2
- See Also:
- Constant Field Values
-
h3t1
public static final String h3t1
- See Also:
- Constant Field Values
-
h3t2
public static final String h3t2
- See Also:
- Constant Field Values
-
h4t1
public static final String h4t1
- See Also:
- Constant Field Values
-
h4t2
public static final String h4t2
- See Also:
- Constant Field Values
-
h5t1
public static final String h5t1
- See Also:
- Constant Field Values
-
h5t2
public static final String h5t2
- See Also:
- Constant Field Values
-
h6t1
public static final String h6t1
- See Also:
- Constant Field Values
-
h6t2
public static final String h6t2
- See Also:
- Constant Field Values
-
ulli
public static final String ulli
- See Also:
- Constant Field Values
-
lili
public static final String lili
- See Also:
- Constant Field Values
-
liul
public static final String liul
- See Also:
- Constant Field Values
-
nbsp
public static final String nbsp
- See Also:
- Constant Field Values
-
bullet
public static final String bullet
- See Also:
- Constant Field Values
-
middot
public static final String middot
- See Also:
- Constant Field Values
-
-
Method Detail
-
isPseudoHTML
public static boolean isPseudoHTML(String string)
Returns true ifstringcontains any of the HTML pseudo-tags.- Parameters:
string- text to search for HTML pseudo-tags- Returns:
- true if
stringcontains any of the HTML pseudo-tags; otherwise false
-
containsHTML
public static boolean containsHTML(String string)
Returns true ifstringcontains HTML tags.- Parameters:
string- text to search for HTML pseudo-tags- Returns:
- true if
stringcontains HTML tags; otherwise false
-
a
public static String a(String href, String text)
This method builds an HTML<a>pseudo-tag, which defines a hyperlink.- Parameters:
href- Specifies the URL of the page the link goes totext- string to display instead of the URL- Returns:
- an HTML
<a>pseudo-tag
-
b
public static String b(String string)
This method builds an HTML<b>pseudo-tag, which defines bold text without any extra importance.- Parameters:
string- text to display in bold- Returns:
- an HTML
<b>pseudo-tag
-
b
public static String b(String separator, String... strings)
This method builds several HTML<b>pseudo-tags, separated byseparator.- Parameters:
separator- a text to separate the pseudo-tagsstrings- one or more texts to display in bold- Returns:
- several HTML
<b>pseudo-tags, separated byseparator.
-
ic
public static String ic(String clazz)
This method builds an HTML<i>pseudo-tag for a CSS class.- Parameters:
clazz- Specifies the CSS class- Returns:
- an HTML
<i>pseudo-tag
-
ic
public static String ic(String clazz, String text)
This method builds an HTML<i>pseudo-tag, which defines text with a CSS class.- Parameters:
clazz- Specifies the CSS classtext- string to display- Returns:
- an HTML
<i>pseudo-tag
-
i
public static String i(String string)
This method builds an HTML<i>pseudo-tag, which defines italic text.- Parameters:
string- text to display in italic- Returns:
- an HTML
<i>pseudo-tag
-
i
public static String i(String separator, String... strings)
This method builds several HTML<i>pseudo-tags, separated byseparator.- Parameters:
separator- a text to separate the pseudo-tagsstrings- one or more texts to display in italic- Returns:
- several HTML
<i>pseudo-tags, separated byseparator.
-
m
public static String m(String string)
This method builds an HTML<mark>pseudo-tag, which defines text that should be marked or highlighted.- Parameters:
string- text to be marked or highlighted- Returns:
- an HTML
<mark>pseudo-tag
-
m
public static String m(String separator, String... strings)
This method builds several HTML<mark>pseudo-tags, separated byseparator.- Parameters:
separator- a text to separate the pseudo-tagsstrings- one or more texts to be marked or highlighted- Returns:
- several HTML
<mark>pseudo-tags, separated byseparator.
-
s
public static String s(String string)
This method builds an HTML<del>pseudo-tag, which defines text that should be struck out.- Parameters:
string- text to be struck out- Returns:
- an HTML
<del>pseudo-tag
-
s
public static String s(String separator, String... strings)
This method builds several HTML<del>pseudo-tags, separated byseparator.- Parameters:
separator- a text to separate the pseudo-tagsstrings- one or more texts to be struck out- Returns:
- several HTML
<del>pseudo-tags, separated byseparator.
-
u
public static String u(String string)
This method builds an HTML<ins>pseudo-tag, which defines text that should be underlined.- Parameters:
string- text to be underlined- Returns:
- an HTML
<ins>pseudo-tag
-
u
public static String u(String separator, String... strings)
This method builds several HTML<ins>pseudo-tags, separated byseparator.- Parameters:
separator- a text to separate the pseudo-tagsstrings- one or more texts to be underlined- Returns:
- several HTML
<ins>pseudo-tags, separated byseparator.
-
ul
public static String ul(String... strings)
This method builds anHTML <ul> pseudo-tag, which defines an unordered (bulleted) list.- Parameters:
strings- one or more texts defining the list items- Returns:
- an
HTML <ul> pseudo-tag
-
h1
public static String h1(String string)
This method builds an HTML<h1>pseudo-tag, which defines a level 1 heading.- Parameters:
string- header text- Returns:
- an HTML
<h1>pseudo-tag
-
h2
public static String h2(String string)
This method builds an HTML<h2>pseudo-tag, which defines a level 2 heading.- Parameters:
string- header text- Returns:
- an HTML
<h2>pseudo-tag
-
h3
public static String h3(String string)
This method builds an HTML<h3>pseudo-tag, which defines a level 3 heading.- Parameters:
string- header text- Returns:
- an HTML
<h3>pseudo-tag
-
h4
public static String h4(String string)
This method builds an HTML<h4>pseudo-tag, which defines a level 4 heading.- Parameters:
string- header text- Returns:
- an HTML
<h4>pseudo-tag
-
h5
public static String h5(String string)
This method builds an HTML<h5>pseudo-tag, which defines a level 5 heading.- Parameters:
string- header text- Returns:
- an HTML
<h5>pseudo-tag
-
h6
public static String h6(String string)
This method builds an HTML<h6>pseudo-tag, which defines a level 6 heading.- Parameters:
string- header text- Returns:
- an HTML
<h6>pseudo-tag
-
getXhtmlFormattedString
public static String getXhtmlFormattedString(String string)
Returnsstringreplacing the pseudo-tags with their corresponding XHTML tags.- Parameters:
string- text to search and replace the pseudo-tags- Returns:
stringwith XHTML tags
-
getHtmlFormattedString
public static String getHtmlFormattedString(String string)
Returnsstringreplacing the pseudo-tags with their corresponding HTML tags.- Parameters:
string- text to search and replace the pseudo-tags- Returns:
stringwith HTML tags
-
getCreoleFormattedString
public static String getCreoleFormattedString(String string)
Returnsstringreplacing the pseudo-tags with their corresponding Creole tags.- Parameters:
string- text to search and replace the pseudo-tags- Returns:
stringwith Creole tags
-
-