Class AbstractRangeFacet
java.lang.Object
org.exolab.castor.builder.types.XSType
org.exolab.castor.builder.types.AbstractPatternFacet
org.exolab.castor.builder.types.AbstractWhiteSpaceFacet
org.exolab.castor.builder.types.AbstractRangeFacet
- Direct Known Subclasses:
AbstractDigitsFacet,XSDate,XSDateTime,XSDouble,XSDuration,XSFloat,XSGDay,XSGMonth,XSGMonthDay,XSGYear,XSGYearMonth,XSTime
A base class for types which support the range, whiteSpace and pattern facets.
- Since:
- 1.1
- Version:
- $Revision: 6623 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
- Author:
- Ralf Joachim
-
Field Summary
Fields inherited from class org.exolab.castor.builder.types.XSType
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidcodeRangeFacet(JSourceCode jsc, String validatorName) Generate the source code for pattern facet validation.final StringReturns the maximum exclusive value that this XSDate can hold.final StringReturns the maximum inclusive value that this XSDate can hold.final StringReturns the minimum exclusive value that this XSDate can hold.final StringReturns the minimum inclusive value that this XSDate can hold.final Stringfinal Stringfinal booleanReturns true if a maximum (inclusive or exclusive) has been set.final booleanReturns true if a minimum (inclusive or exclusive) has been set.final booleanfinal booleanprotected voidSet the given facet for XSType if applicable.final voidsetMaxExclusive(String max) Sets the maximum exclusive value that this XSDate can hold.final voidsetMaxInclusive(String max) Sets the maximum inclusive value that this XSDate can hold.final voidsetMinExclusive(String min) Sets the minimum exclusive value that this XSDate can hold.final voidsetMinInclusive(String min) Sets the minimum inclusive value that this XSDate can hold.final voidsetNegativeInfinity(String negativeInfity) final voidsetPositiveInfinity(String positiveInfity) protected final voidsetRangeFacet(Facet facet) Transfer given facet if it is a range.Methods inherited from class org.exolab.castor.builder.types.AbstractWhiteSpaceFacet
codeWhiteSpaceFacet, getWhiteSpace, hasWhiteSpace, setWhiteSpace, setWhiteSpaceFacetMethods inherited from class org.exolab.castor.builder.types.AbstractPatternFacet
addPattern, addPatternFacet, codePatternFacet, getPatternsMethods inherited from class org.exolab.castor.builder.types.XSType
createDefaultValueWithString, createFromJavaObjectCode, createToJavaObjectCode, getJType, getName, getType, isCollection, isDateTime, isEnumerated, isPrimitive, newInstanceCode, setAsEnumerated, setFacets, validationCode
-
Constructor Details
-
AbstractRangeFacet
public AbstractRangeFacet()
-
-
Method Details
-
hasMaximum
public final boolean hasMaximum()Returns true if a maximum (inclusive or exclusive) has been set.- Returns:
- True if a maximum (inclusive or exclusive) has been set.
-
getMaxExclusive
Returns the maximum exclusive value that this XSDate can hold.- Returns:
- The maximum exclusive value that this XSDate can hold. If no maximum exclusive value has been set, Null will be returned.
-
setMaxExclusive
Sets the maximum exclusive value that this XSDate can hold.- Parameters:
max- The maximum exclusive value this XSDate can be.
-
getMaxInclusive
Returns the maximum inclusive value that this XSDate can hold.- Returns:
- The maximum inclusive value that this XSDate can hold. If no maximum inclusive value has been set, Null will be returned.
-
setMaxInclusive
Sets the maximum inclusive value that this XSDate can hold.- Parameters:
max- The maximum inclusive value this XSDate can be.
-
hasMinimum
public final boolean hasMinimum()Returns true if a minimum (inclusive or exclusive) has been set.- Returns:
- True if a minimum (inclusive or exclusive) has been set.
-
getMinExclusive
Returns the minimum exclusive value that this XSDate can hold.- Returns:
- The minimum exclusive value that this XSDate can hold. If no minimum exclusive value has been set, Null will be returned.
-
setMinExclusive
Sets the minimum exclusive value that this XSDate can hold.- Parameters:
min- The minimum exclusive value this XSDate can be.
-
getMinInclusive
Returns the minimum inclusive value that this XSDate can hold.- Returns:
- The minimum inclusive value that this XSDate can be.
-
setMinInclusive
Sets the minimum inclusive value that this XSDate can hold.- Parameters:
min- The minimum inclusive value this XSDate can be.
-
setPositiveInfinity
-
setNegativeInfinity
-
hasPositiveInfinity
public final boolean hasPositiveInfinity() -
hasNegavtiveInfinity
public final boolean hasNegavtiveInfinity() -
getPositiveInfinity
-
getNegativeInfinity
-
setFacet
Set the given facet for XSType if applicable.- Overrides:
setFacetin classAbstractWhiteSpaceFacet- Parameters:
facet- The facet to set for XSType.
-
setRangeFacet
Transfer given facet if it is a range.- Parameters:
facet- The facet to transfer.
-
codeRangeFacet
Generate the source code for pattern facet validation.- Parameters:
jsc- The JSourceCode to fill in.validatorName- The name of the TypeValidator that the range should be added to.
-