Package org.geotools.xs.facets
Class Length
- Object
- 
- Length
 
- 
 public abstract class Length extends Object 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 SummaryFields Modifier and Type Field Description static LengthCHARACTERSstring and anyURI measured length is measured in units of charactersstatic LengthLISTBy default this one understands Collection, Array and Integer.static LengthOCTETShexBinary and base64Binary length is measured in octets (8bits) on binary data
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intlength(XSDTypeDefinition definition)abstract voidvalidate(XSDTypeDefinition definition, Object value)
 
- 
- 
- 
Field Detail- 
CHARACTERSpublic static final Length CHARACTERS string and anyURI measured length is measured in units of characters
 - 
OCTETSpublic static final Length OCTETS hexBinary and base64Binary length is measured in octets (8bits) on binary data
 - 
LISTpublic static final Length 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 Detail- 
lengthpublic int length(XSDTypeDefinition definition) 
 - 
validatepublic abstract void validate(XSDTypeDefinition definition, Object value) throws IllegalArgumentException- Throws:
- IllegalArgumentException
 
 
- 
 
-