org.mindswap.pellet.jena
Class PelletGraphListener
java.lang.Object
org.mindswap.pellet.jena.PelletGraphListener
- All Implemented Interfaces:
- com.hp.hpl.jena.graph.GraphListener
public class PelletGraphListener
- extends java.lang.Object
- implements com.hp.hpl.jena.graph.GraphListener
A graph listener that listens to graph change events and if possible
processes the change event. The listener is passed a possibly union
graph but the listener is attached only to leaf (non-union) graphs.
The listener keeps track which graph is changed and also checks
if subgraphs are added or removed from the root graph.
- Author:
- Evren Sirin
Method Summary |
void |
dispose()
|
java.util.Set<com.hp.hpl.jena.graph.Graph> |
getChangedGraphs()
|
java.util.Set<com.hp.hpl.jena.graph.Graph> |
getLeafGraphs()
|
boolean |
isChanged()
|
void |
notifyAddArray(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Triple[] triples)
|
void |
notifyAddGraph(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Graph added)
|
void |
notifyAddIterator(com.hp.hpl.jena.graph.Graph g,
java.util.Iterator<com.hp.hpl.jena.graph.Triple> it)
|
void |
notifyAddList(com.hp.hpl.jena.graph.Graph g,
java.util.List<com.hp.hpl.jena.graph.Triple> triples)
|
void |
notifyAddTriple(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Triple t)
|
void |
notifyDeleteArray(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Triple[] triples)
|
void |
notifyDeleteGraph(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Graph removed)
|
void |
notifyDeleteIterator(com.hp.hpl.jena.graph.Graph g,
java.util.Iterator<com.hp.hpl.jena.graph.Triple> it)
|
void |
notifyDeleteList(com.hp.hpl.jena.graph.Graph g,
java.util.List<com.hp.hpl.jena.graph.Triple> list)
|
void |
notifyDeleteTriple(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Triple t)
|
void |
notifyEvent(com.hp.hpl.jena.graph.Graph source,
java.lang.Object value)
|
void |
reset()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PelletGraphListener
public PelletGraphListener(com.hp.hpl.jena.graph.Graph rootGraph,
KnowledgeBase kb)
dispose
public void dispose()
isChanged
public boolean isChanged()
getChangedGraphs
public java.util.Set<com.hp.hpl.jena.graph.Graph> getChangedGraphs()
getLeafGraphs
public java.util.Set<com.hp.hpl.jena.graph.Graph> getLeafGraphs()
- Returns:
notifyAddArray
public void notifyAddArray(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Triple[] triples)
- Specified by:
notifyAddArray
in interface com.hp.hpl.jena.graph.GraphListener
notifyAddGraph
public void notifyAddGraph(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Graph added)
- Specified by:
notifyAddGraph
in interface com.hp.hpl.jena.graph.GraphListener
notifyAddIterator
public void notifyAddIterator(com.hp.hpl.jena.graph.Graph g,
java.util.Iterator<com.hp.hpl.jena.graph.Triple> it)
- Specified by:
notifyAddIterator
in interface com.hp.hpl.jena.graph.GraphListener
notifyAddList
public void notifyAddList(com.hp.hpl.jena.graph.Graph g,
java.util.List<com.hp.hpl.jena.graph.Triple> triples)
- Specified by:
notifyAddList
in interface com.hp.hpl.jena.graph.GraphListener
notifyAddTriple
public void notifyAddTriple(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Triple t)
- Specified by:
notifyAddTriple
in interface com.hp.hpl.jena.graph.GraphListener
notifyDeleteArray
public void notifyDeleteArray(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Triple[] triples)
- Specified by:
notifyDeleteArray
in interface com.hp.hpl.jena.graph.GraphListener
notifyDeleteGraph
public void notifyDeleteGraph(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Graph removed)
- Specified by:
notifyDeleteGraph
in interface com.hp.hpl.jena.graph.GraphListener
notifyDeleteIterator
public void notifyDeleteIterator(com.hp.hpl.jena.graph.Graph g,
java.util.Iterator<com.hp.hpl.jena.graph.Triple> it)
- Specified by:
notifyDeleteIterator
in interface com.hp.hpl.jena.graph.GraphListener
notifyDeleteList
public void notifyDeleteList(com.hp.hpl.jena.graph.Graph g,
java.util.List<com.hp.hpl.jena.graph.Triple> list)
- Specified by:
notifyDeleteList
in interface com.hp.hpl.jena.graph.GraphListener
notifyDeleteTriple
public void notifyDeleteTriple(com.hp.hpl.jena.graph.Graph g,
com.hp.hpl.jena.graph.Triple t)
- Specified by:
notifyDeleteTriple
in interface com.hp.hpl.jena.graph.GraphListener
notifyEvent
public void notifyEvent(com.hp.hpl.jena.graph.Graph source,
java.lang.Object value)
- Specified by:
notifyEvent
in interface com.hp.hpl.jena.graph.GraphListener
reset
public void reset()
Copyright © 2004 Evren Sirin. All Rights Reserved.