Package org.apache.stanbol.rules.manager.atoms

Examples of org.apache.stanbol.rules.manager.atoms.ExpressionAtom


          {if (true) return new GreaterEqualThanAtom(obj1, obj2);}
    throw new Error("Missing return statement in function");
  }

  final public DifferentAtom differentFromAtom() throws ParseException {
ExpressionAtom expressionAtom1; ExpressionAtom expressionAtom2;
    jj_consume_token(DIFFERENT);
    jj_consume_token(LPAR);
    expressionAtom1 = expressionAtom();
    jj_consume_token(COMMA);
    expressionAtom2 = expressionAtom();
View Full Code Here


                                                    {if (true) return variable;}
    throw new Error("Missing return statement in function");
  }

  final public ExpressionAtom literal() throws ParseException {
  ExpressionAtom literal; IObjectAtom typedLiteral;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case STRING:
      literal = getString();
      typedLiteral = typedLiteral();
      break;
View Full Code Here

                                         UnavailableRuleObjectException,
                                         UnsupportedTypeForExportException {

        org.apache.stanbol.rules.manager.atoms.LessEqualThanAtom tmp = (org.apache.stanbol.rules.manager.atoms.LessEqualThanAtom) ruleAtom;

        ExpressionAtom argument1 = tmp.getArgument1();
        ExpressionAtom argument2 = tmp.getArgument2();

        OWLDataFactory factory = OWLManager.getOWLDataFactory();

        SWRLAtom swrlAtom1 = (SWRLAtom) adapter.adaptTo(argument1, SWRLRule.class);
        SWRLAtom swrlAtom2 = (SWRLAtom) adapter.adaptTo(argument2, SWRLRule.class);
View Full Code Here

    @Override
    public <T> T adapt(RuleAtom ruleAtom) throws RuleAtomCallExeption {

        org.apache.stanbol.rules.manager.atoms.TypedLiteralAtom tmp = (org.apache.stanbol.rules.manager.atoms.TypedLiteralAtom) ruleAtom;

        ExpressionAtom expressionAtom = tmp.getValue();

        Literal literal = null;

        if (expressionAtom instanceof StringAtom) {
            String value = expressionAtom.toString();

            literal = LiteralFactory.getInstance().createTypedLiteral(value);
        } else if (expressionAtom instanceof NumberAtom) {
            Number number = ((NumberAtom) expressionAtom).getNumberValue();
            literal = LiteralFactory.getInstance().createTypedLiteral(number);
View Full Code Here

                                         UnavailableRuleObjectException,
                                         UnsupportedTypeForExportException {

        org.apache.stanbol.rules.manager.atoms.GreaterEqualThanAtom tmp = (org.apache.stanbol.rules.manager.atoms.GreaterEqualThanAtom) ruleAtom;

        ExpressionAtom argument1 = tmp.getArgument1();
        ExpressionAtom argument2 = tmp.getArgument2();

        ClerezzaSparqlObject clerezzaArgument1 = (ClerezzaSparqlObject) adapter.adaptTo(argument1,
            ConstructQuery.class);
        ClerezzaSparqlObject clerezzaArgument2 = (ClerezzaSparqlObject) adapter.adaptTo(argument2,
            ConstructQuery.class);
View Full Code Here

                                         UnavailableRuleObjectException,
                                         UnsupportedTypeForExportException {

        org.apache.stanbol.rules.manager.atoms.DifferentAtom tmp = (org.apache.stanbol.rules.manager.atoms.DifferentAtom) ruleAtom;

        ExpressionAtom stringFunctionAtom1 = tmp.getStringFunctionAtom1();
        ExpressionAtom stringFunctionAtom2 = tmp.getStringFunctionAtom1();

        ClerezzaSparqlObject argument1 = (ClerezzaSparqlObject) adapter.adaptTo(stringFunctionAtom1,
            ConstructQuery.class);
        ClerezzaSparqlObject argument2 = (ClerezzaSparqlObject) adapter.adaptTo(stringFunctionAtom2,
            ConstructQuery.class);
View Full Code Here

                                         UnsupportedTypeForExportException,
                                         UnavailableRuleObjectException {

        org.apache.stanbol.rules.manager.atoms.GreaterEqualThanAtom tmp = (org.apache.stanbol.rules.manager.atoms.GreaterEqualThanAtom) ruleAtom;

        ExpressionAtom argument1 = tmp.getArgument1();
        ExpressionAtom argument2 = tmp.getArgument2();

        SPARQLObject sparqlArgument1 = adapter.adaptTo(argument1, SPARQLObject.class);
        SPARQLObject sparqlArgument2 = adapter.adaptTo(argument2, SPARQLObject.class);

        String arg1 = sparqlArgument1.getObject();
View Full Code Here

    public <T> T adapt(RuleAtom ruleAtom) throws RuleAtomCallExeption,
                                         UnavailableRuleObjectException,
                                         UnsupportedTypeForExportException {

        org.apache.stanbol.rules.manager.atoms.DifferentAtom tmp = (org.apache.stanbol.rules.manager.atoms.DifferentAtom) ruleAtom;
        ExpressionAtom expressionAtom1 = tmp.getStringFunctionAtom1();
        ExpressionAtom expressionAtom2 = tmp.getStringFunctionAtom2();

        SPARQLObject sparqlArgument1 = adapter.adaptTo(expressionAtom1, SPARQLObject.class);
        SPARQLObject sparqlArgument2 = adapter.adaptTo(expressionAtom2, SPARQLObject.class);

        String argument1 = sparqlArgument1.getObject();
View Full Code Here

        String mul_result = "subtraction_result" + System.currentTimeMillis();

        org.apache.stanbol.rules.manager.atoms.SubtractionAtom tmp = (org.apache.stanbol.rules.manager.atoms.SubtractionAtom) ruleAtom;

        ExpressionAtom argument1 = tmp.getNumericFunctionAtom1();
        ExpressionAtom argument2 = tmp.getNumericFunctionAtom2();

        OWLDataFactory factory = OWLManager.getOWLDataFactory();

        SWRLAtom swrlAtom1 = (SWRLAtom) adapter.adaptTo(argument1, SWRLRule.class);
        SWRLAtom swrlAtom2 = (SWRLAtom) adapter.adaptTo(argument2, SWRLRule.class);
View Full Code Here

                                         UnavailableRuleObjectException,
                                         UnsupportedTypeForExportException {

        org.apache.stanbol.rules.manager.atoms.LessThanAtom tmp = (org.apache.stanbol.rules.manager.atoms.LessThanAtom) ruleAtom;

        ExpressionAtom argument1 = tmp.getArgument1();
        ExpressionAtom argument2 = tmp.getArgument2();

        ClerezzaSparqlObject clerezzaArgument1 = (ClerezzaSparqlObject) adapter.adaptTo(argument1,
            ConstructQuery.class);
        ClerezzaSparqlObject clerezzaArgument2 = (ClerezzaSparqlObject) adapter.adaptTo(argument2,
            ConstructQuery.class);
View Full Code Here

TOP

Related Classes of org.apache.stanbol.rules.manager.atoms.ExpressionAtom

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.