Examples of RuleAttribute


Examples of org.drools.workbench.models.datamodel.rule.RuleAttribute

     */
    protected void marshalAttributes( final StringBuilder buf,
                                      final RuleModel model ) {
        boolean hasDialect = false;
        for ( int i = 0; i < model.attributes.length; i++ ) {
            RuleAttribute attr = model.attributes[ i ];

            buf.append( "\t" );
            buf.append( attr );

            buf.append( "\n" );
            if ( attr.getAttributeName().equals( "dialect" ) ) {
                constraintValueBuilder = DRLConstraintValueBuilder.getBuilder( attr.getValue() );
                hasDialect = true;
            }
        }
        // Un comment below for mvel
        if ( !hasDialect ) {
            RuleAttribute attr = new RuleAttribute( "dialect",
                                                    DRLConstraintValueBuilder.DEFAULT_DIALECT );
            buf.append( "\t" );
            buf.append( attr );
            buf.append( "\n" );
        }
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.RuleAttribute

                                     final Map<String, AttributeDescr> attributes ) {
        boolean isJavaDialect = false;
        for ( Map.Entry<String, AttributeDescr> entry : attributes.entrySet() ) {
            String name = entry.getKey();
            String value = normalizeAttributeValue( entry.getValue().getValue().trim() );
            RuleAttribute ruleAttribute = new RuleAttribute( name,
                                                             value );
            m.addAttribute( ruleAttribute );
            isJavaDialect |= name.equals( "dialect" ) && value.equals( "java" );
        }
        return isJavaDialect;
View Full Code Here

Examples of org.kie.workbench.common.services.refactoring.model.index.RuleAttribute

    private void visit( final AttributeCol52 o ) {
        final int iCol = model.getExpandedColumns().indexOf( o );
        for ( List<DTCellValue52> row : model.getData() ) {
            final String attributeValue = row.get( iCol ).getStringValue();
            if ( !( attributeValue == null || attributeValue.isEmpty() ) ) {
                builder.addGenerator( new RuleAttribute( new ValueRuleAttributeIndexTerm( o.getAttribute() ),
                                                         new ValueRuleAttributeValueIndexTerm( attributeValue ) ) );
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.