protected void buildWorkItemFieldValue( ActionWorkItemFieldValue afv, StringBuilder buf ) { if ( instantiatedWorkItems.contains( afv.getWorkItemName() ) ) { buf.append( "(" ); buf.append( afv.getWorkItemParameterClassName() ); buf.append( ") " ); buf.append( WORKITEM_PREFIX ); buf.append( afv.getWorkItemName() ); buf.append( ".getResult( \"" ); buf.append( afv.getWorkItemParameterName() ); buf.append( "\" )" ); } else { buf.append( "null" ); } }
ActionWorkItemFieldValue val = new ActionWorkItemFieldValue( sf.getFactField(), sf.getType(), sf.getWorkItemName(),
private void doAction(List<LabelledAction> actions, ActionWorkItemInsertFactCol52 ac, String cell) { if ( Boolean.TRUE.equals( Boolean.parseBoolean( cell ) ) ) { LabelledAction a = findByLabelledAction( actions, ac.getBoundName() ); if ( a == null ) { a = new LabelledAction(); a.boundName = ac.getBoundName(); if ( !ac.isInsertLogical() ) { ActionInsertFact ins = new ActionInsertFact( ac.getFactType() ); ins.setBoundName( ac.getBoundName() ); a.action = ins; } else { ActionInsertLogicalFact ins = new ActionInsertLogicalFact( ac.getFactType() ); ins.setBoundName( ac.getBoundName() ); a.action = ins; } actions.add( a ); } ActionInsertFact ins = (ActionInsertFact) a.action; ActionWorkItemFieldValue val = new ActionWorkItemFieldValue( ac.getFactField(), ac.getType(), ac.getWorkItemName(), ac.getWorkItemResultParameterName(), ac.getParameterClassName() ); ins.addFieldValue( val ); } }
protected void buildWorkItemFieldValue( ActionWorkItemFieldValue afv, StringBuilder buf ) { if ( instantiatedWorkItems.contains( afv.getWorkItemName() ) ) { buf.append( "(" ); buf.append( afv.getWorkItemParameterClassName() ); buf.append( ") " ); buf.append( WORKITEM_PREFIX ); buf.append( afv.getWorkItemName() ); buf.append( ".getResult( \"" ); buf.append( afv.getWorkItemParameterName() ); buf.append( "\" )" ); } else { buf.append( "null" ); } }
ActionWorkItemFieldValue val = new ActionWorkItemFieldValue( sf.getFactField(), sf.getType(), sf.getWorkItemName(),
wifv1.type ); assertEquals( "WorkItem", wifv1.getWorkItemName() ); assertEquals( "BooleanResult", wifv1.getWorkItemParameterName() ); assertEquals( Boolean.class.getName(), wifv1.getWorkItemParameterClassName() ); wifv2.type ); assertEquals( "WorkItem", wifv2.getWorkItemName() ); assertEquals( "FloatResult", wifv2.getWorkItemParameterName() ); assertEquals( Float.class.getName(), wifv2.getWorkItemParameterClassName() ); wifv3.type ); assertEquals( "WorkItem", wifv3.getWorkItemName() ); assertEquals( "IntegerResult", wifv3.getWorkItemParameterName() ); assertEquals( Integer.class.getName(), wifv3.getWorkItemParameterClassName() ); wifv4.type ); assertEquals( "WorkItem", wifv4.getWorkItemName() ); assertEquals( "StringResult", wifv4.getWorkItemParameterName() );
private void doAction(List<LabelledAction> actions, ActionWorkItemInsertFactCol52 ac, String cell) { if ( Boolean.TRUE.equals( Boolean.parseBoolean( cell ) ) ) { LabelledAction a = findByLabelledAction( actions, ac.getBoundName() ); if ( a == null ) { a = new LabelledAction(); a.boundName = ac.getBoundName(); if ( !ac.isInsertLogical() ) { ActionInsertFact ins = new ActionInsertFact( ac.getFactType() ); ins.setBoundName( ac.getBoundName() ); a.action = ins; } else { ActionInsertLogicalFact ins = new ActionInsertLogicalFact( ac.getFactType() ); ins.setBoundName( ac.getBoundName() ); a.action = ins; } actions.add( a ); } ActionInsertFact ins = (ActionInsertFact) a.action; ActionWorkItemFieldValue val = new ActionWorkItemFieldValue( ac.getFactField(), ac.getType(), ac.getWorkItemName(), ac.getWorkItemResultParameterName(), ac.getParameterClassName() ); ins.addFieldValue( val ); } }
wifv1.type ); assertEquals( "WorkItem", wifv1.getWorkItemName() ); assertEquals( "BooleanResult", wifv1.getWorkItemParameterName() ); assertEquals( Boolean.class.getName(), wifv1.getWorkItemParameterClassName() ); wifv2.type ); assertEquals( "WorkItem", wifv2.getWorkItemName() ); assertEquals( "FloatResult", wifv2.getWorkItemParameterName() ); assertEquals( Float.class.getName(), wifv2.getWorkItemParameterClassName() ); wifv3.type ); assertEquals( "WorkItem", wifv3.getWorkItemName() ); assertEquals( "IntegerResult", wifv3.getWorkItemParameterName() ); assertEquals( Integer.class.getName(), wifv3.getWorkItemParameterClassName() ); wifv4.type ); assertEquals( "WorkItem", wifv4.getWorkItemName() ); assertEquals( "StringResult", wifv4.getWorkItemParameterName() );
aif.setBoundName( "$r" ); aif.factType = "Results"; ActionWorkItemFieldValue fv1 = new ActionWorkItemFieldValue( "ResultsBooleanResult", SuggestionCompletionEngine.TYPE_BOOLEAN, "WorkItem", Boolean.class.getName() ); aif.addFieldValue( fv1 ); ActionWorkItemFieldValue fv2 = new ActionWorkItemFieldValue( "ResultsFloatResult", SuggestionCompletionEngine.TYPE_NUMERIC_FLOAT, "WorkItem", Float.class.getName() ); aif.addFieldValue( fv2 ); ActionWorkItemFieldValue fv3 = new ActionWorkItemFieldValue( "ResultsIntegerResult", SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER, "WorkItem", Integer.class.getName() ); aif.addFieldValue( fv3 ); ActionWorkItemFieldValue fv4 = new ActionWorkItemFieldValue( "ResultsStringResult", SuggestionCompletionEngine.TYPE_STRING, "WorkItem",
wifv1.type ); assertEquals( "WorkItem", wifv1.getWorkItemName() ); assertEquals( "BooleanResult", wifv1.getWorkItemParameterName() ); assertEquals( Boolean.class.getName(), wifv1.getWorkItemParameterClassName() );
ActionWorkItemFieldValue fv1 = new ActionWorkItemFieldValue( "ResultsBooleanResult", SuggestionCompletionEngine.TYPE_BOOLEAN, "WorkItem", Boolean.class.getName() ); asf.addFieldValue( fv1 ); ActionWorkItemFieldValue fv2 = new ActionWorkItemFieldValue( "ResultsFloatResult", SuggestionCompletionEngine.TYPE_NUMERIC_FLOAT, "WorkItem", Float.class.getName() ); asf.addFieldValue( fv2 ); ActionWorkItemFieldValue fv3 = new ActionWorkItemFieldValue( "ResultsIntegerResult", SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER, "WorkItem", Integer.class.getName() ); asf.addFieldValue( fv3 ); ActionWorkItemFieldValue fv4 = new ActionWorkItemFieldValue( "ResultsStringResult", SuggestionCompletionEngine.TYPE_STRING, "WorkItem",
wifv1.type ); assertEquals( "WorkItem", wifv1.getWorkItemName() ); assertEquals( "BooleanResult", wifv1.getWorkItemParameterName() ); assertEquals( Boolean.class.getName(), wifv1.getWorkItemParameterClassName() );