org.exolab.castor.builder.types

Class XSDuration


public final class XSDuration
extends XSType

Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name "Exolab" must not be used to endorse or promote products derived from this Software without prior written permission of Intalio, Inc. For written permission, please contact info@exolab.org. 4. Products derived from this Software may not be called "Exolab" nor may "Exolab" appear in their names without prior written permission of Intalio, Inc. Exolab is a registered trademark of Intalio, Inc. 5. Due credit should be given to the Exolab Project (http://www.exolab.org/). THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright 2001-2002 (C) Intalio, Inc. All Rights Reserved. $Id: XSDuration.java,v 1.1.1.1 2003/03/03 07:07:56 kvisco Exp $ Date Author Changes 05/22/2001 Arnaud Blandin Created

Field Summary

Fields inherited from class org.exolab.castor.builder.types.XSType

ANYURI_NAME, ANYURI_TYPE, BASE64BINARY_NAME, BASE64BINARY_TYPE, BOOLEAN_NAME, BOOLEAN_TYPE, BYTE_NAME, BYTE_TYPE, CLASS, COLLECTION, DATETIME_NAME, DATETIME_TYPE, DATE_NAME, DATE_TYPE, DECIMAL_NAME, DECIMAL_TYPE, DOUBLE_NAME, DOUBLE_TYPE, DURATION_NAME, DURATION_TYPE, ENTITIES, ENTITY, FLOAT_NAME, FLOAT_TYPE, GDAY_NAME, GDAY_TYPE, GMONTHDAY_NAME, GMONTHDAY_TYPE, GMONTH_NAME, GMONTH_TYPE, GYEARMONTH_NAME, GYEARMONTH_TYPE, GYEAR_NAME, GYEAR_TYPE, HEXBINARY_NAME, HEXBINARY_TYPE, IDREFS_NAME, IDREFS_TYPE, IDREF_NAME, IDREF_TYPE, ID_NAME, ID_TYPE, INTEGER_NAME, INTEGER_TYPE, INT_NAME, INT_TYPE, LANGUAGE_NAME, LANGUAGE_TYPE, LONG_NAME, LONG_TYPE, NAME_NAME, NAME_TYPE, NCNAME_NAME, NCNAME_TYPE, NEGATIVE_INTEGER_NAME, NEGATIVE_INTEGER_TYPE, NMTOKENS_NAME, NMTOKENS_TYPE, NMTOKEN_NAME, NMTOKEN_TYPE, NON_NEGATIVE_INTEGER_NAME, NON_NEGATIVE_INTEGER_TYPE, NON_POSITIVE_INTEGER_NAME, NON_POSITIVE_INTEGER_TYPE, NORMALIZEDSTRING_NAME, NORMALIZEDSTRING_TYPE, NOTATION_NAME, NOTATION_TYPE, NULL, POSITIVE_INTEGER_NAME, POSITIVE_INTEGER_TYPE, QNAME_NAME, QNAME_TYPE, SHORT_NAME, SHORT_TYPE, STRING_NAME, STRING_TYPE, TIME_NAME, TIME_TYPE, TOKEN_NAME, TOKEN_TYPE

Constructor Summary

XSDuration()

Method Summary

JType
getJType()
Duration
getMaxExclusive()
Returns the maximum exclusive value that this XSDuration can hold.
Duration
getMaxInclusive()
Returns the maximum inclusive value that this XSDuration can hold.
Duration
getMinExclusive()
Returns the minimum exclusive value that this XSDuration can hold.
Duration
getMinInclusive()
Returns the minimum inclusive value that this XSDuration can hold.
boolean
hasMaximum()
boolean
hasMinimum()
void
setFacets(SimpleType simpleType)
Reads and sets the facets for XSDuration override the readFacet method of XSType
void
setMaxExclusive(Duration max)
Sets the maximum exclusive value that this XSDuration can hold.
void
setMaxInclusive(Duration max)
Sets the maximum inclusive value that this XSDuration can hold.
void
setMinExclusive(Duration min)
Sets the minimum exclusive value that this XSDuration can hold.
void
setMinInclusive(Duration min)
Sets the minimum inclusive value that this XSInt can hold.
void
validationCode(JSourceCode jsc, String fixedValue, String fieldValidatorInstanceName)
Creates the validation code for an instance of this XSType.

Methods inherited from class org.exolab.castor.builder.types.XSType

createFromJavaObjectCode, createToJavaObjectCode, escapePattern, getFacets, getJType, getName, getType, isDateTime, isEnumerated, isPrimitive, newInstanceCode, setAsEnumertated, setFacets, validationCode

Constructor Details

XSDuration

public XSDuration()

Method Details

getJType

public JType getJType()
Overrides:
getJType in interface XSType

getMaxExclusive

public Duration getMaxExclusive()
Returns the maximum exclusive value that this XSDuration can hold.
Returns:
the maximum exclusive value that this XSDuration can hold. If no maximum exclusive value has been set, Null will be returned

getMaxInclusive

public Duration getMaxInclusive()
Returns the maximum inclusive value that this XSDuration can hold.
Returns:
the maximum inclusive value that this XSDuration can hold. If no maximum inclusive value has been set, Null will be returned

getMinExclusive

public Duration getMinExclusive()
Returns the minimum exclusive value that this XSDuration can hold.
Returns:
the minimum exclusive value that this XSDuration can hold. If no minimum exclusive value has been set, Null will be returned

getMinInclusive

public Duration getMinInclusive()
Returns the minimum inclusive value that this XSDuration can hold.
Returns:
the minimum inclusive value that this can XSDuration hold. If no minimum inclusive value has been set, Null will be returned

hasMaximum

public boolean hasMaximum()

hasMinimum

public boolean hasMinimum()

setFacets

public void setFacets(SimpleType simpleType)
Reads and sets the facets for XSDuration override the readFacet method of XSType
Overrides:
setFacets in interface XSType
Parameters:

setMaxExclusive

public void setMaxExclusive(Duration max)
Sets the maximum exclusive value that this XSDuration can hold.
Parameters:
max - the maximum exclusive value this XSDuration can be

setMaxInclusive

public void setMaxInclusive(Duration max)
Sets the maximum inclusive value that this XSDuration can hold.
Parameters:
max - the maximum inclusive value this XSDuration can be

setMinExclusive

public void setMinExclusive(Duration min)
Sets the minimum exclusive value that this XSDuration can hold.
Parameters:

setMinInclusive

public void setMinInclusive(Duration min)
Sets the minimum inclusive value that this XSInt can hold.
Parameters:

validationCode

public void validationCode(JSourceCode jsc,
                           String fixedValue,
                           String fieldValidatorInstanceName)
Creates the validation code for an instance of this XSType. The validation code should if necessary create a newly configured TypeValidator, that should then be added to a FieldValidator instance whose name is provided.
Overrides:
validationCode in interface XSType
Parameters:
jsc - the JSourceCode to fill in.
fixedValue - a fixed value to use if any
fieldValidatorInstanceName - the name of the FieldValidator that the configured TypeValidator should be added to.

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com