@Override public String getFactType() { return pattern.getFactType(); }
@Override public String getFactType() { return pattern.getFactType(); }
private String getType(Pattern52 pattern, ActionSetFieldCol52 col, SuggestionCompletionEngine sce) { // Columns with "Value Lists" etc are always Text (for now) if ( hasValueList( col ) ) { return SuggestionCompletionEngine.TYPE_STRING; } //Otherwise lookup from SuggestionCompletionEngine final String factType = pattern.getFactType(); final String fieldName = col.getFactField(); return getTypeFromSCE( factType, fieldName, sce ); }
private String getType(Pattern52 pattern, ActionSetFieldCol52 col, SuggestionCompletionEngine sce) { // Columns with "Value Lists" etc are always Text (for now) if ( hasValueList( col ) ) { return SuggestionCompletionEngine.TYPE_STRING; } //Otherwise lookup from SuggestionCompletionEngine final String factType = pattern.getFactType(); final String fieldName = col.getFactField(); return getTypeFromSCE( factType, fieldName, sce ); }
public String getBoundFactType(String boundName) { for ( CompositeColumn< ? > cc : this.conditionPatterns ) { if ( cc instanceof Pattern52 ) { Pattern52 p = (Pattern52) cc; if ( p.isBound() && p.getBoundName().equals( boundName ) ) { return p.getFactType(); } } else if ( cc instanceof BRLConditionColumn ) { BRLConditionColumn brl = (BRLConditionColumn) cc; for ( IPattern p : brl.getDefinition() ) { if ( p instanceof FactPattern ) { FactPattern fp = (FactPattern) p; if ( fp.isBound() && fp.getBoundName().equals( boundName ) ) { return fp.getFactType(); } } } } } return new String(); }
public String getBoundFactType(String boundName) { for ( CompositeColumn< ? > cc : this.conditionPatterns ) { if ( cc instanceof Pattern52 ) { Pattern52 p = (Pattern52) cc; if ( p.isBound() && p.getBoundName().equals( boundName ) ) { return p.getFactType(); } } else if ( cc instanceof BRLConditionColumn ) { BRLConditionColumn brl = (BRLConditionColumn) cc; for ( IPattern p : brl.getDefinition() ) { if ( p instanceof FactPattern ) { FactPattern fp = (FactPattern) p; if ( fp.isBound() && fp.getBoundName().equals( boundName ) ) { return fp.getFactType(); } } } } } return new String(); }
p ); if ( p.getFactType() != null && !p.getFactType().equals( c.factType ) ) { throw new IllegalArgumentException( "Inconsistent FactTypes for ConditionCols bound to '" + boundName + "' detected." );
p ); if ( p.getFactType() != null && !p.getFactType().equals( c.factType ) ) { throw new IllegalArgumentException( "Inconsistent FactTypes for ConditionCols bound to '" + boundName + "' detected." );
Pattern52 p = (Pattern52) col; if ( p.isBound() && p.getBoundName().equals( var ) ) { return p.getFactType();
Pattern52 p = (Pattern52) col; if ( p.isBound() && p.getBoundName().equals( var ) ) { return p.getFactType();
final String factType = pattern.getFactType(); final String fieldName = col.getFactField(); return getTypeFromSCE( factType,
final String factType = pattern.getFactType(); final String fieldName = col.getFactField(); return getTypeFromSCE( factType,
FactPattern fp = new FactPattern( pattern.getFactType() ); fp.setBoundName( pattern.getBoundName() ); fp.setNegated( pattern.isNegated() );
FactPattern fp = new FactPattern( pattern.getFactType() ); fp.setBoundName( pattern.getBoundName() ); fp.setNegated( pattern.isNegated() );
tsdt.getConditionPattern( "z1" ).getBoundName() ); assertEquals( "Driver", tsdt.getConditionPattern( "z1" ).getFactType() ); tsdt.getConditionPattern( "f1" ).getFactType() ); tsdt.getConditionPattern( "f2" ).getFactType() ); tsdt.getConditionPattern( "z1" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "z1" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Driver z1 age", tsdt.getConditionPattern( "z1" ).getChildColumns().get( 0 ).getHeader() ); tsdt.getConditionPattern( "z1" ).getChildColumns().get( 1 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "z1" ).getChildColumns().get( 1 ) ).getFactType() ); assertEquals( "Driver rating", tsdt.getConditionPattern( "z1" ).getChildColumns().get( 1 ).getHeader() ); tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Person", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Person f1 name", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getHeader() ); tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Person2", tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ) ).getFactType() );
tsdt.getConditionPattern( "f1" ).getBoundName() ); assertEquals( "Driver", tsdt.getConditionPattern( "f1" ).getFactType() ); tsdt.getConditionPattern( "f2" ).getFactType() ); tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Driver f1 age", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getHeader() ); tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ) ).getFactType() ); assertEquals( "Driver rating", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getHeader() ); tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Person", tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Person f2 name", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getHeader() ); tsdt.getConditionPattern( "f2" ).getChildColumns().get( 1 ).getFactField() ); assertEquals( "Person", tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 1 ) ).getFactType() ); assertEquals( "Person f2 not needed", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 1 ).getHeader() );
tsdt.getConditionPattern( "f1" ).getBoundName() ); assertEquals( "Driver", tsdt.getConditionPattern( "f1" ).getFactType() ); tsdt.getConditionPattern( "f2" ).getFactType() ); tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Driver f1 age", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getHeader() ); tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ) ).getFactType() ); assertEquals( "Driver f1 name", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getHeader() ); tsdt.getConditionPattern( "f1" ).getChildColumns().get( 2 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 2 ) ).getFactType() ); assertEquals( "Driver rating", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 2 ).getHeader() ); tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Driver 2 pimp", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getHeader() );
assertTrue( sce.hasEnums( p1.getFactType(), c1.getFactField() ) ); assertFalse( dt.hasValueList( c1 ) ); String[] r = sce.getEnums( p1.getFactType(), c1.getFactField(), currentValueMap ).fixedList; assertTrue( sce.hasEnums( p1_.getFactType(), c1_.getFactField() ) ); assertFalse( dt.hasValueList( c1_ ) ); r = sce.getEnums( p1_.getFactType(), c1_.getFactField(), currentValueMap ).fixedList; assertFalse( sce.hasEnums( p1_.getFactType(), c1__.getFactField() ) ); assertTrue( dt.hasValueList( c1__ ) ); assertTrue( sce.hasEnums( p1__.getFactType(), c1___.getFactField() ) ); assertTrue( dt.hasValueList( c1___ ) ); assertTrue( sce.hasEnums( p1.getFactType(), asf.getFactField() ) ); assertFalse( dt.hasValueList( asf ) ); r = sce.getEnums( p1.getFactType(), asf.getFactField(), currentValueMap ).fixedList;