Package com.sun.msv.verifier.regexp
Class StringToken
- java.lang.Object
-
- com.sun.msv.verifier.regexp.Token
-
- com.sun.msv.verifier.regexp.StringToken
-
- Direct Known Subclasses:
StringRecoveryToken
public class StringToken extends Token
chunk of string. ID validation depends on the immutability of this object.
-
-
Field Summary
Fields Modifier and Type Field Description IDContextProvider2contextprotected booleanignorableprivate static org.relaxng.datatype.Datatype[]ignoredTypejava.lang.StringliteralDatatypeRefrefTypeif this field is non-null, this field will receive assigned DataType object.protected ResidualCalculatorresCalcprotected booleansaturated
-
Constructor Summary
Constructors Constructor Description StringToken(REDocumentDeclaration docDecl, java.lang.String literal, IDContextProvider2 context)StringToken(REDocumentDeclaration docDecl, java.lang.String literal, IDContextProvider2 context, DatatypeRef refType)StringToken(ResidualCalculator resCalc, java.lang.String literal, IDContextProvider2 context, DatatypeRef refType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidassignType(org.relaxng.datatype.Datatype dt)protected StringTokencreateChildStringToken(java.lang.String literal, DatatypeRef dtRef)(package private) booleanisIgnorable()checks if this token is ignorable.booleanmatch(DataExp exp)DataExp can consume this token if its datatype can accept this stringbooleanmatch(ListExp exp)ListExp can consume this token if its pattern accepts this stringbooleanmatch(ValueExp exp)booleanmatchAnyString()returns true if anyString pattern can consume this token
-
-
-
Field Detail
-
literal
public final java.lang.String literal
-
context
public final IDContextProvider2 context
-
resCalc
protected final ResidualCalculator resCalc
-
ignorable
protected final boolean ignorable
-
refType
public DatatypeRef refType
if this field is non-null, this field will receive assigned DataType object.
-
saturated
protected boolean saturated
-
ignoredType
private static final org.relaxng.datatype.Datatype[] ignoredType
-
-
Constructor Detail
-
StringToken
public StringToken(REDocumentDeclaration docDecl, java.lang.String literal, IDContextProvider2 context)
-
StringToken
public StringToken(REDocumentDeclaration docDecl, java.lang.String literal, IDContextProvider2 context, DatatypeRef refType)
-
StringToken
public StringToken(ResidualCalculator resCalc, java.lang.String literal, IDContextProvider2 context, DatatypeRef refType)
-
-
Method Detail
-
match
public boolean match(DataExp exp)
DataExp can consume this token if its datatype can accept this string
-
match
public boolean match(ListExp exp)
ListExp can consume this token if its pattern accepts this string
-
createChildStringToken
protected StringToken createChildStringToken(java.lang.String literal, DatatypeRef dtRef)
-
matchAnyString
public boolean matchAnyString()
Description copied from class:Tokenreturns true if anyString pattern can consume this token- Overrides:
matchAnyStringin classToken
-
assignType
private void assignType(org.relaxng.datatype.Datatype dt)
-
isIgnorable
boolean isIgnorable()
checks if this token is ignorable. StringToken is ignorable when it matches [ \t\r\n]*- Overrides:
isIgnorablein classToken
-
-