01: /*
02: (c) Copyright 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
03: All rights reserved - see end of file.
04: $Id: StoreTripleIteratorFaster.java,v 1.5 2008/01/02 12:09:58 andy_seaborne Exp $
05: */
06:
07: package com.hp.hpl.jena.mem.faster;
08:
09: import java.util.Iterator;
10:
11: import com.hp.hpl.jena.graph.Graph;
12: import com.hp.hpl.jena.mem.*;
13:
14: /**
15: @deprecated now StoreTRipleIterator can handle both kinds of
16: NodeToTriplesMap.
17: @author hedgehog
18: */
19: public class StoreTripleIteratorFaster extends TrackingTripleIterator {
20: protected NodeToTriplesMapBase X;
21: protected NodeToTriplesMapBase A;
22: protected NodeToTriplesMapBase B;
23: protected Graph toNotify;
24:
25: public StoreTripleIteratorFaster(Graph toNotify, Iterator it,
26: NodeToTriplesMapBase X, NodeToTriplesMapBase A,
27: NodeToTriplesMapBase B) {
28: super (it);
29: this .X = X;
30: this .A = A;
31: this .B = B;
32: this .toNotify = toNotify;
33: }
34:
35: public void remove() {
36: super .remove();
37: X.removedOneViaIterator();
38: A.remove(current);
39: B.remove(current);
40: toNotify.getEventManager()
41: .notifyDeleteTriple(toNotify, current);
42: }
43: }
44:
45: /*
46: * (c) Copyright 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
47: * All rights reserved.
48: *
49: * Redistribution and use in source and binary forms, with or without
50: * modification, are permitted provided that the following conditions
51: * are met:
52: * 1. Redistributions of source code must retain the above copyright
53: * notice, this list of conditions and the following disclaimer.
54: * 2. Redistributions in binary form must reproduce the above copyright
55: * notice, this list of conditions and the following disclaimer in the
56: * documentation and/or other materials provided with the distribution.
57: * 3. The name of the author may not be used to endorse or promote products
58: * derived from this software without specific prior written permission.
59: *
60: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
61: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
62: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
63: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
64: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
65: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
66: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
67: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
68: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
69: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
70: */
|