Variable variable1 = new Variable( rule );
variable1.setObjectTypePath( "1" );
variable1.setObjectTypeType( VerifierComponentType.FIELD.getType() );
variable1.setOrderNumber( -1 );
VariableRestriction r1 = new VariableRestriction( pattern1 );
r1.setFieldPath( "0" );
r1.setOperator( Operator.GREATER_OR_EQUAL );
r1.setVariable( variable1 );
r1.setOrderNumber( 0 );
VariableRestriction r2 = new VariableRestriction( pattern1 );
r2.setFieldPath( "0" );
r2.setOperator( Operator.LESS );
r2.setVariable( variable1 );
r2.setOrderNumber( 1 );
String containsOperator = "contains";
Variable variable2 = new Variable( rule );
variable2.setObjectTypePath( "2" );
variable2.setObjectTypeType( VerifierComponentType.FIELD.getType() );
variable2.setOrderNumber( 3 );
VariableRestriction r3 = new VariableRestriction( pattern2 );
r3.setFieldPath( "1" );
r3.setOperator( Operator.determineOperator( containsOperator,
false ) );
r3.setVariable( variable2 );
r3.setOrderNumber( 4 );
VariableRestriction r4 = new VariableRestriction( pattern2 );
r4.setFieldPath( "1" );
r4.setOperator( Operator.determineOperator( containsOperator,
true ) );
r4.setVariable( variable2 );
r4.setOrderNumber( 5 );
/*
* Pair that doesn't work.
*/
Variable variable3 = new Variable( rule );
variable3.setObjectTypePath( "3" );
variable3.setObjectTypeType( VerifierComponentType.FIELD.getType() );
variable3.setOrderNumber( 6 );
VariableRestriction r5 = new VariableRestriction( pattern3 );
r5.setFieldPath( "1" );
r5.setOperator( Operator.GREATER_OR_EQUAL );
r5.setVariable( variable3 );
r5.setOrderNumber( 7 );
VariableRestriction r6 = new VariableRestriction( pattern3 );
r6.setFieldPath( "1" );
r6.setOperator( Operator.EQUAL );
r6.setVariable( variable3 );
r6.setOrderNumber( 8 );
data.add( r1 );
data.add( r2 );
data.add( r3 );
data.add( r4 );