org.apache.xerces.impl.validation.datatypes.eTypes.xml
Class XMLString
java.lang.Object
|
+--org.apache.xerces.impl.validation.datatypes.eTypes.Models.AbstractProperty
|
+--org.apache.xerces.impl.validation.datatypes.eTypes.Models.PartialOrder
|
+--org.apache.xerces.impl.validation.datatypes.eTypes.Data.BasicStringProperty
|
+--org.apache.xerces.impl.validation.datatypes.eTypes.xml.XMLString
- public class XMLString
- extends BasicStringProperty
- implements XMLStringIF
Implements XMLStringIF functions
- Version:
- $Id: XMLString.java,v 1.1.2.1 2000/10/28 00:04:55 jeffreyr Exp $
- Author:
- Leonard C. Berman, Jeffrey Rodriguez
Method Summary |
void |
enableSubProp(java.lang.String name)
If called with name == "XMLString.PLURAL" the result of accumulate will be
non-null if at least one of the instances has more than 1 token. |
int |
getLength()
|
boolean |
getMaxExclusive()
Convenience function for !getSubProp( ParitalOrder.CLOSED_ABOVE , Property.instance ) |
boolean |
getMaxInclusive()
Convenience function for getSubProp( ParitalOrder.CLOSED_ABOVE , Property.instance ) |
int |
getMaxLength()
Convenience function for getSubProp( StringProperty.MAX_LEN , Property.constraint ) |
boolean |
getMinExclusive()
Convenience function for !getSubProp( ParitalOrder.CLOSED_BELOW , Property.instance ) |
boolean |
getMinInclusive()
Convenience function for getSubProp( ParitalOrder.CLOSED_BELOW , Property.instance ) |
int |
getMinLength()
Convenience function for getSubProp( StringProperty.MIN_LEN , Property.constraint ) |
static java.lang.Boolean |
isEnum(java.lang.Object obj,
java.lang.Object constraint)
|
boolean |
isEnumeration()
Convenience function for getSubProp( ENUM , Property.constraint ) |
static java.lang.Boolean |
isNm(java.lang.Object obj,
java.lang.Object constraint)
Splits obj into space separated tokens, and returns true if they are each NAME
or NMTOKEN as requested |
static java.lang.Boolean |
pluralRequired(java.lang.Object obj,
java.lang.Object constraint)
|
void |
setEnumeration(java.lang.String values)
Convenience method. |
void |
setMaxExclusive()
Exclusive bounds not supported |
void |
setMaxInclusive()
|
void |
setMaxLength(int m)
Convenience function for setSubProp( Object, StringProperty.MAX_LEN , Property.constraint ) |
void |
setMinExclusive()
Exclusive bounds not supported |
void |
setMinInclusive()
|
void |
setMinLength(int m)
Convenience function for setSubProp( Object, StringProperty.MIN_LEN , Property.constraint ) |
void |
setXMLStringType(java.lang.String typeName)
Note that validation does not check global constraints - just syntax of strings |
boolean |
validate(java.lang.String str)
Validate sets subProps in the subProp[Property.instance] array , checking it wrt the . |
Methods inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Data.BasicStringProperty |
accumulate,
compareTo,
evalMaxLenClosed,
evalMaxLenOpen,
evalMinLenClosed,
evalMinLenOpen,
evalPattern,
getMaxLength,
getMinLength,
getPattern,
getPatternOptions,
getSValue,
mapString,
setMaxLength,
setMinLength,
setPattern,
setPattern,
setSValue,
twin |
Methods inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Models.PartialOrder |
getBound,
getClosed,
glb,
gt,
isBounded,
isClosed,
lt,
lub,
merge,
merge,
setBound,
setClosed |
Methods inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Models.AbstractProperty |
accumulate,
add2Report,
clone,
getJClass,
getName,
getPossible,
getReport,
getSubProp,
getSubPropEval,
getSubPropMerge,
getSubPropName,
getSubPropNameIndex,
merge,
msg,
resetAccumulator,
resetConstraint,
resetInstance,
setJClass,
setName,
setPossible,
setRequired,
setSubProp,
setSubProp,
setSubPropEval,
setSubPropMerge,
setSubPropName,
toString,
validate |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ENUM
public static final int ENUM
NAME
public static final int NAME
PLURAL
public static final int PLURAL
classNumberSubProperties
public static final int classNumberSubProperties
isEnum
public static final java.lang.reflect.Method isEnum
isNm
public static final java.lang.reflect.Method isNm
pluralRequired
public static final java.lang.reflect.Method pluralRequired
xmlWhitespace
public static final java.lang.String xmlWhitespace
xmlStringTypes
public static final java.util.Vector xmlStringTypes
XMLString
public XMLString()
XMLString
public XMLString(java.lang.String str)
enableSubProp
public void enableSubProp(java.lang.String name)
- If called with name == "XMLString.PLURAL" the result of accumulate will be
non-null if at least one of the instances has more than 1 token. If called with
"SINGULAR" it will be non-null if each instance is atomic, not a list.
- Overrides:
- enableSubProp in class BasicStringProperty
getLength
public int getLength()
- Specified by:
- getLength in interface XMLStringIF
getMaxExclusive
public final boolean getMaxExclusive()
- Convenience function for !getSubProp( ParitalOrder.CLOSED_ABOVE , Property.instance )
- Specified by:
- getMaxExclusive in interface XMLStringIF
getMaxInclusive
public final boolean getMaxInclusive()
- Convenience function for getSubProp( ParitalOrder.CLOSED_ABOVE , Property.instance )
- Specified by:
- getMaxInclusive in interface XMLStringIF
getMaxLength
public final int getMaxLength()
- Convenience function for getSubProp( StringProperty.MAX_LEN , Property.constraint )
- Specified by:
- getMaxLength in interface XMLStringIF
getMinExclusive
public final boolean getMinExclusive()
- Convenience function for !getSubProp( ParitalOrder.CLOSED_BELOW , Property.instance )
- Specified by:
- getMinExclusive in interface XMLStringIF
getMinInclusive
public final boolean getMinInclusive()
- Convenience function for getSubProp( ParitalOrder.CLOSED_BELOW , Property.instance )
- Specified by:
- getMinInclusive in interface XMLStringIF
getMinLength
public final int getMinLength()
- Convenience function for getSubProp( StringProperty.MIN_LEN , Property.constraint )
- Specified by:
- getMinLength in interface XMLStringIF
isEnum
public static final java.lang.Boolean isEnum(java.lang.Object obj,
java.lang.Object constraint)
isEnumeration
public boolean isEnumeration()
- Convenience function for getSubProp( ENUM , Property.constraint )
- Specified by:
- isEnumeration in interface XMLStringIF
isNm
public static final java.lang.Boolean isNm(java.lang.Object obj,
java.lang.Object constraint)
- Splits obj into space separated tokens, and returns true if they are each NAME
or NMTOKEN as requested
pluralRequired
public static final java.lang.Boolean pluralRequired(java.lang.Object obj,
java.lang.Object constraint)
setEnumeration
public final void setEnumeration(java.lang.String values)
- Convenience method. token in values must be name tokens
- Specified by:
- setEnumeration in interface XMLStringIF
setMaxExclusive
public void setMaxExclusive()
- Exclusive bounds not supported
- Specified by:
- setMaxExclusive in interface XMLStringIF
setMaxInclusive
public void setMaxInclusive()
- Specified by:
- setMaxInclusive in interface XMLStringIF
setMaxLength
public final void setMaxLength(int m)
- Convenience function for setSubProp( Object, StringProperty.MAX_LEN , Property.constraint )
- Specified by:
- setMaxLength in interface XMLStringIF
setMinExclusive
public void setMinExclusive()
- Exclusive bounds not supported
- Specified by:
- setMinExclusive in interface XMLStringIF
setMinInclusive
public void setMinInclusive()
- Specified by:
- setMinInclusive in interface XMLStringIF
setMinLength
public final void setMinLength(int m)
- Convenience function for setSubProp( Object, StringProperty.MIN_LEN , Property.constraint )
- Specified by:
- setMinLength in interface XMLStringIF
setXMLStringType
public void setXMLStringType(java.lang.String typeName)
- Note that validation does not check global constraints - just syntax of strings
validate
public boolean validate(java.lang.String str)
- Validate sets subProps in the subProp[Property.instance] array , checking it wrt the .
subProp[Property.constraint] array
- Overrides:
- validate in class BasicStringProperty
Copyright © 1999-2001 Apache XML Project. All Rights Reserved.