public class ModelListenerAdapter extends Object implements GraphListener
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 and Description |
---|
ModelListenerAdapter(ModelCom m,
ModelChangedListener L) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
void |
notifyAddArray(Graph graph,
Triple[] triples)
Method called when an array of triples has been added to the graph.
|
void |
notifyAddGraph(Graph g,
Graph added)
Method called when another graph
g has been used to
specify the triples added to our attached graph. |
void |
notifyAddIterator(Graph g,
Iterator<Triple> it)
Method called when an iterator [of triples] has been added to the graph
|
void |
notifyAddIterator(Graph g,
List<Triple> triples) |
void |
notifyAddList(Graph g,
List<Triple> triples)
Method called when a list [of triples] has been added to the graph.
|
void |
notifyAddTriple(Graph g,
Triple t)
Method called when a single triple has been added to the graph.
|
void |
notifyDeleteArray(Graph g,
Triple[] triples)
Method called when an array of triples has been deleted from the graph.
|
void |
notifyDeleteGraph(Graph g,
Graph removed)
Method to call when another graph has been used to specify the triples
deleted from our attached graph.
|
void |
notifyDeleteIterator(Graph g,
Iterator<Triple> it)
Method called when an iterator [of triples] has been deleted from the graph.
|
void |
notifyDeleteList(Graph g,
List<Triple> triples)
Method called when a list [of triples] has been deleted from the graph.
|
void |
notifyDeleteTriple(Graph g,
Triple t)
Method called when a single triple has been deleted from the graph.
|
void |
notifyEvent(Graph g,
Object event)
method to call for a general event.
|
boolean |
sameAs(ModelListenerAdapter other) |
public ModelListenerAdapter(ModelCom m, ModelChangedListener L)
public void notifyAddArray(Graph graph, Triple[] triples)
GraphListener
notifyAddArray
in interface GraphListener
public void notifyDeleteArray(Graph g, Triple[] triples)
GraphListener
notifyDeleteArray
in interface GraphListener
public void notifyAddTriple(Graph g, Triple t)
GraphListener
notifyAddTriple
in interface GraphListener
public void notifyAddList(Graph g, List<Triple> triples)
GraphListener
notifyAddList
in interface GraphListener
public void notifyAddIterator(Graph g, Iterator<Triple> it)
GraphListener
notifyAddIterator
in interface GraphListener
public void notifyAddGraph(Graph g, Graph added)
GraphListener
g
has been used to
specify the triples added to our attached graph.notifyAddGraph
in interface GraphListener
g
- the graph of triples addedpublic void notifyDeleteIterator(Graph g, Iterator<Triple> it)
GraphListener
notifyDeleteIterator
in interface GraphListener
public void notifyDeleteTriple(Graph g, Triple t)
GraphListener
notifyDeleteTriple
in interface GraphListener
public void notifyDeleteList(Graph g, List<Triple> triples)
GraphListener
notifyDeleteList
in interface GraphListener
public void notifyDeleteGraph(Graph g, Graph removed)
GraphListener
notifyDeleteGraph
in interface GraphListener
g
- the graph of triples addedpublic void notifyEvent(Graph g, Object event)
GraphListener
value
is usually a GraphEvents
.
Special attention is drawn to GraphEvents.removeAll
and events whose GraphEvents.getTitle()
is "remove"
(see GraphEvents.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.notifyEvent
in interface GraphListener
public boolean sameAs(ModelListenerAdapter other)
Licenced under the Apache License, Version 2.0