Package com.hp.hpl.jena.reasoner.rulesys

Examples of com.hp.hpl.jena.reasoner.rulesys.ClauseEntry


        IObjectAtom datatypeProperty = tmp.getDatatypeProperty();

        RuleAtom argument2 = tmp.getArgument2();

        ClauseEntry argument2ClauseEntry = (ClauseEntry) adapter.adaptTo(argument2, Rule.class);
        ClauseEntry argument1ClauseEntry = (ClauseEntry) adapter.adaptTo(argument1, Rule.class);
        ClauseEntry datatypePropertyClauseEntry = (ClauseEntry) adapter.adaptTo(datatypeProperty, Rule.class);

        Node subjectNode = null;
        Node predicateNode = null;
        Node objectNode = null;
View Full Code Here


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

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

        ClauseEntry argument1CE = (ClauseEntry) adapter.adaptTo(argument1, Rule.class);
        ClauseEntry argument2CE = (ClauseEntry) adapter.adaptTo(argument2, Rule.class);

        Node arg1Node;
        Node arg2Node;

        if (argument1CE instanceof NodeClauseEntry) {
View Full Code Here

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

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

        ClauseEntry clauseEntry1 = adapter.adaptTo(argument1, Rule.class);
        ClauseEntry clauseEntry2 = adapter.adaptTo(argument2, Rule.class);

        List<ClauseEntry> clauseEntries = new ArrayList<ClauseEntry>();

        if (clauseEntry1 instanceof HigherOrderClauseEntry) {
            arg1Node = ((HigherOrderClauseEntry) clauseEntry1).getBindableNode();
View Full Code Here

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

        ExpressionAtom argument1 = tmp.getStringFunctionAtom1();
        ExpressionAtom argument2 = tmp.getStringFunctionAtom2();

        ClauseEntry clauseEntry1 = adapter.adaptTo(argument1, Rule.class);
        ClauseEntry clauseEntry2 = adapter.adaptTo(argument2, Rule.class);

        List<ClauseEntry> clauseEntries = new ArrayList<ClauseEntry>();

        if (clauseEntry1 instanceof HigherOrderClauseEntry) {
            arg1Node = ((HigherOrderClauseEntry) clauseEntry1).getBindableNode();
View Full Code Here

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

        ExpressionAtom argument = tmp.getArgument();
        ExpressionAtom term = tmp.getTerm();

        ClauseEntry clauseEntry1 = adapter.adaptTo(argument, Rule.class);
        ClauseEntry clauseEntry2 = adapter.adaptTo(term, Rule.class);

        List<ClauseEntry> clauseEntries = new ArrayList<ClauseEntry>();

        if (clauseEntry1 instanceof HigherOrderClauseEntry) {
            arg1Node = ((HigherOrderClauseEntry) clauseEntry1).getBindableNode();
View Full Code Here

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

        NumericFunctionAtom numericFunctionAtom1 = tmp.getNumericFunctionAtom1();
        NumericFunctionAtom numericFunctionAtom2 = tmp.getNumericFunctionAtom2();

        ClauseEntry clauseEntry1 = adapter.adaptTo(numericFunctionAtom1, Rule.class);
        ClauseEntry clauseEntry2 = adapter.adaptTo(numericFunctionAtom2, Rule.class);

        List<ClauseEntry> clauseEntries = new ArrayList<ClauseEntry>();

        if (clauseEntry1 instanceof HigherOrderClauseEntry) {
            arg1Node = ((HigherOrderClauseEntry) clauseEntry1).getBindableNode();

            clauseEntries.addAll(((HigherOrderClauseEntry) clauseEntry1).getClauseEntries());
        } else if (clauseEntry1 instanceof NodeClauseEntry) {
            arg1Node = ((NodeClauseEntry) clauseEntry1).getNode();
        } else {
            throw new org.apache.stanbol.rules.base.api.RuleAtomCallExeption(getClass());
        }

        if (clauseEntry2 instanceof HigherOrderClauseEntry) {
            arg2Node = ((HigherOrderClauseEntry) clauseEntry2).getBindableNode();

            clauseEntries.addAll(((HigherOrderClauseEntry) clauseEntry2).getClauseEntries());
        } else if (clauseEntry2 instanceof NodeClauseEntry) {
            arg2Node = ((NodeClauseEntry) clauseEntry2).getNode();
        } else {
            throw new org.apache.stanbol.rules.base.api.RuleAtomCallExeption(getClass());
        }

        java.util.List<Node> nodes = new ArrayList<Node>();

        nodes.add(arg1Node);
        nodes.add(arg2Node);
        nodes.add(arg3Node);

        ClauseEntry clauseEntry = new Functor("sum", nodes, BuiltinRegistry.theRegistry);

        clauseEntries.add(clauseEntry);

        return (T) new HigherOrderClauseEntry(arg3Node, clauseEntries);
View Full Code Here

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

        IObjectAtom uriResource = tmp.getUriResource();

        ClauseEntry argumentClauseEntry = (ClauseEntry) adapter.adaptTo(uriResource, Rule.class);

        Node argNode;

        if (argumentClauseEntry instanceof NodeClauseEntry) {
            argNode = ((NodeClauseEntry) argumentClauseEntry).getNode();
View Full Code Here

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

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

        ClauseEntry clauseEntry1 = adapter.adaptTo(argument1, Rule.class);
        ClauseEntry clauseEntry2 = adapter.adaptTo(argument2, Rule.class);

        List<ClauseEntry> clauseEntries = new ArrayList<ClauseEntry>();

        if (clauseEntry1 instanceof HigherOrderClauseEntry) {
            arg1Node = ((HigherOrderClauseEntry) clauseEntry1).getBindableNode();
View Full Code Here

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

        StringFunctionAtom parameterFunctionAtom = tmp.getParameterFunctionAtom();
        IObjectAtom variableIObjectAtom = tmp.getVariable();

        ClauseEntry parameterClauseEntry = (ClauseEntry) adapter.adaptTo(parameterFunctionAtom, Rule.class);
        ClauseEntry variableClauseEntry = (ClauseEntry) adapter.adaptTo(variableIObjectAtom, Rule.class);

        List<ClauseEntry> clauseEntries = new ArrayList<ClauseEntry>();

        Node parameterNode;
        Node variableNode;

        if (parameterClauseEntry instanceof HigherOrderClauseEntry) {
            parameterNode = ((HigherOrderClauseEntry) parameterClauseEntry).getBindableNode();

            clauseEntries.addAll(((HigherOrderClauseEntry) parameterClauseEntry).getClauseEntries());
        } else if (parameterClauseEntry instanceof NodeClauseEntry) {
            parameterNode = ((NodeClauseEntry) parameterClauseEntry).getNode();
        } else {
            throw new RuleAtomCallExeption(getClass());
        }

        if (variableClauseEntry instanceof NodeClauseEntry) {
            variableNode = ((NodeClauseEntry) variableClauseEntry).getNode();
        } else {
            throw new RuleAtomCallExeption(getClass());
        }

        java.util.List<Node> nodes = new ArrayList<Node>();

        nodes.add(variableNode);
        nodes.add(parameterNode);

        ClauseEntry clauseEntry = new Functor("makeSkolem", nodes, BuiltinRegistry.theRegistry);

        clauseEntries.add(clauseEntry);

        return (T) new HigherOrderClauseEntry(variableNode, clauseEntries);
View Full Code Here

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

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

        ClauseEntry clauseEntry1 = adapter.adaptTo(argument1, Rule.class);
        ClauseEntry clauseEntry2 = adapter.adaptTo(argument2, Rule.class);

        List<ClauseEntry> clauseEntries = new ArrayList<ClauseEntry>();

        if (clauseEntry1 instanceof HigherOrderClauseEntry) {
            arg1Node = ((HigherOrderClauseEntry) clauseEntry1).getBindableNode();
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.reasoner.rulesys.ClauseEntry

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.