org.mindswap.pellet.jena
Class PelletInfGraph

java.lang.Object
  extended by com.hp.hpl.jena.graph.impl.GraphBase
      extended by com.hp.hpl.jena.reasoner.BaseInfGraph
          extended by org.mindswap.pellet.jena.PelletInfGraph
All Implemented Interfaces:
com.hp.hpl.jena.graph.Graph, com.hp.hpl.jena.graph.GraphAdd, com.hp.hpl.jena.graph.impl.GraphWithPerform, com.hp.hpl.jena.reasoner.InfGraph

public class PelletInfGraph
extends com.hp.hpl.jena.reasoner.BaseInfGraph
implements com.hp.hpl.jena.reasoner.InfGraph

Implementation of Jena InfGraph interface which is backed by Pellet reasoner.

Author:
Evren Sirin

Nested Class Summary
 
Nested classes/interfaces inherited from class com.hp.hpl.jena.reasoner.BaseInfGraph
com.hp.hpl.jena.reasoner.BaseInfGraph.InfCapabilities, com.hp.hpl.jena.reasoner.BaseInfGraph.InfFindSafeCapabilities, com.hp.hpl.jena.reasoner.BaseInfGraph.InfTransactionHandler
 
Field Summary
static java.util.logging.Logger log
           
 
Fields inherited from class com.hp.hpl.jena.graph.impl.GraphBase
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMIT
 
Fields inherited from interface com.hp.hpl.jena.graph.Graph
emptyGraph
 
Constructor Summary
PelletInfGraph(com.hp.hpl.jena.graph.Graph graph, PelletReasoner pellet, GraphLoader loader)
           
PelletInfGraph(KnowledgeBase kb, PelletReasoner pellet, GraphLoader loader)
           
 
Method Summary
 GraphLoader attachTemporaryGraph(com.hp.hpl.jena.graph.Graph tempGraph)
           
 void classify()
           
 void close()
           
 void close(boolean recursive)
           
 void detachTemporaryGraph(com.hp.hpl.jena.graph.Graph tempGraph, GraphLoader savedLoader)
           
 boolean entails(com.hp.hpl.jena.graph.Triple pattern)
           
 com.hp.hpl.jena.rdf.model.Model explain(com.hp.hpl.jena.rdf.model.Resource s, com.hp.hpl.jena.rdf.model.Property p, com.hp.hpl.jena.rdf.model.RDFNode o)
           
 com.hp.hpl.jena.rdf.model.Model explain(com.hp.hpl.jena.rdf.model.Statement stmt)
           
 com.hp.hpl.jena.graph.Graph explain(com.hp.hpl.jena.graph.Triple pattern)
           
 com.hp.hpl.jena.rdf.model.Model explainInconsistency()
           
 com.hp.hpl.jena.util.iterator.ExtendedIterator<com.hp.hpl.jena.graph.Triple> find(com.hp.hpl.jena.graph.Node subject, com.hp.hpl.jena.graph.Node property, com.hp.hpl.jena.graph.Node object, com.hp.hpl.jena.graph.Graph param)
           
 com.hp.hpl.jena.util.iterator.ExtendedIterator<com.hp.hpl.jena.graph.Triple> findWithContinuation(com.hp.hpl.jena.reasoner.TriplePattern pattern, com.hp.hpl.jena.reasoner.Finder finder)
           
 com.hp.hpl.jena.graph.Graph getDeductionsGraph()
           
 KnowledgeBase getKB()
          Returns the underlying Pellet KnowledgeBase.
 GraphLoader getLoader()
           
 KnowledgeBase getPreparedKB()
          Returns the underlying Pellet KnowledgeBase after calling prepare().
 com.hp.hpl.jena.graph.Graph getSchemaGraph()
           
 boolean isAutoDetectChanges()
           
 boolean isClassified()
           
 boolean isConsistent()
           
 boolean isPrepared()
           
 boolean isRealized()
           
 void performAdd(com.hp.hpl.jena.graph.Triple t)
           Add one triple to the data graph, mark the graph not-prepared, but don't run prepare() just yet.
 void performDelete(com.hp.hpl.jena.graph.Triple t)
           Delete one triple from the data graph, mark the graph not-prepared, but don't run prepare() just yet.
 void prepare()
           
 void prepare(boolean doConsistencyCheck)
           
 void realize()
           
 void reload()
          Reloads all the triple from the underlying models regardless of updates or current state.
 void setAutoDetectChanges(boolean autoDetectChanges)
           
 com.hp.hpl.jena.reasoner.ValidityReport validate()
           Test the consistency of the model.
 
Methods inherited from class com.hp.hpl.jena.reasoner.BaseInfGraph
cloneWithPremises, constructReifier, find, getBulkUpdateHandler, getCapabilities, getDerivation, getGlobalProperty, getPrefixMapping, getRawGraph, getReasoner, getTransactionHandler, getVersion, graphBaseFind, graphBaseFind, graphBaseSize, isEmpty, rebind, rebind, reset, setDerivationLogging, testGlobalProperty
 
Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase
add, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getEventManager, getReifier, getStatisticsHandler, isClosed, isIsomorphicWith, notifyAdd, notifyDelete, queryHandler, size, toString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.reasoner.InfGraph
getDerivation, getGlobalProperty, getRawGraph, getReasoner, rebind, rebind, reset, setDerivationLogging, testGlobalProperty
 
Methods inherited from interface com.hp.hpl.jena.graph.Graph
contains, contains, delete, dependsOn, find, find, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getStatisticsHandler, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, queryHandler, size
 
Methods inherited from interface com.hp.hpl.jena.graph.GraphAdd
add
 

Field Detail

log

public static final java.util.logging.Logger log
Constructor Detail

PelletInfGraph

public PelletInfGraph(KnowledgeBase kb,
                      PelletReasoner pellet,
                      GraphLoader loader)

PelletInfGraph

public PelletInfGraph(com.hp.hpl.jena.graph.Graph graph,
                      PelletReasoner pellet,
                      GraphLoader loader)
Method Detail

attachTemporaryGraph

public GraphLoader attachTemporaryGraph(com.hp.hpl.jena.graph.Graph tempGraph)

detachTemporaryGraph

public void detachTemporaryGraph(com.hp.hpl.jena.graph.Graph tempGraph,
                                 GraphLoader savedLoader)

find

public com.hp.hpl.jena.util.iterator.ExtendedIterator<com.hp.hpl.jena.graph.Triple> find(com.hp.hpl.jena.graph.Node subject,
                                                                                         com.hp.hpl.jena.graph.Node property,
                                                                                         com.hp.hpl.jena.graph.Node object,
                                                                                         com.hp.hpl.jena.graph.Graph param)
Specified by:
find in interface com.hp.hpl.jena.reasoner.InfGraph
Overrides:
find in class com.hp.hpl.jena.reasoner.BaseInfGraph

findWithContinuation

public com.hp.hpl.jena.util.iterator.ExtendedIterator<com.hp.hpl.jena.graph.Triple> findWithContinuation(com.hp.hpl.jena.reasoner.TriplePattern pattern,
                                                                                                         com.hp.hpl.jena.reasoner.Finder finder)
Specified by:
findWithContinuation in class com.hp.hpl.jena.reasoner.BaseInfGraph

getSchemaGraph

public com.hp.hpl.jena.graph.Graph getSchemaGraph()
Specified by:
getSchemaGraph in class com.hp.hpl.jena.reasoner.BaseInfGraph

isPrepared

public boolean isPrepared()
Overrides:
isPrepared in class com.hp.hpl.jena.reasoner.BaseInfGraph

reload

public void reload()
Reloads all the triple from the underlying models regardless of updates or current state. KB will be cleared completely and recreated from scratch.


prepare

public void prepare()
Specified by:
prepare in interface com.hp.hpl.jena.reasoner.InfGraph
Overrides:
prepare in class com.hp.hpl.jena.reasoner.BaseInfGraph

prepare

public void prepare(boolean doConsistencyCheck)

isConsistent

public boolean isConsistent()

isClassified

public boolean isClassified()

isRealized

public boolean isRealized()

classify

public void classify()

realize

public void realize()

getDeductionsGraph

public com.hp.hpl.jena.graph.Graph getDeductionsGraph()
Specified by:
getDeductionsGraph in interface com.hp.hpl.jena.reasoner.InfGraph
Overrides:
getDeductionsGraph in class com.hp.hpl.jena.reasoner.BaseInfGraph

entails

public boolean entails(com.hp.hpl.jena.graph.Triple pattern)

explainInconsistency

public com.hp.hpl.jena.rdf.model.Model explainInconsistency()

explain

public com.hp.hpl.jena.rdf.model.Model explain(com.hp.hpl.jena.rdf.model.Statement stmt)

explain

public com.hp.hpl.jena.rdf.model.Model explain(com.hp.hpl.jena.rdf.model.Resource s,
                                               com.hp.hpl.jena.rdf.model.Property p,
                                               com.hp.hpl.jena.rdf.model.RDFNode o)

explain

public com.hp.hpl.jena.graph.Graph explain(com.hp.hpl.jena.graph.Triple pattern)

getKB

public KnowledgeBase getKB()
Returns the underlying Pellet KnowledgeBase. Before calling this function make sure the graph isPrepared() or use getPreparedKB().


getPreparedKB

public KnowledgeBase getPreparedKB()
Returns the underlying Pellet KnowledgeBase after calling prepare().


performAdd

public void performAdd(com.hp.hpl.jena.graph.Triple t)

Add one triple to the data graph, mark the graph not-prepared, but don't run prepare() just yet.

Specified by:
performAdd in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
Overrides:
performAdd in class com.hp.hpl.jena.reasoner.BaseInfGraph
Parameters:
t - A triple to add to the graph

performDelete

public void performDelete(com.hp.hpl.jena.graph.Triple t)

Delete one triple from the data graph, mark the graph not-prepared, but don't run prepare() just yet.

Specified by:
performDelete in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
Overrides:
performDelete in class com.hp.hpl.jena.reasoner.BaseInfGraph
Parameters:
t - A triple to remove from the graph

validate

public com.hp.hpl.jena.reasoner.ValidityReport validate()

Test the consistency of the model. This looks for overall inconsistency, and for any unsatisfiable classes.

Specified by:
validate in interface com.hp.hpl.jena.reasoner.InfGraph
Overrides:
validate in class com.hp.hpl.jena.reasoner.BaseInfGraph
Returns:
a ValidityReport structure

close

public void close()
Specified by:
close in interface com.hp.hpl.jena.graph.Graph
Overrides:
close in class com.hp.hpl.jena.reasoner.BaseInfGraph

close

public void close(boolean recursive)

getLoader

public GraphLoader getLoader()
Returns:
the loader

isAutoDetectChanges

public boolean isAutoDetectChanges()

setAutoDetectChanges

public void setAutoDetectChanges(boolean autoDetectChanges)


Copyright © 2004 Evren Sirin. All Rights Reserved.