Top Description Fields Constructors Methods
com.sun.msv.datatype.xsd

public final Class PatternFacet

extends DataTypeWithLexicalConstraintFacet
Class Inheritance
Imports
com.sun.msv.datatype.xsd.regex.RegExp, .RegExpFactory, org.relaxng.datatype.DatatypeException, .ValidationContext, java.io.IOException, .ObjectInputStream, java.util.Vector, java.text.ParseException

"pattern" facet validator "pattern" is a constraint facet which is applied against lexical space. See http://www.w3.org/TR/xmlschema-2/#dt-pattern for the spec
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
private transient RegExp[]
exps

actual object that performs regular expression validation.

public final String[]
patterns

string representations of the above RegularExpressions.

private static final long

Constructor Summary

AccessConstructor and Description
public
PatternFacet(String nsUri, String typeName, XSDatatypeImpl baseType, TypeIncubator facets)

Method Summary

Modifier and TypeMethod and Description
protected final boolean
private void
compileRegExps()

Compiles all the regular expressions.

protected void
public RegExp[]
private void
Inherited from com.sun.msv.datatype.xsd.DataTypeWithLexicalConstraintFacet:
_createValuecheckFormat

Field Detail

expsback to summary
private transient RegExp[] exps

actual object that performs regular expression validation. one of the item has to match. Don't serialize so that we won't have hard-coded dependency to a particular regexp lib.

patternsback to summary
public final String[] patterns

string representations of the above RegularExpressions. this representation is usually human friendly than the one generated by RegularExpression.toString method.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.sun.msv.datatype.xsd.DataTypeWithLexicalConstraintFacet.serialVersionUID.

Constructor Detail

PatternFacetback to summary
public PatternFacet(String nsUri, String typeName, XSDatatypeImpl baseType, TypeIncubator facets) throws DatatypeException

Method Detail

checkLexicalConstraintback to summary
protected final boolean checkLexicalConstraint(String literal)

Implements abstract com.sun.msv.datatype.xsd.DataTypeWithLexicalConstraintFacet.checkLexicalConstraint.

compileRegExpsback to summary
private void compileRegExps() throws ParseException

Compiles all the regular expressions.

diagnoseByFacetback to summary
protected void diagnoseByFacet(String content, ValidationContext context) throws DatatypeException

Implements abstract com.sun.msv.datatype.xsd.DataTypeWithFacet.diagnoseByFacet.

getRegExpsback to summary
public RegExp[] getRegExps()
readObjectback to summary
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException