org.exolab.castor.builder.types
Class AbstractPatternFacet

java.lang.Object
  extended by org.exolab.castor.builder.types.XSType
      extended by org.exolab.castor.builder.types.AbstractPatternFacet
Direct Known Subclasses:
AbstractWhiteSpaceFacet

public abstract class AbstractPatternFacet
extends XSType

A base class for types which support the pattern facet.

Since:
1.1
Version:
$Revision: 6678 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
Author:
Keith Visco, Edward Kuns

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
AbstractPatternFacet()
           
 
Method Summary
 void addPattern(java.lang.String pattern)
          Adds a pattern branch for this XSType.
protected  void addPatternFacet(Facet facet)
          Transfer given facet if it is a pattern.
protected  void codePatternFacet(JSourceCode jsc, java.lang.String validatorName)
          Generate the source code for pattern facet validation.
 java.util.List getPatterns()
          Get list of pattern facets.
 
Methods inherited from class org.exolab.castor.builder.types.XSType
createFromJavaObjectCode, createToJavaObjectCode, getJType, getName, getType, isCollection, isDateTime, isEnumerated, isPrimitive, newInstanceCode, setAsEnumerated, setFacet, setFacets, validationCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPatternFacet

public AbstractPatternFacet()
Method Detail

addPattern

public final void addPattern(java.lang.String pattern)
Adds a pattern branch for this XSType. To successfully pass the pattern facets, only one branch needs to pass.

Parameters:
pattern - The regular expression for this XSType.

getPatterns

public final java.util.List getPatterns()
Get list of pattern facets.

Returns:
List of pattern facets.

addPatternFacet

protected final void addPatternFacet(Facet facet)
Transfer given facet if it is a pattern.

Parameters:
facet - The facet to transfer.

codePatternFacet

protected final void codePatternFacet(JSourceCode jsc,
                                      java.lang.String validatorName)
Generate the source code for pattern facet validation.

Parameters:
jsc - The JSourceCode to fill in.
validatorName - The name of the TypeValidator that the patterns should be added to.


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