/** Answer <code>true</code> iff <code>t</code> is in the graph as revealed by <code>find(t)</code> being non-empty. <code>t</code> may contain ANY wildcards. Sub-classes may over-ride reifierContains and graphBaseContains for efficiency. */ @Override public final boolean contains( Triple t ) { checkOpen(); return graphBaseContains( t ); }
/** Answer the size of this graph (ie the number of exposed triples). Defined as the size of the triple store plus the size of the reification store. Subclasses must override graphBaseSize() to reimplement (and reifierSize if they have some special reason for redefined that). */ @Override public final int size() { checkOpen() ; return graphBaseSize() ; }
/** Answer true iff this graph is isomorphic to <code>g</code> according to the algorithm (indeed, method) in <code>GraphMatcher</code>. */ @Override public boolean isIsomorphicWith( Graph g ) { checkOpen(); return g != null && GraphMatcher.equals( this, g ); }
/** Answer an (extended) iterator over all the triples in this Graph matching <code>m</code>. Subclasses cannot over-ride this, because it implements the appending of reification quadlets; instead they must implement graphBaseFind(TripleMatch). */ @Override public final ExtendedIterator<Triple> find(TripleMatch m) { checkOpen() ; return graphBaseFind(m) ; }
/** */ @Override public final ExtendedIterator<Triple> find( Node s, Node p, Node o ) { checkOpen(); return graphBaseFind( s, p, o ); }
/** Answer <code>true</code> if this graph contains <code>(s, p, o)</code>; this canonical implementation cannot be over-ridden. */ @Override public final boolean contains( Node s, Node p, Node o ) { checkOpen(); return contains( Triple.create( s, p, o ) ); }
/** Add a triple, and notify the event manager. Subclasses should not need to override this - we might make it final. The triple is added using performAdd, and notification done by notifyAdd. */ @Override public void add( Triple t ) { checkOpen(); performAdd( t ); notifyAdd( t ); }
/** Delete a triple, and notify the event manager. Subclasses should not need to override this - we might make it final. The triple is added using performDelete, and notification done by notifyDelete. */ @Override public final void delete( Triple t ) { checkOpen(); performDelete( t ); notifyDelete( t ); }