Return a reference to a new list cell whose head is value and whose tail is this list.
value
297298299300301302303304305306307
final Resource r = model.createResource(TestList.NS + "foo"); // create a list of foos for (int i = 0; i < 5; i++) { list = list.cons(r); } final int listLen = list.size(); // now append foos to the root list
443444445446447448449450451452453
final Resource r = model.createResource(TestList.NS + "a"); // cons each a's onto the front of the list for (int i = 0; i < 10; i++) { list = list.cons(r); } // now index them back again for (int j = 0; j < 10; j++) {
598599600601602603604605606607608
final Resource r2 = model.createResource(TestList.NS + "z"); for (int i = 0; i < 10; i++) { list0 = list0.cons(r0); list1 = list1.cons(r1); } // delete the elements of list0 one at a time while (!list0.isEmpty()) {
476477478479480481482483484485486
} } if(atomResource != null){ list = list.cons(atomResource); log.debug("ENTRO QUI "+list.size()); } }
227228229230231232233234235236237
//RDF list for body RDFList list = model.createList(); for(RuleAtom atom : body){ list = list.cons(atom.toSWRL(model)); } imp.addProperty(SWRL.body, list); //RDF list for head list = model.createList();
234235236237238239240241242243244
imp.addProperty(SWRL.body, list); //RDF list for head list = model.createList(); for(RuleAtom atom : head){ list = list.cons(atom.toSWRL(model)); } imp.addProperty(SWRL.head, list); }