Examples of RuleList


Examples of org.apache.stanbol.rules.base.api.util.RuleList

         
            recipe = ruleStore.getRecipe(new UriRef(recipeID));

            if (ruleID != null && !ruleID.isEmpty()) {
                rule = ruleStore.getRule(recipe, new UriRef(ruleID));
                RuleList ruleList = new RuleList();
                ruleList.add(rule);

                recipe = new RecipeImpl(recipe.getRecipeID(), recipe.getRecipeDescription(), ruleList);
            }

            responseBuilder = Response.ok(recipe);
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.util.RuleList

     
            recipe = ruleStore.getRecipe(new UriRef(recipeID));

            if (ruleID != null && !ruleID.isEmpty()) {
                rule = ruleStore.getRule(recipe, new UriRef(ruleID));
                RuleList ruleList = new RuleList();
                ruleList.add(rule);

                recipe = new RecipeImpl(recipe.getRecipeID(), recipe.getRecipeDescription(), ruleList);
            }

            responseBuilder = Response.ok(new Viewable("rules", new RulesPrettyPrintResource(servletContext,
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.util.RuleList

   
            OWLOntology ontology;
            try {
                ontology = manager.createOntology();
   
                RuleList rules = recipe.getRuleList();
   
                UriRef recipeID = recipe.getRecipeID();
   
                String recipeURI = recipeID.toString().replace("<", "").replace(">", "");
                IRI recipeIRI = IRI.create(recipeURI);
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.util.RuleList

                        /**
                         * Create the Recipe object.
                         */

                        RuleList ruleList = RuleParserImpl.parse(kReSRulesInKReSSyntax).getkReSRuleList();
                        recipe = new RecipeImpl(recipeIRI, recipeDescription, ruleList);
                    } else {
                        throw new NoSuchRecipeException(recipeIRI);
                    }
                }
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.util.RuleList

        TcManager tcm = new SpecialTcManager(qe, wtcp);

        String recipe = "rule[is(<http://kres.iks-project.eu/ontology.owl#Person>, ?x) -> is(<http://xmlns.com/foaf/0.1/Person>, ?x)]";

        KB kb = RuleParserImpl.parse(recipe);
        RuleList ruleList = kb.getkReSRuleList();
        Recipe actualRecipe = new RecipeImpl(null, null, ruleList);

        Refactorer refactorer = new RefactorerImpl(null, new Serializer(), tcm, ruleStore,
                emptyConfig);
        try {
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.util.RuleList


  @Override
  public void addKReSRule(Rule kReSRule) {
    if(kReSRuleList == null){
      kReSRuleList = new RuleList();
    }
    kReSRuleList.add(kReSRule);
   
  }
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.util.RuleList

        /**
         * Finally also the in-memory representation of the Recipe passed as input is modified.
         */
        KB kb = RuleParserImpl.parse(stanbolSyntaxRule);
        RuleList ruleList = kb.getkReSRuleList();
        for (Rule rule : ruleList) {

            /**
             * The rule must be added to the ontology, so 1. an IRI is created from its name 2. the rule
             * in Stanbol syntax is added to the rule as a literal through the hasBobyAndHe data property. 3. the rule is
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.util.RuleList

        /**
         * Finally also the in-memory representation of the Recipe passed as input is modified.
         */
        KB kb = RuleParserImpl.parse(rulesStream);
        RuleList ruleList = kb.getkReSRuleList();
        for (Rule rule : ruleList) {

            /**
             * The rule must be added to the ontology, so 1. an IRI is created from its name 2. the rule
             * in Stanbol syntax is added to the rule as a literal through the hasBobyAndHe data property. 3. the rule is
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.util.RuleList

    @Override
    public void createRecipe(String recipeID, String stanbolRule) {
        log.debug("Create recipe " + recipeID + " with rules in Stanbol sytnax " + stanbolRule, this);
        KB kb = RuleParserImpl.parse(stanbolRule);
        RuleList rules = kb.getkReSRuleList();

        AddRule addRule = new AddRule(this);

        Vector<IRI> ruleVectorIRIs = new Vector<IRI>();
        log.debug("Rules are " + rules.size());
        for (Rule rule : rules) {
            log.debug("Creating rule " + rule.getRuleName());
            String stanbolSyntax = rule.toKReSSyntax();

            log.debug("Rule in Stanbol Syntax : " + stanbolSyntax);
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.util.RuleList

                /**
                 * Create the Recipe object.
                 */
                log.debug("Recipe in Stanbol Syntax : " + stanbolRule);

                RuleList ruleList = null;

                if (!stanbolRule.isEmpty()) {
                    ruleList = generateKnowledgeBase(stanbolRule);
                }

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.