Package org.geotools.xs.facets
Class Whitespace
Object
Whitespace
- All Implemented Interfaces:
Comparable<Whitespace>
Captures the whitespace facet.
Constants and utility method for old fashion facet goodness. See BooleanXOHandler for an example.
Here is an example use:
<simpleType name='token'>
<restriction base='normalizedString'>
<whiteSpace value='collapse'/>
</restriction>
</simpleType>
- Since:
- 1.0.0
- Author:
- jgarnett
- See Also:
-
longing for Java 5 Enum construct
- This web page
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Whitespace
All occurrences of tab, line feed and carriage return are replaced with space.static final Whitespace
No normalization is done, the value is not changedstatic final Whitespace
All occurrences of tab, line feed and carriage return are replaced with space. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
clone()
int
compareTo
(Whitespace other) boolean
Returns the Class object corresponding to this enum constant's enum type.int
hashCode()
name()
int
ordinal()
abstract String
Handle whitespacestatic Whitespace
Returns the enum constant of the specified enum type with the specified name.static List
values()
-
Field Details
-
PRESERVE
No normalization is done, the value is not changedSimon the spec says: No normalization is done, the value is not changed (this is the behavior required by [XML 1.0 (Second Edition)] for element content)
-
REPLACE
All occurrences of tab, line feed and carriage return are replaced with space.Simon the spec says: All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage return) are replaced with #x20 (space)
-
COLLAPSE
All occurrences of tab, line feed and carriage return are replaced with space.Simon the spec says: All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage return) are replaced with #x20 (space)
-
-
Method Details
-
preparse
Handle whitespace -
name
-
ordinal
public int ordinal() -
hashCode
public int hashCode() -
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Whitespace>
-
valueOf
Returns the enum constant of the specified enum type with the specified name. The name must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.) -
getDeclaringClass
Returns the Class object corresponding to this enum constant's enum type.- Returns:
- Whitespace.class
-
values
-