Class DataTypeGeneratorImpl
java.lang.Object
com.sun.msv.generator.DataTypeGeneratorImpl
- All Implemented Interfaces:
DataTypeGenerator
default implementation of DataTypeGenerator.
You may want to override this class to implement custom generator for
unimplemented datatype or datatype local to your schema.
-
Nested Class Summary
Nested classes/interfaces inherited from interface DataTypeGenerator
DataTypeGenerator.GenerationException -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String_generate(org.relaxng.datatype.Datatype dt, ContextProviderImpl context) actual generation.protected voidfail(org.relaxng.datatype.Datatype dt) generate(org.relaxng.datatype.Datatype dt, ContextProviderImpl context) private Stringprotected Stringprotected Stringprotected Stringprotected StringgenerateList(XSDatatypeImpl dti, ContextProviderImpl context) protected Stringprotected Stringprotected Stringprotected StringgenerateUnion(UnionType ut, ContextProviderImpl context)
-
Field Details
-
random
-
asciiOnly
public boolean asciiOnlyif this flag is set to true, then non-ASCII characters will not be used. -
generatedValues
map from DataType to Set that holds generated values for types. This map is used when we fail to generate an appropriate value for a type. -
tokens
set that contains tokens that are found in example files. This set is used as the last resort to generate a value for a type.
-
-
Constructor Details
-
DataTypeGeneratorImpl
public DataTypeGeneratorImpl() -
DataTypeGeneratorImpl
-
-
Method Details
-
generate
- Specified by:
generatein interfaceDataTypeGenerator
-
_generate
actual generation. this method can return an invalid value. -
generateBase64Binary
-
fail
protected void fail(org.relaxng.datatype.Datatype dt) -
generateNMTOKEN
-
generateUnion
-
generateList
-
generateNCName
-
generateDecimal
-
generateBoolean
-
generateString
-
generateFloating
-