Examples of MetadataCol52


Examples of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52

        assertTrue( columns.get( 1 ) instanceof DescriptionCol52 );
        assertTrue( columns.get( 2 ) instanceof MetadataCol52 );
        assertTrue( columns.get( 3 ) instanceof AnalysisCol52 );

        //Check metadata column
        MetadataCol52 mdCol2 = ( (MetadataCol52) columns.get( 2 ) );
        assertEquals( "cheese",
                      mdCol2.getMetadata() );

        //Check data
        assertEquals( 2,
                      dtable.getData().size() );
        assertTrue( isRowEquivalent( new String[]{ "1", "Created from row 7", "cheddar" },
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52

        // setup temp list
        List<RuleMetadata> metadataList = new ArrayList<RuleMetadata>();

        for ( int j = 0; j < metadataCols.size(); j++ ) {
            MetadataCol52 meta = metadataCols.get( j );
            int index = allColumns.indexOf( meta );
            final DTCellValue52 dcv = row.get( index );
            String cell = GuidedDTDRLUtilities.convertDTCellValueToString( dcv );

            if ( validateMetadataCell( cell ) ) {
                metadataList.add( new RuleMetadata( meta.getMetadata(),
                                                    cell ) );
            }
        }
        if ( metadataList.size() > 0 ) {
            rm.metadataList = metadataList.toArray( new RuleMetadata[ metadataList.size() ] );
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52

        // setup temp list
        List<RuleMetadata> metadataList = new ArrayList<RuleMetadata>();

        for ( int j = 0; j < metadataCols.size(); j++ ) {
            MetadataCol52 meta = metadataCols.get( j );
            int index = allColumns.indexOf( meta );

            String cell = GuidedDTDRLUtilities.convertDTCellValueToString( row.get( index ) );

            if ( validCell( cell ) ) {
                metadataList.add( new RuleMetadata( meta.getMetadata(),
                                                    cell ) );
            }
        }
        if ( metadataList.size() > 0 ) {
            rm.metadataList = metadataList.toArray( new RuleMetadata[ metadataList.size() ] );
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52

        // add cols for LHS
        final RowNumberCol52 rnc = new RowNumberCol52();
        final DescriptionCol52 dc = new DescriptionCol52();

        final MetadataCol52 mdc = new MetadataCol52();
        mdc.setMetadata( "cheese" );

        final AttributeCol52 ac = new AttributeCol52();
        ac.setAttribute( "salience" );

        final ActionSetFieldCol52 asfc = new ActionSetFieldCol52();
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52

        // setup temp list
        List<RuleMetadata> metadataList = new ArrayList<RuleMetadata>();

        for ( int j = 0; j < metadataCols.size(); j++ ) {
            MetadataCol52 meta = metadataCols.get( j );
            int index = allColumns.indexOf( meta );

            String cell = GuidedDTDRLUtilities.convertDTCellValueToString( row.get( index ) );

            if ( validCell( cell ) ) {
                metadataList.add( new RuleMetadata( meta.getMetadata(),
                                                    cell ) );
            }
        }
        if ( metadataList.size() > 0 ) {
            rm.metadataList = metadataList.toArray( new RuleMetadata[ metadataList.size() ] );
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52

        nc.setWidth( c.width );
        return nc;
    }

    private MetadataCol52 makeNewColumn( MetadataCol c ) {
        MetadataCol52 nc = new MetadataCol52();
        nc.setDefaultValue( new DTCellValue52( c.defaultValue ) );
        nc.setHideColumn( c.hideColumn );
        nc.setMetadata( c.attr );
        nc.setWidth( c.width );
        return nc;
    }
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52

        assertTrue( columns.get( 1 ) instanceof DescriptionCol52 );
        assertTrue( columns.get( 2 ) instanceof MetadataCol52 );
        assertTrue( columns.get( 3 ) instanceof AnalysisCol52 );

        //Check metadata column
        MetadataCol52 mdCol2 = ( (MetadataCol52) columns.get( 2 ) );
        assertEquals( "cheese",
                      mdCol2.getMetadata() );

        //Check data
        assertEquals( 2,
                      dtable.getData().size() );
        assertTrue( isRowEquivalent( new String[]{ "1", "Created from row 7", "cheddar" },
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52

        List<BaseColumn> allColumns = new ArrayList<BaseColumn>();
        List<CompositeColumn<? extends BaseColumn>> allPatterns = new ArrayList<CompositeColumn<? extends BaseColumn>>();
        allColumns.add( new RowNumberCol52() );
        allColumns.add( new DescriptionCol52() );
        allColumns.add( new MetadataCol52() );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Person" );
        allPatterns.add( p1 );
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52

        List<BaseColumn> allColumns = new ArrayList<BaseColumn>();
        List<CompositeColumn<? extends BaseColumn>> allPatterns = new ArrayList<CompositeColumn<? extends BaseColumn>>();
        allColumns.add( new RowNumberCol52() );
        allColumns.add( new DescriptionCol52() );
        allColumns.add( new MetadataCol52() );

        Pattern52 p1 = new Pattern52();
        p1.setNegated( true );
        p1.setBoundName( "p1" );
        p1.setFactType( "Person" );
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52

                      rm );

        assertSame( orig,
                    rm.metadataList );

        MetadataCol52 col1 = new MetadataCol52();
        col1.setMetadata( "foo" );
        MetadataCol52 col2 = new MetadataCol52();
        col2.setMetadata( "foo2" );
        metadataCols.add( col1 );
        metadataCols.add( col2 );
        allColumns.addAll( metadataCols );

        p.doMetadata( allColumns,
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.