Package net.fortytwo.ripple.model

Examples of net.fortytwo.ripple.model.Operator


        final RippleList rest = stack.getRest();

        Sink<Operator> opSink = new Sink<Operator>() {
            public void put(final Operator op) throws RippleException {
                CriterionApplicator applicator = new CriterionApplicator(op);
                solutions.put(rest.push(new Operator(applicator)));
            }
        };

        Operator.createOperator(mapping, opSink, mc);
    }
View Full Code Here


                    solutions.add(left);
                    return;
                } else {
                    Closure c = new Closure(right.getFirst().getMapping(), first);
                    right = right.getRest();
                    left = left.getRest().push(new Operator(c));
                }
            } else {
                if (0 == f.arity()) {
                    Collector<RippleList> results = new Collector<RippleList>();
                    // Note: synchronous evaluation is required
View Full Code Here

            RippleList stack = arg;
            Decider decider = new Decider(stack);

            // Apply the criterion, sending the result into the Decider.
            solutions.put(stack.push(criterion).push(new Operator(decider)));
        }
View Full Code Here

    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {
        solutions.put(arg
                .push(innerOperator)
                .push(new Operator(new StarQuantifier(innerOperator))));
    }
View Full Code Here

                      final ModelConnection mc) throws RippleException {
        solutions.put(arg);

        solutions.put(arg
                .push(innerOperator)
                .push(new Operator(this)));
    }
View Full Code Here

            } else {
                int newMin = (0 == min) ? 0 : min - 1, newMax = max - 1;

                solutions.put(arg
                        .push(innerOperator)
                        .push(new Operator(new TimesQuantifier(innerOperator, newMin, newMax))));
            }
        }
    }
View Full Code Here

                    } else {
                        final Sink<RippleList> thisEval = this;
                        Sink<RippleList> argSink = new Sink<RippleList>() {
                            public void put(final RippleList arg) throws RippleException {
                                Closure c = new Closure(f, arg.getFirst());
                                new EvaluatorSink(thisEval, mc).put(arg.getRest().push(new Operator(c)));
                            }
                        };

                        // Reduce the argument portion of the stack.
                        new EvaluatorSink(argSink, mc).put(arg.getRest());
View Full Code Here

        stack = stack.getRest();

        RDFPredicateMapping mapping = getMapping(pred, context);

        solutions.put(
                stack.push(new Operator(mapping)));
    }
View Full Code Here

        RippleValue rtrue = stack.getFirst();
        stack = stack.getRest();
        RippleValue rfalse = stack.getFirst();
        stack = stack.getRest();

        Operator inner = new Operator(new IntersectInner());
        solutions.put(
                stack.push(rtrue).push(Operator.OP).push(mc.valueOf(true)).push(inner));
        solutions.put(
                stack.push(rfalse).push(Operator.OP).push(mc.valueOf(false)).push(inner));
    }
View Full Code Here

            boolean b = mc.toBoolean(arg.getFirst());

            if (b) {
                StackMapping a = new WhileApplicator(program, criterion);
                RippleList stack = originalStack.push(program).push(new Operator(a));
                solutions.put(stack);
            } else {
                solutions.put(originalStack);
            }
        }
View Full Code Here

TOP

Related Classes of net.fortytwo.ripple.model.Operator

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.