1 6 package com.hp.hpl.jena.graph.compose; 7 8 import com.hp.hpl.jena.graph.Graph; 9 import com.hp.hpl.jena.graph.Triple; 10 import com.hp.hpl.jena.graph.TripleMatch; 11 import com.hp.hpl.jena.util.iterator.ExtendedIterator; 12 13 21 public class DisjointUnion extends Dyadic 22 { 23 public DisjointUnion( Graph L, Graph R ) 24 { super( L, R ); } 25 26 public ExtendedIterator graphBaseFind( TripleMatch m ) 27 { return L.find( m ) .andThen( R.find( m ) ); } 28 29 public boolean graphBaseContains( Triple t ) 30 { return L.contains( t ) || R.contains( t ); } 31 32 public void performDelete( Triple t ) 33 { L.delete( t ); R.delete( t ); } 34 35 public void performAdd( Triple t ) 36 { if (!R.contains( t )) L.add( t ); } 37 } 38 39 40 | Popular Tags |