1 6 package com.hp.hpl.jena.graph.impl; 7 8 import com.hp.hpl.jena.graph.Node; 9 import com.hp.hpl.jena.graph.Triple; 10 11 public abstract class SimpleReifierFragmentHandler implements ReifierFragmentHandler 12 { 13 int which; 14 SimpleReifierFragmentsMap map; 15 16 public SimpleReifierFragmentHandler( SimpleReifierFragmentsMap map, int n ) 17 { which = n; this.map = map; } 18 19 public abstract boolean clashesWith( ReifierFragmentsMap map, Node fragmentObject, Triple reified ); 20 21 public boolean clashedWith( Node fragmentObject, Triple reified ) 22 { 23 if (clashesWith( map, fragmentObject, reified )) 24 { 25 map.putAugmentedTriple( this, reified.getSubject(), fragmentObject, reified ); 26 return true; 27 } 28 else 29 return false; 30 } 31 32 public Triple reifyIfCompleteQuad( Triple fragment, Node tag, Node object ) 33 { 34 return map.reifyCompleteQuad( this, fragment, tag, object ); 35 } 36 37 43 public Triple removeFragment( Node tag, Triple already, Triple fragment ) 44 { 45 return map.removeFragment( this, tag, already, fragment ); 46 } 47 } 48 49 | Popular Tags |