Examples of FactType


Examples of gov.nist.checklists.xccdf.x11.FactType

  public void appendFacts(List<Fact> facts) {
    if (!facts.isEmpty()) {
      TargetFactsType factsType = data.addNewTargetFacts();
      for (Fact fact : facts) {
        FactType factType = factsType.addNewFact();
        factType.setName(fact.getName());
        factType.setType(mapValueType(fact.getType()));
        factType.setStringValue(fact.getValue());
      }
    }
  }
View Full Code Here

Examples of gov.nist.checklists.xccdf.x12.FactType

  public void appendFacts(List<Fact> facts) {
    if (!facts.isEmpty()) {
      TargetFactsType factsType = data.addNewTargetFacts();
      for (Fact fact : facts) {
        FactType factType = factsType.addNewFact();
        factType.setName(fact.getName());
        factType.setType(mapValueType(fact.getType()));
        factType.setStringValue(fact.getValue());
      }
    }
  }
View Full Code Here

Examples of org.drools.definition.type.FactType

        try {
            // has to execute queued actions, as there might be pending
            // compilation data reloads
            this.executeQueuedActions();
            for (Package pkg : this.pkgs.values()) {
                FactType type = pkg.getFactType( name );
                if (type != null) {
                    return type;
                }
            }
            return null;
View Full Code Here

Examples of org.drools.rule.FactType

        return false;
    }

    public FactType getFactType(final String name) {
        for ( Package pkg : this.pkgs.values() ) {
            FactType type = pkg.getFactType( name );
            if ( type != null ) {
                return type;
            }
        }
        return null;
View Full Code Here

Examples of org.gedcomx.types.FactType

    if(dqFact.getTag() == null) {
      logger.warn(ConversionContext.getContext(), "Empty tag encountered");
    }
    else {
      String upperTag = dqFact.getTag().trim().toUpperCase();
      FactType factType = factMap.get(upperTag);
      if(factType == null) {
        // We don't show a warning for SEX since it is handled as gender in PersonMapper
        if(!upperTag.equals("SEX")) {
          logger.warn(ConversionContext.getContext(), "Ignoring tag: {}", dqFact.getTag());
        }
View Full Code Here

Examples of org.kie.api.definition.type.FactType

                     "end";

        KieBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();

        KnowledgeBase kbase = loadKnowledgeBase( "kb1", drl, conf );
        FactType ft = kbase.getFactType( "org.drools.test", "Annot" );
        try {
            Object o = ft.newInstance();
            Annot a = o.getClass().getDeclaredField( "id" ).getAnnotation( Annot.class );
            assertEquals( 3, a.intProp() );
            assertEquals( String.class, a.typeProp() );
            assertEquals( 0, a.typeArrProp().length );
        } catch ( Exception e ) {
View Full Code Here

Examples of org.kie.api.definition.type.FactType

                     "";

        KieBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();

        KnowledgeBase kbase = loadKnowledgeBase( "kb1", drl, conf );
        FactType ft = kbase.getFactType( "org.drools.test", "Annot" );
        assertNotNull( ft );
    }
View Full Code Here

Examples of org.kie.api.definition.type.FactType

        }

        private Object createDRLStock(final String name, final Double value)
                throws IllegalAccessException, InstantiationException {

            final FactType stockType = kbase.getFactType(DRL_PACKAGE_NAME, DRL_FACT_NAME);

            final Object stock = stockType.newInstance();
            stockType.set(stock, "name", name);
            stockType.set(stock, "value", value);

            return stock;
        }
View Full Code Here

Examples of org.kie.api.definition.type.FactType

    public FactType getFactType( final String name ) {
        readLock();
        try {
            for (Package pkg : this.pkgs.values()) {
                FactType type = pkg.getFactType( name );
                if (type != null) {
                    return type;
                }
            }
            return null;
View Full Code Here

Examples of org.kie.api.definition.type.FactType

        Collection<KnowledgePackage> kpackages = buildKnowledgePackage( resource,
                                                                        ResourceType.DRL );
        kbase.addKnowledgePackages( kpackages );
        StatefulKnowledgeSession ksession = createSession( kbase );

        FactType type = kbase.getFactType( "org.drools.test",
                                           "TestEvent" );
        Assert.assertNotNull( "could not get type",
                              type );

        ksession = disposeAndReloadSession( ksession,
                                            kbase );
        ksession.getEntryPoint( "Test" ).insert( type.newInstance() );
        ksession.fireAllRules();
        ksession = disposeAndReloadSession( ksession,
                                            kbase );

        ksession = disposeAndReloadSession( ksession,
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.