au.id.jericho.lib.html

Class Config


public final class Config
extends java.lang.Object

Encapsulates global configuration properties which determine the behaviour of various functions.

All of the properties in this class are static, affecting all objects and threads. Multiple concurrent configurations are not possible.

Properties that relate to user agent compatibility issues are stored in instances of the Config.CompatibilityMode class. This allows all of the properties in the compatibility mode to be set as a block by setting the static CurrentCompatibilityMode property to a different instance.

See Also:
Config.CompatibilityMode

Nested Class Summary

static class
Config.CompatibilityMode
Represents a set of configuration parameters that relate to user agent compatibility issues.

Field Summary

static String
ColumnMultipleValueSeparator
Determines the string used to separate a single column's multiple values in the output of the FormFields.getColumnValues(Map) method.
static String
ColumnValueFalse
Determines the string that represents the value false in the output of the FormFields.getColumnValues(Map) method.
static String
ColumnValueTrue
Determines the string that represents the value true in the output of the FormFields.getColumnValues(Map) method.
static Config.CompatibilityMode
CurrentCompatibilityMode
Determines the currently active compatibility mode.
static boolean
IsApostropheEncoded
Determines whether apostrophes are encoded when calling the CharacterReference.encode(CharSequence) method.

Field Details

ColumnMultipleValueSeparator

public static String ColumnMultipleValueSeparator
Determines the string used to separate a single column's multiple values in the output of the FormFields.getColumnValues(Map) method.

The situation where a single column has multiple values only arises if FormField.getUserValueCount()>1 on the relevant form field, which usually indicates a poorly designed form.

The default value is "," (a comma, not including the quotes).

Must not be null.


ColumnValueFalse

public static String ColumnValueFalse

ColumnValueTrue

public static String ColumnValueTrue
Determines the string that represents the value true in the output of the FormFields.getColumnValues(Map) method.

The default value is "true" (without the quotes).

Must not be null.


CurrentCompatibilityMode

public static Config.CompatibilityMode CurrentCompatibilityMode
Determines the currently active compatibility mode.

The default setting is Config.CompatibilityMode.IE (MS Internet Explorer 6.0).

Must not be null.


IsApostropheEncoded

public static boolean IsApostropheEncoded
Determines whether apostrophes are encoded when calling the CharacterReference.encode(CharSequence) method.

A value of false means apostrophe (U+0027) characters are not encoded. The only time apostrophes need to be encoded is within an attribute value delimited by single quotes (apostrophes), so in most cases ignoring apostrophes is perfectly safe and enhances the readability of the source document.

Note that apostrophes are always encoded as a numeric character reference, never as the character entity reference CharacterEntityReference._apos '.

The default value is false.