1 7 package com.hp.hpl.jena.rdf.arp; 8 9 13 class RDFTailCollection extends RDFCollection { 14 RDFTailCollection(ParserSupport x, ARPResource cell) { 15 super(x); 16 last = cell; 17 f = cell; 18 } 19 ARPResource last; 20 final ARPResource f; 21 private void endLastScope() { 22 if (last!=f) 23 X.arp.endLocalScope(last); 24 } 25 void terminate() { 26 last.setPredicateObject(rest, nil, null); 27 endLastScope(); 28 } 29 public void cleanUp() { 30 endLastScope(); 31 } 32 33 36 CollectionAction next(AResourceInternal head) { 37 ARPResource cell = new ARPResource(X.arp); 38 try { 39 last.setPredicateObject(rest, cell, null); 40 cell.setPredicateObject(first, head, null); 41 } 42 finally { 43 X.arp.endLocalScope(head); 44 endLastScope(); 45 last = cell; 46 } 47 return this; 48 } 49 } 50 51 | Popular Tags |