Package net.fortytwo.ripple.model

Examples of net.fortytwo.ripple.model.RippleValue.toRDF()


                         final ModelConnection mc)
            throws RippleException {
        Sink<RippleList> typeSink = new Sink<RippleList>() {
            public void put(final RippleList l) throws RippleException {
                RippleValue type = l.getFirst();
                Value t = (URI) type.toRDF(mc).sesameValue();
                if (t instanceof URI) {
                    sink.put(mc.list().push(mc.valueOf(value, (URI) t)));
                } else {
                    qe.getErrorPrintStream().println("datatype does not map to a URI reference: " + type);
                }
View Full Code Here


                        pushSink.put(new RDFValue(st.getObject()));
                    }
                }
            };

            mc.getStatements(head.toRDF(mc), null, null, stSink);

            /*
            int i = 1;
            while (true) { // Break out when there are no more members to produce
                Collector<RippleValue, RippleException> results = new Collector<RippleValue, RippleException>();
View Full Code Here

        RippleValue obj = h.findSingleObject(subj, pred);

        if (null == obj) {
            return null;
        } else {
            return obj.toRDF(mc).sesameValue().stringValue();
        }
    }

    private class UriTestCase {
        public TestType type;
View Full Code Here

        Collection<RippleList> r = reduce("time.");
        assertEquals(1, r.size());
        RippleList l = r.iterator().next();
        assertEquals(1, l.length());
        RippleValue v = l.getFirst();
        Value rv = v.toRDF(this.modelConnection).sesameValue();
        assertTrue(rv instanceof Literal);
        assertEquals(XMLSchema.LONG, ((Literal) rv).getDatatype());
        long t = ((Literal) rv).longValue();
        // April 10, 2011 will never come again.
        assertTrue(t > 1302390000000l);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.