Package org.geotools.xs.facets
Class Length
Object
Length
length is the number of units of length, where units of length varies depending on the type that is being
???derived??? from.
The value of length ???must??? be a nonNegativeInteger. Length is defined as:
- string length is measured in units of characters
- anyURI length is measured in units of characters
- hexBinary and base64Binary length is measured in octets (8bits) on binary data
- list length is measured in number of list items
For string and datatypes ???derived??? from string, length will not always coincide with "string length" as perceived by some users or with the number of storage units in some digital representation. Therefore, care should be taken when specifying a value for length and in attempting to infer storage requirements from a given value for length.
Example:
<simpleType name='productCode'>
<restriction base='string'>
<length value='8' fixed='true'/>
</restriction>
</simpleType>
- Author:
- Jody Garnett
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Length
string and anyURI measured length is measured in units of charactersstatic final Length
By default this one understands Collection, Array and Integer.static final Length
hexBinary and base64Binary length is measured in octets (8bits) on binary data -
Method Summary
-
Field Details
-
CHARACTERS
string and anyURI measured length is measured in units of characters -
OCTETS
hexBinary and base64Binary length is measured in octets (8bits) on binary data -
LIST
By default this one understands Collection, Array and Integer.So if you are checking a custom object please pass in an Integer representing the size of your object.
-
-
Method Details
-
length
public int length(XSDTypeDefinition definition) -
validate
public abstract void validate(XSDTypeDefinition definition, Object value) throws IllegalArgumentException - Throws:
IllegalArgumentException
-