com.sun.msv.generator

Class GeneratorOption

public class GeneratorOption extends Object

set of options that controls generation behavior.

Author: Kohsuke KAWAGUCHI

Field Summary
intcutBackDepth
if the generated element exceeds this depth, the generator tries to cut back.
DataTypeGeneratordtGenerator
booleaninsertComment
if set to true, comments are inserted whenever an error is generated.
NameGeneratornameGenerator
ExpressionPoolpool
doubleprobAttrNameTypo
probability of "attribute name typo" per # of attributes.
doubleprobElemNameTypo
probability of "element name typo" per # of elements.
doubleprobGreedyChoiceError
probability of "greedy choice error" per # of choice. greedy choice error is to generate A,B (or B,A) where its content model is (A|B).
doubleprobMissingAttrError
probability of "missing attribute error" per # of attributes.
doubleprobMissingElemError
probability of "missing element error" per # of elements.
doubleprobMissingPlus
probability of "missing plus error" per # of '+' operator.
doubleprobMutatedAttrError
probability of "mutated attribute error" per # of attributes. mutated attribute error is to replace a valid attribute by a random attribute.
doubleprobMutatedElemError
probability of "mutated element error" per # of elements. mutated element error is to replace a valid element by a random element.
doubleprobSeqError
probability of "sequencing error" per # of sequences.
doubleprobSlipInAttrError
probability of "slip-in attribute error" per # of attributes. slip-in attribute error is to generate a random attribute before valid attribute X.
doubleprobSlipInElemError
probability of "slip-in element error" per # of elements. slip-in element error is to generate a random element before valid element X.
Randomrandom
random number generator.
Randwidth
this object is responsible to calculate how many times '*' or '+' is repeated.
Method Summary
booleanerrorSpecified()
voidfillInByDefault()
fills unspecified parameters by default values.

Field Detail

cutBackDepth

public int cutBackDepth
if the generated element exceeds this depth, the generator tries to cut back.

dtGenerator

public DataTypeGenerator dtGenerator

insertComment

public boolean insertComment
if set to true, comments are inserted whenever an error is generated.

nameGenerator

public NameGenerator nameGenerator

pool

public ExpressionPool pool

probAttrNameTypo

public double probAttrNameTypo
probability of "attribute name typo" per # of attributes.

probElemNameTypo

public double probElemNameTypo
probability of "element name typo" per # of elements.

probGreedyChoiceError

public double probGreedyChoiceError
probability of "greedy choice error" per # of choice. greedy choice error is to generate A,B (or B,A) where its content model is (A|B).

probMissingAttrError

public double probMissingAttrError
probability of "missing attribute error" per # of attributes.

probMissingElemError

public double probMissingElemError
probability of "missing element error" per # of elements. Missing element error is to generate epsilon where its content model is A.

probMissingPlus

public double probMissingPlus
probability of "missing plus error" per # of '+' operator. Missing plus error is to generate epsilon where the content model is A+. Similar to "missing element error"

probMutatedAttrError

public double probMutatedAttrError
probability of "mutated attribute error" per # of attributes. mutated attribute error is to replace a valid attribute by a random attribute. Or this error can be considered as combination of "missing attribute error" and "slip-in attribute error".

probMutatedElemError

public double probMutatedElemError
probability of "mutated element error" per # of elements. mutated element error is to replace a valid element by a random element. Or this error can be considered as combination of "missing element error" and "slip-in element error".

probSeqError

public double probSeqError
probability of "sequencing error" per # of sequences. 0: no error, 1.0: error at every occurence of sequence. sequencing error is to generate B,A where its content model is A,B.

probSlipInAttrError

public double probSlipInAttrError
probability of "slip-in attribute error" per # of attributes. slip-in attribute error is to generate a random attribute before valid attribute X.

probSlipInElemError

public double probSlipInElemError
probability of "slip-in element error" per # of elements. slip-in element error is to generate a random element before valid element X.

random

public Random random
random number generator.

width

public Rand width
this object is responsible to calculate how many times '*' or '+' is repeated.

Method Detail

errorSpecified

public boolean errorSpecified()

fillInByDefault

public void fillInByDefault()
fills unspecified parameters by default values.