1 6 7 12 13 package com.hp.hpl.jena.graph.compose; 14 15 import com.hp.hpl.jena.graph.*; 16 import com.hp.hpl.jena.util.iterator.*; 17 18 19 24 25 public class Intersection extends Dyadic implements Graph 26 { 27 public Intersection( Graph L, Graph R ) 28 { 29 super( L, R ); 30 } 31 32 public void performAdd( Triple t ) 33 { 34 L.add( t ); 35 R.add( t ); 36 } 37 38 public void performDelete( Triple t ) 39 { 40 if (this.contains( t )) L.delete( t ); 41 } 42 43 public ExtendedIterator graphBaseFind( TripleMatch s ) 44 { 45 return L.find( s ) .filterKeep( ifIn( R ) ); 46 } 47 } 48 49 50 79 | Popular Tags |