Examples of addAttribute()


Examples of org.drools.guvnor.models.commons.shared.rule.RuleModel.addAttribute()

    public void testBasics() {
        final BRLPersistence p = BRXMLPersistence.getInstance();
        final RuleModel m = new RuleModel();
        m.addLhsItem( new FactPattern( "Person" ) );
        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        ActionGlobalCollectionAdd ag = new ActionGlobalCollectionAdd();
        ag.setFactName( "x" );

Examples of org.drools.ide.common.client.modeldriven.brl.RuleModel.addAttribute()

        RuleModel m = new RuleModel();

        String s = BRDRLPersistence.getInstance().marshal( m );
        assertTrue( s.indexOf( "mvel" ) > -1 );

        m.addAttribute( new RuleAttribute( "dialect",
                                           "goober" ) );
        s = BRDRLPersistence.getInstance().marshal( m );
        assertFalse( s.indexOf( "mvel" ) > -1 );
        assertTrue( s.indexOf( "goober" ) > -1 );

Examples of org.drools.lang.descr.PackageDescr.addAttribute()

    //        this.session.getGlobal( identifier ).remove( name );
    //    }

    private PackageDescr createPackageDescr(String moduleName) {
        PackageDescr pkg = new PackageDescr( moduleName );
        pkg.addAttribute( new AttributeDescr( "dialect",
                                              "clips" ) );

        //        for ( Iterator it = this.typeResolver.getImports().iterator(); it.hasNext(); ) {
        //            pkg.addImport( new ImportDescr( (String) it.next() ) );
        //        }

Examples of org.drools.lang.descr.RuleDescr.addAttribute()

                Map<String, AttributeDescr> pkgAttributes = packageAttributes.get( packageDescr.getNamespace() );
                inheritPackageAttributes( pkgAttributes,
                                          ruleDescr );

                if ( isEmpty( ruleDescr.getDialect() ) ) {
                    ruleDescr.addAttribute( new AttributeDescr( "dialect",
                                                                pkgRegistry.getDialect() ) );
                }
                addRule( ruleDescr );
            }
        }

Examples of org.drools.workbench.models.commons.shared.rule.RuleModel.addAttribute()

        RuleModel m = new RuleModel();

        String s = BRDRLPersistence.getInstance().marshal( m );
        assertTrue( s.indexOf( "mvel" ) > -1 );

        m.addAttribute( new RuleAttribute( "dialect",
                                           "goober" ) );
        s = BRDRLPersistence.getInstance().marshal( m );
        assertFalse( s.indexOf( "mvel" ) > -1 );
        assertTrue( s.indexOf( "goober" ) > -1 );

Examples of org.drools.workbench.models.datamodel.rule.RuleModel.addAttribute()

        RuleModel m = new RuleModel();

        String s = RuleModelDRLPersistenceImpl.getInstance().marshal( m );
        assertTrue( s.indexOf( "mvel" ) > -1 );

        m.addAttribute( new RuleAttribute( "dialect",
                                           "goober" ) );
        s = RuleModelDRLPersistenceImpl.getInstance().marshal( m );
        assertFalse( s.indexOf( "mvel" ) > -1 );
        assertTrue( s.indexOf( "goober" ) > -1 );
    }

Examples of org.drools.workbench.models.guided.template.shared.TemplateModel.addAttribute()

    public void testBasics() {
        final RuleTemplateModelPersistence p = RuleTemplateModelXMLPersistenceImpl.getInstance();
        final TemplateModel m = new TemplateModel();
        m.addLhsItem( new FactPattern( "Person" ) );
        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        ActionGlobalCollectionAdd ag = new ActionGlobalCollectionAdd();
        ag.setFactName( "x" );

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotation.addAttribute()

       
        for (ExecutableElement annotationElement : keys) {
            AnnotationValue annotationValue = annotationMirror.getElementValues().get(annotationElement);
            String attribute = annotationElement.getSimpleName().toString();
            Object attributeValue = annotationValue.accept(this, arg1);
            annotation.addAttribute(attribute, attributeValue);
        }

        return annotation;
    }

Examples of org.eclipse.persistence.queries.AttributeGroup.addAttribute()

            for(XmlNamedObjectGraph next:info.getObjectGraphs()) {
                AttributeGroup group = descriptor.getAttributeGroup(next.getName());
                Map<String, List<CoreAttributeGroup>> subgraphs = processSubgraphs(next.getXmlNamedSubgraph());
                for(XmlNamedAttributeNode nextAttributeNode:next.getXmlNamedAttributeNode()) {
                    if(nextAttributeNode.getSubgraph() == null || nextAttributeNode.getSubgraph().length() == 0) {
                        group.addAttribute(nextAttributeNode.getName());
                    } else {
                        List<CoreAttributeGroup> nestedGroups = subgraphs.get(nextAttributeNode.getSubgraph());
                        if(nestedGroups == null || nestedGroups.isEmpty()) {
                            Property property = info.getProperties().get(nextAttributeNode.getName());
                            JavaClass cls = property.getActualType();

Examples of org.eclipse.persistence.queries.ConstructorReportItem.addAttribute()

        item.setResultType(this.getJavaType());
        for(Selection selection : this.subSelections){
            if (((SelectionImpl)selection).isCompoundSelection()){
                item.addItem(((ConstructorSelectionImpl)selection).translate());
            }else{
                item.addAttribute(((SelectionImpl)selection).getCurrentNode());
            }
        }
        return item;

    }
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.