Package net.fortytwo.ripple.model

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


        // TODO: handle list containment cycles (e.g. list containing a list containing the original list) as well.
        // These are actually more likely than circular lists.
        Set<RDFValue> alreadyInterned = new HashSet<RDFValue>();

        RippleList cur = list;
        RDFValue id = cur.toRDF(this);
        while (!cur.isNil()) {
            if (alreadyInterned.contains(id)) {
                break;
            } else {
                alreadyInterned.add(id);
View Full Code Here


            if (cur.getFirst() instanceof RippleList) {
                internalize((RippleList) cur.getFirst());
            }

            RippleList rest = cur.getRest();
            RDFValue restRdf = rest.toRDF(this);

            buffer.put(
                    valueFactory.createStatement((Resource) id.sesameValue(), RDF.TYPE, RDF.LIST));
            buffer.put(
                    valueFactory.createStatement((Resource) id.sesameValue(), RDF.FIRST, firstRdf.sesameValue()));
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.