Package net.fortytwo.ripple.model

Examples of net.fortytwo.ripple.model.StatementPatternQuery


                RippleValue predicate = predIter.next();
                printStream.print(predicate);
                printStream.print("\n");

                Collector<RippleValue> objects = new Collector<RippleValue>();
                StatementPatternQuery query = new StatementPatternQuery(subject, predicate, null);
                modelConnection.query(query, objects, false);

                int objCount = 0;

                Collection<RippleValue> objColl;
View Full Code Here


    private static void dereference(final RippleValue v, final ModelConnection mc)
            throws RippleException {
        try {
            if (null != v.toRDF(mc)) {
                StatementPatternQuery query = new StatementPatternQuery(v, RDF_FIRST, null);
                mc.query(query, new NullSink<RippleValue>(), false);
            }
        } catch (RippleException e) {
            // (soft fail... don't even log the error)
        }
View Full Code Here

        this.connection = connection;
    }

    public RippleValue findSingleObject(final RippleValue subj, final RippleValue pred)
            throws RippleException {
        StatementPatternQuery query = new StatementPatternQuery(subj, pred, null);
        Collector<RippleValue> results = new Collector<RippleValue>();
        connection.query(query, results, false);

        return results.isEmpty() ? null : results.iterator().next();
    }
View Full Code Here

    private static void multiply(final ModelConnection mc,
                                 final RippleValue subj,
                                 final RippleValue pred,
                                 final Sink<RippleValue> sink) throws RippleException {
        StatementPatternQuery query = new StatementPatternQuery(subj, pred, null);
        mc.query(query, sink, false);
    }
View Full Code Here

        RDFImporter importer = new RDFImporter(mc);
        SesameInputAdapter.parse(is, importer, "", RDFFormat.N3);
        mc.commit();

        Collector<RippleValue> cases = new Collector<RippleValue>();
        StatementPatternQuery query = new StatementPatternQuery(null, TYPE, URITEST);
        mc.query(query, cases, false);

        for (Object aCase : cases) {
            RippleValue caseValue = (RippleValue) aCase;
            (new UriTestCase(caseValue, mc)).test(mc);
View Full Code Here

TOP

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

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.