Package org.apache.stanbol.rules.base.api

Examples of org.apache.stanbol.rules.base.api.RuleAtom


           
            variableMap = new HashMap<String,Integer>();
           
            Iterator<RuleAtom> it = headAtomList.iterator();
            while (it.hasNext()) {
                RuleAtom atom = it.next();
                ClauseEntry clauseEntry = adaptRuleAtomTo(atom, com.hp.hpl.jena.reasoner.rulesys.Rule.class);

                if (clauseEntry instanceof HigherOrderClauseEntry) {
                    List<ClauseEntry> clauseEntries = ((HigherOrderClauseEntry) clauseEntry)
                            .getClauseEntries();

                    for (ClauseEntry ce : clauseEntries) {
                        headClauseEntries.add(ce);
                    }
                } else {
                    headClauseEntries.add(clauseEntry);
                }
            }

            it = bodyAtomList.iterator();
            while (it.hasNext()) {
                RuleAtom atom = it.next();
                ClauseEntry clauseEntry = adaptRuleAtomTo(atom, com.hp.hpl.jena.reasoner.rulesys.Rule.class);

                if (clauseEntry instanceof HigherOrderClauseEntry) {
                    List<ClauseEntry> clauseEntries = ((HigherOrderClauseEntry) clauseEntry)
                            .getClauseEntries();
View Full Code Here


    }

    @Test
    public void testValidIndividualPropertyAtomWith() {

        RuleAtom ruleAtom = new IndividualPropertyAtom(objectProperty, argument1, argument2);

        execTest(ruleAtom);
    }
View Full Code Here

    }

    @Test
    public void testValidAtomWithVariableArguments() {

        RuleAtom ruleAtom = new LessThanAtom(variable1, variable2);

        execTest(ruleAtom);

    }
View Full Code Here

    }

    @Test
    public void testValidAtomWithLiteralArguments() {

        RuleAtom ruleAtom = new LessThanAtom(literal1, literal2);

        execTest(ruleAtom);
    }
View Full Code Here

    }

    @Test
    public void testValidAtomWithTypedLiteralArguments() {

        RuleAtom ruleAtom = new LessThanAtom(typedLiteral1, typedLiteral2);

        execTest(ruleAtom);
    }
View Full Code Here

          {if (true) return new AtomList[]{body, head};}
    throw new Error("Missing return statement in function");
  }

  final public AtomList atomList() throws ParseException {
AtomList atomList = new AtomList(); RuleAtom kReSAtom;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case SAME:
    case DIFFERENT:
    case LESSTHAN:
    case GREATERTHAN:
View Full Code Here

    }
    throw new Error("Missing return statement in function");
  }

  final public AtomList atomListRest() throws ParseException {
AtomList atomList = new AtomList(); RuleAtom kReSAtom;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case AND:
      jj_consume_token(AND);
      atomList = atomList();
          {if (true) return atomList;}
View Full Code Here

    }
    throw new Error("Missing return statement in function");
  }

  final public RuleAtom atom() throws ParseException {
RuleAtom ruleAtom;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case IS:
      ruleAtom = classAtom();
                         {if (true) return ruleAtom;}
      break;
View Full Code Here

          {if (true) return new PropStringAtom(stringFunctionAtom1, stringFunctionAtom2);}
    throw new Error("Missing return statement in function");
  }

  final public ComparisonAtom endsWithAtom() throws ParseException {
RuleAtom ruleAtom; StringFunctionAtom arg; StringFunctionAtom stringFunctionAtom;
    jj_consume_token(ENDS_WITH);
    jj_consume_token(LPAR);
    arg = stringFunctionAtom();
    jj_consume_token(COMMA);
    stringFunctionAtom = stringFunctionAtom();
View Full Code Here

         {if (true) return new EndsWithAtom(arg, stringFunctionAtom);}
    throw new Error("Missing return statement in function");
  }

  final public ComparisonAtom startsWithAtom() throws ParseException {
RuleAtom ruleAtom; StringFunctionAtom arg; StringFunctionAtom stringFunctionAtom;
    jj_consume_token(STARTS_WITH);
    jj_consume_token(LPAR);
    arg = stringFunctionAtom();
    jj_consume_token(COMMA);
    stringFunctionAtom = stringFunctionAtom();
View Full Code Here

TOP

Related Classes of org.apache.stanbol.rules.base.api.RuleAtom

Copyright © 2018 www.massapicom. 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.