Examples of KB


Examples of org.apache.stanbol.rules.manager.KB

        TcManager tcm = new SpecialTcManager(qe, wtcp);

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

        KB kb = null;
        try {
            kb = RuleParserImpl.parse(recipe);
        } catch (IllegalStateException e) {
            assertTrue(true);
        }
View Full Code Here

Examples of org.apache.stanbol.rules.manager.KB

    return kb;
  }

  public static KB parse(InputStream inStream) {

    kb = new KB();
    Reader reader = new InputStreamReader(inStream);
    RuleParserImpl parser = new RuleParserImpl(reader);
    try {
      parser.start();
    } catch (TokenMgrError e) {
View Full Code Here

Examples of org.apache.stanbol.rules.manager.KB

        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();

        /**
         * 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.manager.KB

        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();

        /**
         * 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.manager.KB

    }

    @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());
View Full Code Here

Examples of org.apache.stanbol.rules.manager.KB

    protected void deactivate(ComponentContext context) {
        log.info("in " + RuleStoreImpl.class + " deactivate with context " + context);
    }

    private RuleList generateKnowledgeBase(String stanbolRule) {
        KB kb = RuleParserImpl.parse(stanbolRule);
        return kb.getkReSRuleList();
    }
View Full Code Here

Examples of org.apache.stanbol.rules.manager.KB

  static KB kb;

  public static KB parse(String inString) {

    kb = new KB();
    Reader reader = new StringReader(inString);
    RuleParserImpl parser = new RuleParserImpl(reader);
    try {
      parser.start();
    } catch (TokenMgrError e) {
View Full Code Here

Examples of org.apache.stanbol.rules.manager.KB

  }
 
  @Test
  public void testParser(){
    try{
      KB kReSKB = RuleParserImpl.parse(kReSRule);
      if(kReSKB != null){
        RuleList kReSRuleList = kReSKB.getkReSRuleList();
        if(kReSRuleList != null){
          for(Rule kReSRule : kReSRuleList){
              log.debug("RULE : "+kReSRule.toString());
          }
        }
View Full Code Here

Examples of org.semanticweb.owlapi.owllink.builtin.response.KB

  }
 
  @Test
  @Ignore
  public final void testCreateKB() throws OWLReasonerRuntimeException {
    KB expected = referenceReasoner.answer(new CreateKB());
    KB actual = heraklesReasoner.answer(new CreateKB());     
    assertEquals( expected, actual );
  }
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.