Search in sources :

Example 16 with IObjectAtom

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

the class RuleParserImpl method namespaceAtom.

public final NamespaceAtom namespaceAtom() throws ParseException {
    IObjectAtom uri;
    jj_consume_token(NAMESPACE);
    jj_consume_token(LPAR);
    uri = iObject();
    jj_consume_token(RPAR);
    {
        if (true)
            return new NamespaceAtom(uri);
    }
    throw new Error("Missing return statement in function");
}
Also used : NamespaceAtom(org.apache.stanbol.rules.manager.atoms.NamespaceAtom) IObjectAtom(org.apache.stanbol.rules.manager.atoms.IObjectAtom)

Example 17 with IObjectAtom

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

the class RuleParserImpl method typedLiteral.

public final IObjectAtom typedLiteral() throws ParseException {
    IObjectAtom type = null;
    switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
        case APOX:
            jj_consume_token(APOX);
            jj_consume_token(APOX);
            type = reference();
            break;
        default:
            jj_la1[14] = jj_gen;
    }
    {
        if (true)
            return type;
    }
    throw new Error("Missing return statement in function");
}
Also used : IObjectAtom(org.apache.stanbol.rules.manager.atoms.IObjectAtom)

Example 18 with IObjectAtom

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

the class RuleParserImpl method localnameAtom.

public final LocalNameAtom localnameAtom() throws ParseException {
    IObjectAtom uri;
    jj_consume_token(LOCALNAME);
    jj_consume_token(LPAR);
    uri = iObject();
    jj_consume_token(RPAR);
    {
        if (true)
            return new LocalNameAtom(uri);
    }
    throw new Error("Missing return statement in function");
}
Also used : LocalNameAtom(org.apache.stanbol.rules.manager.atoms.LocalNameAtom) IObjectAtom(org.apache.stanbol.rules.manager.atoms.IObjectAtom)

Example 19 with IObjectAtom

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

the class RuleParserImpl method newIRIAtom.

public final NewIRIAtom newIRIAtom() throws ParseException {
    IObjectAtom arg1;
    StringFunctionAtom arg2;
    jj_consume_token(NEW_IRI);
    jj_consume_token(LPAR);
    arg1 = iObject();
    jj_consume_token(COMMA);
    arg2 = stringFunctionAtom();
    jj_consume_token(RPAR);
    {
        if (true)
            return new NewIRIAtom(arg1, arg2);
    }
    throw new Error("Missing return statement in function");
}
Also used : StringFunctionAtom(org.apache.stanbol.rules.manager.atoms.StringFunctionAtom) NewIRIAtom(org.apache.stanbol.rules.manager.atoms.NewIRIAtom) IObjectAtom(org.apache.stanbol.rules.manager.atoms.IObjectAtom)

Example 20 with IObjectAtom

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

the class RuleParserImpl method iObject.

public final IObjectAtom iObject() throws ParseException {
    IObjectAtom uri;
    switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
        case NOTEX:
        case VARIABLE:
        case BNODE:
            uri = variable();
            {
                if (true)
                    return uri;
            }
            break;
        case VAR:
        case URI:
            uri = reference();
            {
                if (true)
                    return uri;
            }
            break;
        default:
            jj_la1[11] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
    }
    throw new Error("Missing return statement in function");
}
Also used : IObjectAtom(org.apache.stanbol.rules.manager.atoms.IObjectAtom)

Aggregations

IObjectAtom (org.apache.stanbol.rules.manager.atoms.IObjectAtom)36 RuleAtomCallExeption (org.apache.stanbol.rules.base.api.RuleAtomCallExeption)15 ConstructQuery (org.apache.clerezza.rdf.core.sparql.query.ConstructQuery)8 ClerezzaSparqlObject (org.apache.stanbol.rules.adapters.clerezza.ClerezzaSparqlObject)8 Node (com.hp.hpl.jena.graph.Node)7 ClauseEntry (com.hp.hpl.jena.reasoner.rulesys.ClauseEntry)7 ArrayList (java.util.ArrayList)7 NodeClauseEntry (org.apache.stanbol.rules.adapters.jena.NodeClauseEntry)7 StringFunctionAtom (org.apache.stanbol.rules.manager.atoms.StringFunctionAtom)6 IRI (org.apache.clerezza.commons.rdf.IRI)5 TriplePattern (com.hp.hpl.jena.reasoner.TriplePattern)4 BuiltInCall (org.apache.clerezza.rdf.core.sparql.query.BuiltInCall)4 Expression (org.apache.clerezza.rdf.core.sparql.query.Expression)4 ResourceOrVariable (org.apache.clerezza.rdf.core.sparql.query.ResourceOrVariable)4 UriRefOrVariable (org.apache.clerezza.rdf.core.sparql.query.UriRefOrVariable)4 Variable (org.apache.clerezza.rdf.core.sparql.query.Variable)4 SimpleTriplePattern (org.apache.clerezza.rdf.core.sparql.query.impl.SimpleTriplePattern)4 ArgumentSWRLAtom (org.apache.stanbol.rules.adapters.swrl.ArgumentSWRLAtom)4 RuleAtom (org.apache.stanbol.rules.base.api.RuleAtom)4 SPARQLObject (org.apache.stanbol.rules.base.api.SPARQLObject)4