Class EntityArrays
java.lang.Object
org.apache.commons.text.translate.EntityArrays
Class holding various entity data for HTML and XML - generally for use with
the LookupTranslator.
All Maps are generated using
java.util.Collections.unmodifiableMap()
.- Since:
- 1.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Map<CharSequence,
CharSequence> A Map<CharSequence, CharSequence> to escape the apostrophe character to its XML character entity.static final Map<CharSequence,
CharSequence> Reverse ofAPOS_ESCAPE
for unescaping purposes.static final Map<CharSequence,
CharSequence> A Map<CharSequence, CharSequence> to escape the basic XML and HTML character entities.static final Map<CharSequence,
CharSequence> Reverse ofBASIC_ESCAPE
for unescaping purposes.static final Map<CharSequence,
CharSequence> A Map<CharSequence, CharSequence> to escape additional character entity references.static final Map<CharSequence,
CharSequence> Reverse ofHTML40_EXTENDED_ESCAPE
for unescaping purposes.static final Map<CharSequence,
CharSequence> A Map<CharSequence, CharSequence> to escape ISO-8859-1 characters to their named HTML 3.x equivalents.static final Map<CharSequence,
CharSequence> Reverse ofISO8859_1_ESCAPE
for unescaping purposes.static final Map<CharSequence,
CharSequence> A Map<CharSequence, CharSequence> to escape the Java control characters.static final Map<CharSequence,
CharSequence> Reverse ofJAVA_CTRL_CHARS_ESCAPE
for unescaping purposes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Map<CharSequence,
CharSequence> invert
(Map<CharSequence, CharSequence> map) Inverts an escape Map into an unescape Map.
-
Field Details
-
ISO8859_1_ESCAPE
A Map<CharSequence, CharSequence> to escape ISO-8859-1 characters to their named HTML 3.x equivalents. -
ISO8859_1_UNESCAPE
Reverse ofISO8859_1_ESCAPE
for unescaping purposes. -
HTML40_EXTENDED_ESCAPE
A Map<CharSequence, CharSequence> to escape additional character entity references. Note that this must be used withISO8859_1_ESCAPE
to get the full list of HTML 4.0 character entities. -
HTML40_EXTENDED_UNESCAPE
Reverse ofHTML40_EXTENDED_ESCAPE
for unescaping purposes. -
BASIC_ESCAPE
A Map<CharSequence, CharSequence> to escape the basic XML and HTML character entities. Namely:" & < >
-
BASIC_UNESCAPE
Reverse ofBASIC_ESCAPE
for unescaping purposes. -
APOS_ESCAPE
A Map<CharSequence, CharSequence> to escape the apostrophe character to its XML character entity. -
APOS_UNESCAPE
Reverse ofAPOS_ESCAPE
for unescaping purposes. -
JAVA_CTRL_CHARS_ESCAPE
A Map<CharSequence, CharSequence> to escape the Java control characters. Namely:\b \n \t \f \r
-
JAVA_CTRL_CHARS_UNESCAPE
Reverse ofJAVA_CTRL_CHARS_ESCAPE
for unescaping purposes.
-
-
Constructor Details
-
EntityArrays
public EntityArrays()
-
-
Method Details
-
invert
Inverts an escape Map into an unescape Map.- Parameters:
map
- Map<String, String> to be inverted- Returns:
- Map<String, String> inverted array
-