Search in sources :

Example 16 with ExpressionAtom

use of org.apache.stanbol.rules.manager.atoms.ExpressionAtom in project stanbol by apache.

the class RuleParserImpl method sameAsAtom.

public final SameAtom sameAsAtom() throws ParseException {
    ExpressionAtom expressionAtom1;
    ExpressionAtom expressionAtom2;
    jj_consume_token(SAME);
    jj_consume_token(LPAR);
    expressionAtom1 = expressionAtom();
    jj_consume_token(COMMA);
    expressionAtom2 = expressionAtom();
    jj_consume_token(RPAR);
    {
        if (true)
            return new SameAtom(expressionAtom1, expressionAtom2);
    }
    throw new Error("Missing return statement in function");
}
Also used : SameAtom(org.apache.stanbol.rules.manager.atoms.SameAtom) ExpressionAtom(org.apache.stanbol.rules.manager.atoms.ExpressionAtom)

Example 17 with ExpressionAtom

use of org.apache.stanbol.rules.manager.atoms.ExpressionAtom in project stanbol by apache.

the class RuleParserImpl method lessThanAtom.

public final LessThanAtom lessThanAtom() throws ParseException {
    ExpressionAtom obj1;
    ExpressionAtom obj2;
    jj_consume_token(LESSTHAN);
    jj_consume_token(LPAR);
    obj1 = expressionAtom();
    jj_consume_token(COMMA);
    obj2 = expressionAtom();
    jj_consume_token(RPAR);
    {
        if (true)
            return new LessThanAtom(obj1, obj2);
    }
    throw new Error("Missing return statement in function");
}
Also used : LessThanAtom(org.apache.stanbol.rules.manager.atoms.LessThanAtom) ExpressionAtom(org.apache.stanbol.rules.manager.atoms.ExpressionAtom)

Example 18 with ExpressionAtom

use of org.apache.stanbol.rules.manager.atoms.ExpressionAtom in project stanbol by apache.

the class RuleParserImpl method differentFromAtom.

public final DifferentAtom differentFromAtom() throws ParseException {
    ExpressionAtom expressionAtom1;
    ExpressionAtom expressionAtom2;
    jj_consume_token(DIFFERENT);
    jj_consume_token(LPAR);
    expressionAtom1 = expressionAtom();
    jj_consume_token(COMMA);
    expressionAtom2 = expressionAtom();
    jj_consume_token(RPAR);
    {
        if (true)
            return new DifferentAtom(expressionAtom1, expressionAtom2);
    }
    throw new Error("Missing return statement in function");
}
Also used : DifferentAtom(org.apache.stanbol.rules.manager.atoms.DifferentAtom) ExpressionAtom(org.apache.stanbol.rules.manager.atoms.ExpressionAtom)

Example 19 with ExpressionAtom

use of org.apache.stanbol.rules.manager.atoms.ExpressionAtom in project stanbol by apache.

the class RuleParserImpl method greaterEqualThanAtom.

public final GreaterEqualThanAtom greaterEqualThanAtom() throws ParseException {
    ExpressionAtom obj1;
    ExpressionAtom obj2;
    jj_consume_token(GREATEREQUALTHAN);
    jj_consume_token(LPAR);
    obj1 = expressionAtom();
    jj_consume_token(COMMA);
    obj2 = expressionAtom();
    jj_consume_token(RPAR);
    {
        if (true)
            return new GreaterEqualThanAtom(obj1, obj2);
    }
    throw new Error("Missing return statement in function");
}
Also used : GreaterEqualThanAtom(org.apache.stanbol.rules.manager.atoms.GreaterEqualThanAtom) ExpressionAtom(org.apache.stanbol.rules.manager.atoms.ExpressionAtom)

Example 20 with ExpressionAtom

use of org.apache.stanbol.rules.manager.atoms.ExpressionAtom in project stanbol by apache.

the class RuleParserImpl method literal.

public final ExpressionAtom literal() throws ParseException {
    ExpressionAtom literal;
    IObjectAtom typedLiteral;
    switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
        case STRING:
            literal = getString();
            typedLiteral = typedLiteral();
            break;
        case NUM:
            literal = getInt();
            typedLiteral = typedLiteral();
            break;
        default:
            jj_la1[13] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
    }
    if (typedLiteral != null) {
        {
            if (true)
                return new TypedLiteralAtom(literal, typedLiteral);
        }
    } else {
        {
            if (true)
                return literal;
        }
    }
    throw new Error("Missing return statement in function");
}
Also used : TypedLiteralAtom(org.apache.stanbol.rules.manager.atoms.TypedLiteralAtom) IObjectAtom(org.apache.stanbol.rules.manager.atoms.IObjectAtom) ExpressionAtom(org.apache.stanbol.rules.manager.atoms.ExpressionAtom)

Aggregations

ExpressionAtom (org.apache.stanbol.rules.manager.atoms.ExpressionAtom)40 RuleAtomCallExeption (org.apache.stanbol.rules.base.api.RuleAtomCallExeption)20 ArrayList (java.util.ArrayList)18 Node (com.hp.hpl.jena.graph.Node)9 ClauseEntry (com.hp.hpl.jena.reasoner.rulesys.ClauseEntry)9 Functor (com.hp.hpl.jena.reasoner.rulesys.Functor)9 HigherOrderClauseEntry (org.apache.stanbol.rules.adapters.jena.HigherOrderClauseEntry)9 NodeClauseEntry (org.apache.stanbol.rules.adapters.jena.NodeClauseEntry)9 ArgumentSWRLAtom (org.apache.stanbol.rules.adapters.swrl.ArgumentSWRLAtom)9 HigherOrderSWRLAtom (org.apache.stanbol.rules.adapters.swrl.HigherOrderSWRLAtom)9 OWLDataFactory (org.semanticweb.owlapi.model.OWLDataFactory)9 SWRLArgument (org.semanticweb.owlapi.model.SWRLArgument)9 SWRLAtom (org.semanticweb.owlapi.model.SWRLAtom)9 SWRLDArgument (org.semanticweb.owlapi.model.SWRLDArgument)9 SWRLRule (org.semanticweb.owlapi.model.SWRLRule)9 SWRLBuiltInAtom (org.semanticweb.owlapi.model.SWRLBuiltInAtom)8 ClerezzaSparqlObject (org.apache.stanbol.rules.adapters.clerezza.ClerezzaSparqlObject)7 SPARQLObject (org.apache.stanbol.rules.base.api.SPARQLObject)7 BinaryOperation (org.apache.clerezza.rdf.core.sparql.query.BinaryOperation)6 ConstructQuery (org.apache.clerezza.rdf.core.sparql.query.ConstructQuery)6