Search in sources :

Example 16 with RuleAtom

use of org.apache.stanbol.rules.base.api.RuleAtom in project stanbol by apache.

the class LessThanAtomTest method testValidAtomWithVariableArguments.

@Test
public void testValidAtomWithVariableArguments() {
    RuleAtom ruleAtom = new LessThanAtom(variable1, variable2);
    execTest(ruleAtom);
}
Also used : RuleAtom(org.apache.stanbol.rules.base.api.RuleAtom) Test(org.junit.Test)

Example 17 with RuleAtom

use of org.apache.stanbol.rules.base.api.RuleAtom in project stanbol by apache.

the class RuleParserImpl method dObject.

public final RuleAtom dObject() throws ParseException {
    RuleAtom variable;
    switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
        case NUM:
        case STRING:
            variable = literal();
            break;
        case NOTEX:
        case VARIABLE:
        case BNODE:
            variable = variable();
            break;
        default:
            jj_la1[12] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
    }
    {
        if (true)
            return variable;
    }
    throw new Error("Missing return statement in function");
}
Also used : RuleAtom(org.apache.stanbol.rules.base.api.RuleAtom)

Example 18 with RuleAtom

use of org.apache.stanbol.rules.base.api.RuleAtom in project stanbol by apache.

the class ClassAtomTest method testValidClassAtomWith.

@Test
public void testValidClassAtomWith() {
    RuleAtom ruleAtom = new ClassAtom(classResource, argument1);
    execTest(ruleAtom);
}
Also used : RuleAtom(org.apache.stanbol.rules.base.api.RuleAtom) Test(org.junit.Test)

Example 19 with RuleAtom

use of org.apache.stanbol.rules.base.api.RuleAtom in project stanbol by apache.

the class DatavaluedPropertyAtomTest method testValidAtomWithVariableArguments.

@Test
public void testValidAtomWithVariableArguments() {
    RuleAtom ruleAtom = new DatavaluedPropertyAtom(datatypeProperty, argument1, variable);
    execTest(ruleAtom);
}
Also used : RuleAtom(org.apache.stanbol.rules.base.api.RuleAtom) Test(org.junit.Test)

Example 20 with RuleAtom

use of org.apache.stanbol.rules.base.api.RuleAtom in project stanbol by apache.

the class DatavaluedPropertyAtomTest method testValidAtomWithLiteralArguments.

@Test
public void testValidAtomWithLiteralArguments() {
    RuleAtom ruleAtom = new DatavaluedPropertyAtom(datatypeProperty, argument1, literal);
    execTest(ruleAtom);
}
Also used : RuleAtom(org.apache.stanbol.rules.base.api.RuleAtom) Test(org.junit.Test)

Aggregations

RuleAtom (org.apache.stanbol.rules.base.api.RuleAtom)33 Test (org.junit.Test)11 RuleAtomCallExeption (org.apache.stanbol.rules.base.api.RuleAtomCallExeption)4 AtomList (org.apache.stanbol.rules.base.api.util.AtomList)4 IObjectAtom (org.apache.stanbol.rules.manager.atoms.IObjectAtom)4 ArrayList (java.util.ArrayList)3 UnsupportedTypeForExportException (org.apache.stanbol.rules.base.api.UnsupportedTypeForExportException)3 ClauseEntry (com.hp.hpl.jena.reasoner.rulesys.ClauseEntry)2 HashSet (java.util.HashSet)2 SPARQLObject (org.apache.stanbol.rules.base.api.SPARQLObject)2 StringFunctionAtom (org.apache.stanbol.rules.manager.atoms.StringFunctionAtom)2 OWLDataFactory (org.semanticweb.owlapi.model.OWLDataFactory)2 SWRLAtom (org.semanticweb.owlapi.model.SWRLAtom)2 Node (com.hp.hpl.jena.graph.Node)1 TriplePattern (com.hp.hpl.jena.reasoner.TriplePattern)1 IRI (org.apache.clerezza.commons.rdf.IRI)1 ConstructQuery (org.apache.clerezza.rdf.core.sparql.query.ConstructQuery)1 Expression (org.apache.clerezza.rdf.core.sparql.query.Expression)1 LiteralExpression (org.apache.clerezza.rdf.core.sparql.query.LiteralExpression)1 ResourceOrVariable (org.apache.clerezza.rdf.core.sparql.query.ResourceOrVariable)1