java.lang.Object
org.apache.jena.rdf.model.impl.ModelListenerAdapter
- All Implemented Interfaces:
GraphListener
Adapter class that converts a ModelChangedListener into a GraphListener.
The only tricky bit is that we have to implement equality as equality of the
underlying ModelChangedListeners/ModelCom pairs.
This implementation only works for ModelCom models,
because it relies on various service methods; this gives the model the
opportunity to cache various mappings for efficiency.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()voidnotifyAddArray(Graph graph, Triple[] triples) Method called when an array of triples has been added to the graph.voidnotifyAddGraph(Graph g, Graph added) Method called when another graphghas been used to specify the triples added to our attached graph.voidnotifyAddIterator(Graph g, Iterator<Triple> it) Method called when an iterator [of triples] has been added to the graphvoidnotifyAddIterator(Graph g, List<Triple> triples) voidnotifyAddList(Graph g, List<Triple> triples) Method called when a list [of triples] has been added to the graph.voidnotifyAddTriple(Graph g, Triple t) Method called when a single triple has been added to the graph.voidnotifyDeleteArray(Graph g, Triple[] triples) Method called when an array of triples has been deleted from the graph.voidnotifyDeleteGraph(Graph g, Graph removed) Method to call when another graph has been used to specify the triples deleted from our attached graph.voidnotifyDeleteIterator(Graph g, Iterator<Triple> it) Method called when an iterator [of triples] has been deleted from the graph.voidnotifyDeleteList(Graph g, List<Triple> triples) Method called when a list [of triples] has been deleted from the graph.voidnotifyDeleteTriple(Graph g, Triple t) Method called when a single triple has been deleted from the graph.voidnotifyEvent(Graph g, Object event) method to call for a general event.
-
Constructor Details
-
ModelListenerAdapter
-
-
Method Details
-
notifyAddArray
Description copied from interface:GraphListenerMethod called when an array of triples has been added to the graph.- Specified by:
notifyAddArrayin interfaceGraphListener
-
notifyDeleteArray
Description copied from interface:GraphListenerMethod called when an array of triples has been deleted from the graph.- Specified by:
notifyDeleteArrayin interfaceGraphListener
-
notifyAddTriple
Description copied from interface:GraphListenerMethod called when a single triple has been added to the graph.- Specified by:
notifyAddTriplein interfaceGraphListener
-
notifyAddList
Description copied from interface:GraphListenerMethod called when a list [of triples] has been added to the graph.- Specified by:
notifyAddListin interfaceGraphListener
-
notifyAddIterator
Description copied from interface:GraphListenerMethod called when an iterator [of triples] has been added to the graph- Specified by:
notifyAddIteratorin interfaceGraphListener
-
notifyAddGraph
Description copied from interface:GraphListenerMethod called when another graphghas been used to specify the triples added to our attached graph.- Specified by:
notifyAddGraphin interfaceGraphListener- Parameters:
g- the graph of triples added
-
notifyDeleteIterator
Description copied from interface:GraphListenerMethod called when an iterator [of triples] has been deleted from the graph.- Specified by:
notifyDeleteIteratorin interfaceGraphListener
-
notifyDeleteTriple
Description copied from interface:GraphListenerMethod called when a single triple has been deleted from the graph.- Specified by:
notifyDeleteTriplein interfaceGraphListener
-
notifyAddIterator
-
notifyDeleteList
Description copied from interface:GraphListenerMethod called when a list [of triples] has been deleted from the graph.- Specified by:
notifyDeleteListin interfaceGraphListener
-
notifyDeleteGraph
Description copied from interface:GraphListenerMethod to call when another graph has been used to specify the triples deleted from our attached graph.- Specified by:
notifyDeleteGraphin interfaceGraphListener- Parameters:
g- the graph of triples added
-
notifyEvent
Description copied from interface:GraphListenermethod to call for a general event.valueis usually aGraphEvents. Special attention is drawn toGraphEvents.removeAlland events whoseGraphEvents.getTitle()is"remove"(seeGraphEvents.remove(Node, Node, Node). Unlike other notifications, the listener cannot tell which triples have been modified, since they have already been deleted by the time this event is sent, and the event does not include a record of them.- Specified by:
notifyEventin interfaceGraphListener
-
hashCode
public int hashCode() -
equals
-