XSAnyURI
, XSBase64Binary
, XSHexBinary
, XSId
, XSIdRef
, XSNCName
, XSNMToken
, XSNormalizedString
, XSQName
, XSString
public abstract class AbstractLengthFacet extends AbstractWhiteSpaceFacet
ANYURI_TYPE, BASE64BINARY_TYPE, BOOLEAN_TYPE, BYTE_TYPE, CLASS, COLLECTION, DATE_TYPE, DATETIME_TYPE, DECIMAL_TYPE, DOUBLE_TYPE, DURATION_TYPE, ENTITIES, ENTITY, FLOAT_TYPE, GDAY_TYPE, GMONTH_TYPE, GMONTHDAY_TYPE, GYEAR_TYPE, GYEARMONTH_TYPE, HEXBINARY_TYPE, ID_TYPE, IDREF_TYPE, IDREFS_TYPE, INT_TYPE, INTEGER_TYPE, LANGUAGE_TYPE, LONG_TYPE, NAME_TYPE, NCNAME_TYPE, NEGATIVE_INTEGER_TYPE, NMTOKEN_TYPE, NMTOKENS_TYPE, NON_NEGATIVE_INTEGER_TYPE, NON_POSITIVE_INTEGER_TYPE, NORMALIZEDSTRING_TYPE, NOTATION_TYPE, NULL, POSITIVE_INTEGER_TYPE, QNAME_TYPE, SHORT_TYPE, STRING_TYPE, TIME_TYPE, TOKEN_TYPE, UNSIGNED_BYTE_TYPE, UNSIGNED_INT_TYPE, UNSIGNED_LONG_TYPE, UNSIGNED_SHORT_TYPE
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractLengthFacet() |
No-arg constructor.
|
protected |
AbstractLengthFacet(boolean whiteSpaceCollapseOnly) |
Construct a new AbstractXSLengthFacet optionally allowing the whiteSpace facet to be set
to 'replace' and 'preserve' values in addition to 'collaps'.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
codeLengthFacet(JSourceCode jsc,
java.lang.String validatorName) |
Generate the source code for length, maxLength or minLength facets validation.
|
int |
getLength() |
Returns the length that this type must have.
|
int |
getMaxLength() |
Returns the maximum length occurances of this type can be.
|
int |
getMinLength() |
Returns the minimum length occurances of this type can be.
|
boolean |
hasLength() |
Returns true if a length has been set.
|
boolean |
hasMaxLength() |
Returns true if a maximum length has been set.
|
boolean |
hasMinLength() |
Returns true if a minimum length has been set.
|
protected void |
setFacet(Facet facet) |
Set the given facet for XSType if applicable.
|
void |
setLength(int length) |
Sets the length of this type.
|
protected void |
setLengthFacet(Facet facet) |
Transfer given facet if it is one of length, maxLength or minLength.
|
void |
setMaxLength(int maxLength) |
Sets the maximum length of this type.
|
void |
setMinLength(int minLength) |
Sets the minimum length of this XSString.
|
addPattern, addPatternFacet, codePatternFacet, getPatterns
codeWhiteSpaceFacet, getWhiteSpace, hasWhiteSpace, setWhiteSpace, setWhiteSpaceFacet
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDefaultValueWithString, createFromJavaObjectCode, createToJavaObjectCode, getJType, getName, getType, isCollection, isDateTime, isEnumerated, isPrimitive, newInstanceCode, setAsEnumerated, setFacets, validationCode
protected AbstractLengthFacet()
protected AbstractLengthFacet(boolean whiteSpaceCollapseOnly)
whiteSpaceCollapseOnly
- If set to true only 'collapse' is allowed for the whiteSpace
facet. If set to false 'collaps', 'replace' and 'preserve' values are allowed for
whiteSpace facet.public final boolean hasLength()
public final int getLength()
public final void setLength(int length)
length
- The length to set.public final boolean hasMaxLength()
public final int getMaxLength()
public final void setMaxLength(int maxLength)
maxLength
- The maximum length for occurances of this type.public final boolean hasMinLength()
public final int getMinLength()
public final void setMinLength(int minLength)
minLength
- The minimum length for occurances of this type.protected final void setFacet(Facet facet)
setFacet
in class AbstractWhiteSpaceFacet
facet
- The facet to set for XSType.protected final void setLengthFacet(Facet facet)
facet
- The facet to transfer.protected final void codeLengthFacet(JSourceCode jsc, java.lang.String validatorName)
jsc
- The JSourceCode to fill in.validatorName
- The name of the TypeValidator that the patterns should be added to.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com