@Test public void testAddListBNodeHeadEmptyNoContext() { this.testRdfListUtilDefaults.addList(this.testListHeadBNode1, this.testValuesEmpty, this.testGraph); assertEquals(0, this.testGraph.size()); }
public void addList(final Resource head, final List<Value> nextValues, final Model graphToAddTo, final Resource... contexts) { OpenRDFUtil.verifyContextNotNull(contexts); Resource aCurr = head; int i = 0; for (final Value nextValue : nextValues) { i++; final Resource aNext = valueFactory.createBNode(); graphToAddTo.add(aCurr, RDF.FIRST, nextValue, contexts); if (i < nextValues.size()) { graphToAddTo.add(aCurr, RDF.REST, aNext, contexts); } else { graphToAddTo.add(aCurr, RDF.REST, RDF.NIL, contexts); } aCurr = aNext; } }
RdfListUtil { public void addList(final Resource head, final List<Value> nextValues, final Model graphToAddTo, final Resource... contexts) { OpenRDFUtil.verifyContextNotNull(contexts); Resource aCurr = head; int i = 0; for (final Value nextValue : nextValues) { i++; final Resource aNext = valueFactory.createBNode(); graphToAddTo.add(aCurr, RDF.FIRST, nextValue, contexts); if (i < nextValues.size()) { graphToAddTo.add(aCurr, RDF.REST, aNext, contexts); } else { graphToAddTo.add(aCurr, RDF.REST, RDF.NIL, contexts); } aCurr = aNext; } } }
RdfListUtil { public void addList(final Resource head, final List<Value> nextValues, final Model graphToAddTo, final Resource... contexts) { OpenRDFUtil.verifyContextNotNull(contexts); Resource aCurr = head; int i = 0; for (final Value nextValue : nextValues) { i++; final Resource aNext = valueFactory.createBNode(); graphToAddTo.add(aCurr, RDF.FIRST, nextValue, contexts); if (i < nextValues.size()) { graphToAddTo.add(aCurr, RDF.REST, aNext, contexts); } else { graphToAddTo.add(aCurr, RDF.REST, RDF.NIL, contexts); } aCurr = aNext; } } RdfListUtil();  RdfListUtil(boolean checkCycles, boolean checkIncomplete, boolean useIterativeOnError); }
RdfListUtil { public void addList(final Resource head, final List<Value> nextValues, final Model graphToAddTo, final Resource... contexts) { OpenRDFUtil.verifyContextNotNull(contexts); Resource aCurr = head; int i = 0; for (final Value nextValue : nextValues) { i++; final Resource aNext = valueFactory.createBNode(); graphToAddTo.add(aCurr, RDF.FIRST, nextValue, contexts); if (i < nextValues.size()) { graphToAddTo.add(aCurr, RDF.REST, aNext, contexts); } else { graphToAddTo.add(aCurr, RDF.REST, RDF.NIL, contexts); } aCurr = aNext; } } RdfListUtil();  RdfListUtil(boolean checkCycles, boolean checkIncomplete, boolean useIterativeOnError); void addList(final Resource head,
                        final List<Value> nextValues,
                        final Model graphToAddTo,
                        final Resource... contexts); void addListAtNode(final Resource subject,
                              final IRI predicate, final List<Value> nextValues,
                              final Model graphToAddTo, final Resource... contexts); List<Value> getList(final Resource head,
                               final Model graphToSearch, final Resource... contexts); List<Value> getListAtNode(final Resource subject,
                                     final IRI predicate,
                                     final Model graphToSearch,
                                     final Resource... contexts); Collection<List<Value>> getListsIterative(final Set<Resource> heads,
                                                     final Model graphToSearch,
                                                     final Resource... contexts); Collection<List<Value>> getLists(final Set<Resource> heads,
                                            final Model graphToSearch,
                                            final Resource... contexts); Collection<List<Value>> getListsRecursive(final Resource head,
                                                     final Model graph,
                                                     final Resource... contexts); Collection<List<Value>> getListsAtNode(
            final Resource subject, final IRI predicate,
            final Model graphToSearch, final Resource... contexts); boolean getCheckCycles(); boolean getCheckIncomplete(); boolean getUseIterativeOnError(); }
RdfListUtil { public void addList(final Resource head, final List<Value> nextValues, final Model graphToAddTo, final Resource... contexts) { OpenRDFUtil.verifyContextNotNull(contexts); Resource aCurr = head; int i = 0; for (final Value nextValue : nextValues) { i++; final Resource aNext = valueFactory.createBNode(); graphToAddTo.add(aCurr, RDF.FIRST, nextValue, contexts); if (i < nextValues.size()) { graphToAddTo.add(aCurr, RDF.REST, aNext, contexts); } else { graphToAddTo.add(aCurr, RDF.REST, RDF.NIL, contexts); } aCurr = aNext; } } RdfListUtil();  RdfListUtil(boolean checkCycles, boolean checkIncomplete, boolean useIterativeOnError); void addList(final Resource head,
                        final List<Value> nextValues,
                        final Model graphToAddTo,
                        final Resource... contexts); void addListAtNode(final Resource subject,
                              final IRI predicate, final List<Value> nextValues,
                              final Model graphToAddTo, final Resource... contexts); List<Value> getList(final Resource head,
                               final Model graphToSearch, final Resource... contexts); List<Value> getListAtNode(final Resource subject,
                                     final IRI predicate,
                                     final Model graphToSearch,
                                     final Resource... contexts); Collection<List<Value>> getListsIterative(final Set<Resource> heads,
                                                     final Model graphToSearch,
                                                     final Resource... contexts); Collection<List<Value>> getLists(final Set<Resource> heads,
                                            final Model graphToSearch,
                                            final Resource... contexts); Collection<List<Value>> getListsRecursive(final Resource head,
                                                     final Model graph,
                                                     final Resource... contexts); Collection<List<Value>> getListsAtNode(
            final Resource subject, final IRI predicate,
            final Model graphToSearch, final Resource... contexts); boolean getCheckCycles(); boolean getCheckIncomplete(); boolean getUseIterativeOnError(); final static boolean DEFAULT_CHECK_CYCLES; final static boolean DEFAULT_CHECK_INCOMPLETE; final static boolean DEFAULT_USE_ITERATIVE_ON_ERROR; }