public class PatternFacet extends Facet
Constructor and Description |
---|
PatternFacet(Configuration config)
Create a pattern facet
|
Modifier and Type | Method and Description |
---|---|
void |
addBranch(java.lang.String pat)
Add a branch to a pattern: that is, combine this pattern with another,
so that the resulting pattern is the "or" of the two patterns
|
void |
checkFacetRestriction(UserSimpleType type,
SimpleType base,
SchemaCompiler compiler)
Check that this facet is legal when used on a type derived by restriction
|
void |
compile(java.util.List<java.lang.String> warnings)
Compile the regular expression
|
Function |
getFacetAsFunctionItem()
Get a function item that represents this Facet schema component.
|
java.lang.String |
getFlags()
Get the flags for the regular expression
|
java.lang.String |
getName()
Returns the name of this Facet
|
RegularExpression |
getRegularExpression() |
java.lang.String |
getValue()
Returns the lexical representation of the value of this facet
|
boolean |
isDoNotMerge() |
void |
setDoNotMerge(boolean dont) |
void |
setFlags(java.lang.String flags)
Saxon allows flags for the regular expression (e.g.
|
void |
setValue(java.lang.String value) |
boolean |
testAtomicValue(AtomicValue value)
Test whether an atomic value conforms to this facet
|
getConstraintName, getMessage, getWhitespaceAction, isConstraining, isFacetName, isFixed, isNewlyIntroduced, makeFacet, serializeFacet, setFixed, setMessage, testLength, testListValue, toLong
public PatternFacet(Configuration config)
config
- the Saxon configurationpublic java.lang.String getName()
Facet
public java.lang.String getValue()
Facet
public RegularExpression getRegularExpression()
public void setValue(java.lang.String value)
public void setFlags(java.lang.String flags)
flags
- the regular expression flagspublic java.lang.String getFlags()
public void compile(java.util.List<java.lang.String> warnings) throws SchemaException
warnings
- if non-null, receives any warnings that arise from compiling the regular expressionSchemaException
- if the regular expression is invalidpublic void setDoNotMerge(boolean dont)
public boolean isDoNotMerge()
public void addBranch(java.lang.String pat)
pat
- the new branch, which must be a valid regular expressionpublic void checkFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler)
checkFacetRestriction
in class Facet
base
- the type from which the restricted type is derivedcompiler
- the schema compilertype
- the type on which the facet is definedpublic boolean testAtomicValue(AtomicValue value)
testAtomicValue
in class Facet
value
- the value to be testedpublic Function getFacetAsFunctionItem()
Facet
getFacetAsFunctionItem
in class Facet
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.