Examples of addRule()


Examples of org.apache.hivemind.schema.impl.ElementModelImpl.addRule()

        ElementModelImpl em = new ElementModelImpl();

        em.setElementName("fred");
        em.setContentTranslator("smart");

        em.addRule(new CreateObjectRule(StringHolderImpl.class.getName()));

        ReadContentRule rule = new ReadContentRule();
        rule.setPropertyName("value");

        em.addRule(rule);
View Full Code Here

Examples of org.apache.joran.RuleStore.addRule()

    // Create a simple rule store where pattern and action associations will
    // be kept.
    RuleStore ruleStore = new SimpleRuleStore();

    // Associate "hello-world" pattern with  HelloWorldAction
    ruleStore.addRule(new Pattern("hello-world"), new HelloWorldAction());

    // Create a new Joran Interpreter and hand it our simple rule store.
    Interpreter ji = new Interpreter(ruleStore);

    // Create a SAX parser
View Full Code Here

Examples of org.apache.joran.helper.SimpleRuleStore.addRule()

    // Create a simple rule store where pattern and action associations will
    // be kept.
    RuleStore ruleStore = new SimpleRuleStore();

    // Associate "hello-world" pattern with  HelloWorldAction
    ruleStore.addRule(new Pattern("hello-world"), new HelloWorldAction());

    // Create a new Joran Interpreter and hand it our simple rule store.
    Interpreter ji = new Interpreter(ruleStore);

    // Create a SAX parser
View Full Code Here

Examples of org.apache.log4j.joran.spi.RuleStore.addRule()

      new Pattern("configuration/logger/level"), new LevelAction());
    rs.addRule(
      new Pattern("configuration/logger/priority"), new PriorityAction());
    rs.addRule(
      new Pattern("configuration/root"), new RootLoggerAction());
    rs.addRule(
      new Pattern("configuration/root/level"), new LevelAction());
    rs.addRule(
      new Pattern("configuration/root/priority"), new PriorityAction());
    rs.addRule(
      new Pattern("configuration/logger/appender-ref"),
View Full Code Here

Examples of org.apache.log4j.joran.spi.SimpleRuleStore.addRule()

  }


  protected void selfInitialize(LoggerRepository repository) {
    RuleStore rs = new SimpleRuleStore(repository);
    rs.addRule(new Pattern("configuration"), new ConfigurationAction());
    rs.addRule(
      new Pattern("configuration/substitutionProperty"),
      new SubstitutionPropertyAction());
    rs.addRule(
      new Pattern("configuration/repositoryProperty"),
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.model.program.Program.addRule()

        PreparedStatement loadRule = getPreparedStatement("rules.load_by_program");
        synchronized (loadRule) {
            loadRule.setLong(1,program.getId());
            ResultSet ruleResult = loadRule.executeQuery();
            while(ruleResult.next()) {
                program.addRule(constructRuleFromDatabase(ruleResult,program.getNamespaces()));
            }
            ruleResult.close();
        }

        return program;
View Full Code Here

Examples of org.apache.myfaces.view.facelets.tag.MetaRulesetImpl.addRule()

        MetaRuleset m = new MetaRulesetImpl(_delegate.getTag(), type);
        // ignore standard component attributes
        m.ignore("binding").ignore("id");

        // add auto wiring for attributes
        m.addRule(ComponentRule.Instance);

        // if it's an ActionSource
        if (ActionSource.class.isAssignableFrom(type))
        {
            m.addRule(ActionSourceRule.Instance);
View Full Code Here

Examples of org.apache.savan.configuration.MappingRules.addRule()

        while (actionsIterator.hasNext()) {
            OMElement actionElement = null;
            String action = null;
            actionElement = (OMElement) actionsIterator.next();
            action = actionElement.getText();
            mappingRules.addRule(MappingRules.MAPPING_TYPE_ACTION, action);
        }
    }

    /**
     *
 
View Full Code Here

Examples of org.apache.stanbol.rules.manager.changes.AddRule.addRule()

        String ruleName = "MyRuleA";
        String ruleBodyHead = "MyRuleABody -> MyRuleAHead";
        String ruleDescription = "My comment to the rule A";
        AddRule instance = new AddRule(store);

        boolean result = instance.addRule(ruleName, ruleBodyHead, ruleDescription);
        OWLOntology newonto = instance.getStore().getOntology();
        String ID = newonto.getOntologyID().toString().replace("<", "").replace(">", "") + "#";

        if (result) {
            OWLNamedIndividual ruleind = newonto.getOWLOntologyManager().getOWLDataFactory()
View Full Code Here

Examples of org.apache.stanbol.rules.manager.changes.GetRule.addRule()

            // The rule is added to the store and to the recipe
            if ((kres_syntax != null) & (description != null)) {
                // Get the rule
                AddRule inrule = new AddRule(ruleStore);
                boolean ok = inrule.addRule(IRI.create(rule), kres_syntax, description);
                if (!ok) {
                    log.error("Problem to add: " + rule);
                    ResponseBuilder rb = Response.status(Status.CONFLICT);
                    MediaType mediaType = MediaTypeUtil.getAcceptableMediaType(headers, null);
                    if (mediaType != null) rb.header(HttpHeaders.CONTENT_TYPE, mediaType);
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.