org.mindswap.pellet.jena
Class OWLMETReasoner

java.lang.Object
  extended by org.mindswap.pellet.jena.OWLMETReasoner

public class OWLMETReasoner
extends java.lang.Object

The main reasoner class designed to support Jena applications. It basically wraps a KnowledgeBase object and does the conversion between Jena structures and ATerms.

Author:
initial version for OWL - Evren Sirin, for OWlMeT - NataKeberle

Field Summary
static boolean DEBUG
          Deprecated. Edit log4j.properties to turn on debugging
static java.util.List SKIP
           
 
Constructor Summary
OWLMETReasoner()
           
 
Method Summary
 void classify()
          Classify the loaded ontologies by computing all the direct/indirect subclass relations between each named class.
 void clear()
          Clear the loaded ontologies from reasoner's memory.
 com.hp.hpl.jena.query.ResultSet execQuery(com.hp.hpl.jena.query.Query sparql)
           
 com.hp.hpl.jena.query.ResultSet execQuery(java.lang.String queryStr)
           
 com.hp.hpl.jena.rdf.model.Model extractClassModel(boolean verbose)
          Returns a Jena model that contains the subclass and equivalence relations between named classes.
 com.hp.hpl.jena.rdf.model.Model extractIndividualModel(boolean verbose)
          Returna a Jena model that contains the type assertions about individuals.
 com.hp.hpl.jena.rdf.model.Model extractModel(boolean verbose)
          Returns a Jena model that contains the obvious and inferred subclass, subproperty and type assertions.
 com.hp.hpl.jena.rdf.model.Model extractPropertyModel(boolean verbose)
          Returns a Jena model that contains the information about properties.
 java.util.Set getClasses()
          Return the set of all named classes.
 java.util.Set getEquivalentClasses(com.hp.hpl.jena.rdf.model.Resource c)
          Return all the (named) equivalent classes.
 java.util.Set getIndividuals()
          Return the set of all named individuals.
 java.util.Set getIndividualsWithProperty(com.hp.hpl.jena.rdf.model.Property p, com.hp.hpl.jena.rdf.model.Resource r)
          List all subjects with a given property and property value.
 java.util.Set getInstances(com.hp.hpl.jena.rdf.model.Resource c)
          Get all the instances of the given class.
 java.util.Set getInstances(com.hp.hpl.jena.rdf.model.Resource c, boolean direct)
          Returns the instances of class c.
 KnowledgeBase getKB()
          Return the KnowledgeBase that backs this reasoner.
 java.lang.String getLevel()
           
 OWLMETLoader getLoader()
           
 com.hp.hpl.jena.rdf.model.Model getModel()
          Return the Jena model where all the loaded models are accumulated.
 OWLMETModelExtractor getModelExtractor()
          Return the associated model extractor
 com.hp.hpl.jena.rdf.model.RDFNode getPropertyValue(com.hp.hpl.jena.rdf.model.Property p, com.hp.hpl.jena.rdf.model.RDFNode r)
           
 java.util.Set getPropertyValues(com.hp.hpl.jena.rdf.model.Property p, com.hp.hpl.jena.rdf.model.RDFNode r)
          Return all property values for a given property and subject value.
 OWLSpecies getSpecies()
          Return the species of the model loaded to this reasoner.
 java.util.Set getSubClasses(com.hp.hpl.jena.rdf.model.Resource c)
          Return all the (named) subclasses of the given class.
 java.util.Set getSubClasses(com.hp.hpl.jena.rdf.model.Resource c, boolean direct)
          Returns the (named) subclasses of class c.
 java.util.Set getSuperClasses(com.hp.hpl.jena.rdf.model.Resource c)
          Return all the (named) super classes of the given class.
 java.util.Set getSuperClasses(com.hp.hpl.jena.rdf.model.Resource c, boolean direct)
          Returns the (named) superclasses of class c.
 com.hp.hpl.jena.rdf.model.Resource getType(com.hp.hpl.jena.rdf.model.Resource ind)
           
 com.hp.hpl.jena.rdf.model.Resource getType(com.hp.hpl.jena.rdf.model.Resource ind, boolean direct)
           
 java.util.Set getTypes(com.hp.hpl.jena.rdf.model.Resource ind)
          Get all the (named) classes individual belongs to.
 java.util.Set getTypes(com.hp.hpl.jena.rdf.model.Resource ind, boolean direct)
          Returns the (named) classes individual belongs to.
 boolean hasDomain(com.hp.hpl.jena.rdf.model.Resource p, com.hp.hpl.jena.rdf.model.Resource c)
           
 boolean hasPropertyValue(com.hp.hpl.jena.rdf.model.Resource s, com.hp.hpl.jena.rdf.model.Resource p, com.hp.hpl.jena.rdf.model.RDFNode o)
          Checks is a triple (s, p, o) exists in the knowledge base.
 boolean hasRange(com.hp.hpl.jena.rdf.model.Resource p, com.hp.hpl.jena.rdf.model.Resource c)
           
 boolean isAnnotationProperty(com.hp.hpl.jena.rdf.model.Resource p)
           
 boolean isClass(com.hp.hpl.jena.rdf.model.Resource c)
          Check id the given resource is defined as a class.
 boolean isComplement(com.hp.hpl.jena.rdf.model.Resource c1, com.hp.hpl.jena.rdf.model.Resource c2)
           
 boolean isConsistent()
          Check if the loaded ontologies is consistent.
 boolean isDatatypeProperty(com.hp.hpl.jena.rdf.model.Resource p)
           
 boolean isDifferentFrom(com.hp.hpl.jena.rdf.model.Resource i1, com.hp.hpl.jena.rdf.model.Resource i2)
           
 boolean isDiscardJenaGraph()
           
 boolean isDisjoint(com.hp.hpl.jena.rdf.model.Resource c1, com.hp.hpl.jena.rdf.model.Resource c2)
           
 boolean isEconnEnabled()
           
 boolean isEntailed(com.hp.hpl.jena.rdf.model.Model model)
          Check if all the statements in a given model is entailed by the current KB.
 boolean isEntailed(com.hp.hpl.jena.rdf.model.Resource s, com.hp.hpl.jena.rdf.model.Property p, com.hp.hpl.jena.rdf.model.RDFNode ox)
          Chekc if the given subject, property, object triple is entailed by the KB.
 boolean isEntailed(com.hp.hpl.jena.rdf.model.Statement stmt)
          Check if the given statement is entailed by the KB.
 boolean isEquivalentClass(com.hp.hpl.jena.rdf.model.Resource r1, com.hp.hpl.jena.rdf.model.Resource r2)
           
 boolean isEquivalentProperty(com.hp.hpl.jena.rdf.model.Resource p1, com.hp.hpl.jena.rdf.model.Resource p2)
           
 boolean isFunctionalProperty(com.hp.hpl.jena.rdf.model.Resource p)
           
 boolean isIndividual(com.hp.hpl.jena.rdf.model.Resource ind)
           
 boolean isInstanceOf(com.hp.hpl.jena.rdf.model.Resource ind, com.hp.hpl.jena.rdf.model.Resource c)
          Check if the given individual is an instance of the given class.
 boolean isInverse(com.hp.hpl.jena.rdf.model.Resource p1, com.hp.hpl.jena.rdf.model.Resource p2)
           
 boolean isInverseFunctionalProperty(com.hp.hpl.jena.rdf.model.Resource p)
           
 boolean isObjectProperty(com.hp.hpl.jena.rdf.model.Resource p)
           
 boolean isProperty(com.hp.hpl.jena.rdf.model.Resource p)
           
 boolean isSameAs(com.hp.hpl.jena.rdf.model.Resource i1, com.hp.hpl.jena.rdf.model.Resource i2)
           
 boolean isSatisfiable(com.hp.hpl.jena.rdf.model.Resource r)
          Check if the given class is satisfiable.
 boolean isSubclassOf(com.hp.hpl.jena.rdf.model.Resource r1, com.hp.hpl.jena.rdf.model.Resource r2)
          Deprecated. As of Pellet 1.1.1, replaced by isSubClassOf(Resource,Resource)
 boolean isSubClassOf(com.hp.hpl.jena.rdf.model.Resource r1, com.hp.hpl.jena.rdf.model.Resource r2)
           
 boolean isSubPropertyOf(com.hp.hpl.jena.rdf.model.Resource p1, com.hp.hpl.jena.rdf.model.Resource p2)
           
 boolean isSubTypeOf(com.hp.hpl.jena.datatypes.RDFDatatype d1, com.hp.hpl.jena.datatypes.RDFDatatype d2)
           
 boolean isSubTypeOf(java.lang.String d1, java.lang.String d2)
           
 boolean isSymmetricProperty(com.hp.hpl.jena.rdf.model.Resource p)
           
 boolean isTransitiveProperty(com.hp.hpl.jena.rdf.model.Resource p)
           
 boolean isType(com.hp.hpl.jena.rdf.model.Resource ind, com.hp.hpl.jena.rdf.model.Resource c)
           
 void load(DisjointMultiUnion newGraph)
           
 void load(com.hp.hpl.jena.graph.Graph graph)
          Load the Jena graph to the reasoner.
 void load(com.hp.hpl.jena.rdf.model.Model newModel)
          Load the Jena model to the reasoner.
 void load(java.lang.String uri)
          Load the ontology from the given URI (with its imports)
 void load(java.lang.String uri, boolean withImports)
          Load the ontology from the given URI, with or without its imports.
 aterm.ATermAppl node2term(com.hp.hpl.jena.rdf.model.RDFNode r)
          Convert the RDFNode to ATerm representation.
 void realize()
          For each named individual compute all the classes they belong to.
 com.hp.hpl.jena.rdql.QueryResults runQuery(com.hp.hpl.jena.rdql.Query rdql)
           
 com.hp.hpl.jena.rdql.QueryResults runQuery(java.lang.String queryStr)
          Run the RDQL query and return the results.
 void setDiscardJenaGraph(boolean discardJenaGraph)
           
 void setEconnEnabled(boolean econnEnabled)
           
 com.hp.hpl.jena.rdf.model.RDFNode toJenaNode(aterm.ATermAppl term)
          Convert an ATerm (or a Literal) to a Jena RDFNode.
 com.hp.hpl.jena.rdf.model.Resource toJenaResource(aterm.ATermAppl term)
          Convert an ATerm to a Jena resource.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG
Deprecated. Edit log4j.properties to turn on debugging

SKIP

public static final java.util.List SKIP
Constructor Detail

OWLMETReasoner

public OWLMETReasoner()
Method Detail

clear

public void clear()
Clear the loaded ontologies from reasoner's memory.


load

public void load(java.lang.String uri)
Load the ontology from the given URI (with its imports)

Parameters:
uri - URI of the ontology

load

public void load(java.lang.String uri,
                 boolean withImports)
Load the ontology from the given URI, with or without its imports.

Parameters:
uri - URI of the ontology
withImports - If true load imports too

load

public void load(com.hp.hpl.jena.rdf.model.Model newModel)
Load the Jena model to the reasoner.

Parameters:
model -

load

public void load(com.hp.hpl.jena.graph.Graph graph)
Load the Jena graph to the reasoner.

Parameters:
graph -

load

public void load(DisjointMultiUnion newGraph)

getKB

public KnowledgeBase getKB()
Return the KnowledgeBase that backs this reasoner.

Returns:

getModel

public com.hp.hpl.jena.rdf.model.Model getModel()
Return the Jena model where all the loaded models are accumulated.

Returns:

getSpecies

public OWLSpecies getSpecies()
                      throws UnsupportedFeatureException
Return the species of the model loaded to this reasoner.

Returns:
Throws:
UnsupportedFeatureException

getLevel

public java.lang.String getLevel()

isConsistent

public boolean isConsistent()
Check if the loaded ontologies is consistent. A KB is inconsistent when an individual belongs to an unsatisfiable class. Unsatisfiability may be due to multiple different assertions. For example, an ontology is inconsistent when an individual is stated to belong to two disjoint classes because the intersection of two disjoint classes is empty.

Returns:

classify

public void classify()
Classify the loaded ontologies by computing all the direct/indirect subclass relations between each named class. This operation will take considerable amount of time on large ontologies. After classification all subclass information is cached so subsequent calls to functinos like getSubclasses() will be much faster.


realize

public void realize()
For each named individual compute all the classes they belong to. Note that, calling this function will automatically cause the KB to be classified. Therefore, realizing large ontologies will take considerable amount of time.


getModelExtractor

public OWLMETModelExtractor getModelExtractor()
Return the associated model extractor

Returns:

extractModel

public com.hp.hpl.jena.rdf.model.Model extractModel(boolean verbose)
Returns a Jena model that contains the obvious and inferred subclass, subproperty and type assertions. This model can be created once to provide efficient reasoning without the cost of conversion at each function call. However, the returned model will not be complete in the sense that property assertions between indviduals will not be included.

This function simply combines the results of extractClassModel, extractPropertyModel and extractIndividualModel.

Parameters:
verbose - If this parameter is false only direct subclass, subproperty and type assertions are included in the result (rest can easily be found with transitivity). If the parameter is true all the subclass, subproperty and type assertions are put into the result.
Returns:

extractClassModel

public com.hp.hpl.jena.rdf.model.Model extractClassModel(boolean verbose)
Returns a Jena model that contains the subclass and equivalence relations between named classes.

Parameters:
verbose - If false only direct subclass relations are returned, otherwise all the subclass relations are put into the result.
Returns:

extractPropertyModel

public com.hp.hpl.jena.rdf.model.Model extractPropertyModel(boolean verbose)
Returns a Jena model that contains the information about properties. Namely subproperty, equivalent property relations, and attributes such as Functional, Symmetric, Transitive, etc. are included in the model

Parameters:
verbose - If false only direct subproperty relations are returned, otherwise all the subproperty relations are put into the result.
Returns:

extractIndividualModel

public com.hp.hpl.jena.rdf.model.Model extractIndividualModel(boolean verbose)
Returna a Jena model that contains the type assertions about individuals.

Parameters:
verbose - If false only direct type assertions are returned, otherwise all the type relations are put into the result.
Returns:

getClasses

public java.util.Set getClasses()
Return the set of all named classes.

Returns:
Set of Jena resources

getIndividuals

public java.util.Set getIndividuals()
Return the set of all named individuals.

Returns:
Set of Jena resources

node2term

public aterm.ATermAppl node2term(com.hp.hpl.jena.rdf.model.RDFNode r)
Convert the RDFNode to ATerm representation.

Parameters:
r -
Returns:

isClass

public boolean isClass(com.hp.hpl.jena.rdf.model.Resource c)
Check id the given resource is defined as a class.

Parameters:
c -
Returns:

isSatisfiable

public boolean isSatisfiable(com.hp.hpl.jena.rdf.model.Resource r)
Check if the given class is satisfiable.

Parameters:
r -
Returns:

isSubTypeOf

public boolean isSubTypeOf(java.lang.String d1,
                           java.lang.String d2)

isSubTypeOf

public boolean isSubTypeOf(com.hp.hpl.jena.datatypes.RDFDatatype d1,
                           com.hp.hpl.jena.datatypes.RDFDatatype d2)

isSubclassOf

public boolean isSubclassOf(com.hp.hpl.jena.rdf.model.Resource r1,
                            com.hp.hpl.jena.rdf.model.Resource r2)
Deprecated. As of Pellet 1.1.1, replaced by isSubClassOf(Resource,Resource)


isSubClassOf

public boolean isSubClassOf(com.hp.hpl.jena.rdf.model.Resource r1,
                            com.hp.hpl.jena.rdf.model.Resource r2)

isEquivalentClass

public boolean isEquivalentClass(com.hp.hpl.jena.rdf.model.Resource r1,
                                 com.hp.hpl.jena.rdf.model.Resource r2)

isDisjoint

public boolean isDisjoint(com.hp.hpl.jena.rdf.model.Resource c1,
                          com.hp.hpl.jena.rdf.model.Resource c2)

isComplement

public boolean isComplement(com.hp.hpl.jena.rdf.model.Resource c1,
                            com.hp.hpl.jena.rdf.model.Resource c2)

isProperty

public boolean isProperty(com.hp.hpl.jena.rdf.model.Resource p)

isDatatypeProperty

public boolean isDatatypeProperty(com.hp.hpl.jena.rdf.model.Resource p)

isObjectProperty

public boolean isObjectProperty(com.hp.hpl.jena.rdf.model.Resource p)

isAnnotationProperty

public boolean isAnnotationProperty(com.hp.hpl.jena.rdf.model.Resource p)

isTransitiveProperty

public boolean isTransitiveProperty(com.hp.hpl.jena.rdf.model.Resource p)

isSymmetricProperty

public boolean isSymmetricProperty(com.hp.hpl.jena.rdf.model.Resource p)

isFunctionalProperty

public boolean isFunctionalProperty(com.hp.hpl.jena.rdf.model.Resource p)

isInverseFunctionalProperty

public boolean isInverseFunctionalProperty(com.hp.hpl.jena.rdf.model.Resource p)

isSubPropertyOf

public boolean isSubPropertyOf(com.hp.hpl.jena.rdf.model.Resource p1,
                               com.hp.hpl.jena.rdf.model.Resource p2)

isEquivalentProperty

public boolean isEquivalentProperty(com.hp.hpl.jena.rdf.model.Resource p1,
                                    com.hp.hpl.jena.rdf.model.Resource p2)

isInverse

public boolean isInverse(com.hp.hpl.jena.rdf.model.Resource p1,
                         com.hp.hpl.jena.rdf.model.Resource p2)

hasDomain

public boolean hasDomain(com.hp.hpl.jena.rdf.model.Resource p,
                         com.hp.hpl.jena.rdf.model.Resource c)

hasRange

public boolean hasRange(com.hp.hpl.jena.rdf.model.Resource p,
                        com.hp.hpl.jena.rdf.model.Resource c)

isIndividual

public boolean isIndividual(com.hp.hpl.jena.rdf.model.Resource ind)

isSameAs

public boolean isSameAs(com.hp.hpl.jena.rdf.model.Resource i1,
                        com.hp.hpl.jena.rdf.model.Resource i2)

isDifferentFrom

public boolean isDifferentFrom(com.hp.hpl.jena.rdf.model.Resource i1,
                               com.hp.hpl.jena.rdf.model.Resource i2)

isType

public boolean isType(com.hp.hpl.jena.rdf.model.Resource ind,
                      com.hp.hpl.jena.rdf.model.Resource c)

hasPropertyValue

public boolean hasPropertyValue(com.hp.hpl.jena.rdf.model.Resource s,
                                com.hp.hpl.jena.rdf.model.Resource p,
                                com.hp.hpl.jena.rdf.model.RDFNode o)
Checks is a triple (s, p, o) exists in the knowledge base. Using the strategy from "Reducing OWL Entailment to DL Satisfiability" paper.

boolean

Parameters:
s - subject of the triple
p - predicate of the triple
o - object of the triple
Returns:

isEntailed

public boolean isEntailed(com.hp.hpl.jena.rdf.model.Model model)
                   throws UnsupportedFeatureException
Check if all the statements in a given model is entailed by the current KB.

Parameters:
model -
Returns:
Throws:
UnsupportedFeatureException

isEntailed

public boolean isEntailed(com.hp.hpl.jena.rdf.model.Statement stmt)
                   throws UnsupportedFeatureException
Check if the given statement is entailed by the KB.

Parameters:
stmt -
Returns:
Throws:
UnsupportedFeatureException

isEntailed

public boolean isEntailed(com.hp.hpl.jena.rdf.model.Resource s,
                          com.hp.hpl.jena.rdf.model.Property p,
                          com.hp.hpl.jena.rdf.model.RDFNode ox)
Chekc if the given subject, property, object triple is entailed by the KB.

Parameters:
s - Subject
p - Predicate
ox - Object
Returns:

getSuperClasses

public java.util.Set getSuperClasses(com.hp.hpl.jena.rdf.model.Resource c,
                                     boolean direct)
Returns the (named) superclasses of class c. Depending on the second parameter the resulting list will include etiher all or only the direct superclasses.

A class d is a direct superclass of c iff

  1. d is superclass of c
  2. there is no other class x such that x is superclass of c and d is superclass of x
The class c itself is not included in the list but all the other classes that are sameAs c are put into the list. Also note that the returned list will always have at least one element. The list will either include one other concept from the hierachy or the owl:Thing if no other class subsumes c. By definition owl:Thing is superclass of every concept.

*** This function will first classify the whole ontology ***

Parameters:
c -
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are Jena resources.

getSuperClasses

public java.util.Set getSuperClasses(com.hp.hpl.jena.rdf.model.Resource c)
Return all the (named) super classes of the given class.

*** This function will first classify the whole ontology ***

Parameters:
c -
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are Jena resources.

getSubClasses

public java.util.Set getSubClasses(com.hp.hpl.jena.rdf.model.Resource c)
Return all the (named) subclasses of the given class.

*** This function will first classify the whole ontology ***

Parameters:
c -
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are Jena resources.

getSubClasses

public java.util.Set getSubClasses(com.hp.hpl.jena.rdf.model.Resource c,
                                   boolean direct)
Returns the (named) subclasses of class c. According to the second parameter the resulting list will include either all subclasses or only the direct subclasses.

A class d is a direct subclass of c iff

  1. d is subclass of c
  2. there is no other class x different from c and d such that x is subclass of c and d is subclass of x
The class c itself is not included in the result but all the other classes that are equivalent to c are put in the result as one set. Also note that the returned list will always have at least one element. The list will either include one other concept from the hierachy or the owl:Nothing concept if no other class is subsumed by c. By definition owl:Nothing concept is subclass of every concept.

*** This function will first classify the whole ontology ***

Parameters:
c -
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are Jena resources.

getEquivalentClasses

public java.util.Set getEquivalentClasses(com.hp.hpl.jena.rdf.model.Resource c)
Return all the (named) equivalent classes.

*** This function will first classify the whole ontology ***

Parameters:
c -
Returns:
A set of Jena resources

isInstanceOf

public boolean isInstanceOf(com.hp.hpl.jena.rdf.model.Resource ind,
                            com.hp.hpl.jena.rdf.model.Resource c)
Check if the given individual is an instance of the given class.

Parameters:
c -
Returns:

getInstances

public java.util.Set getInstances(com.hp.hpl.jena.rdf.model.Resource c)
Get all the instances of the given class.

*** This function will first classify the whole ontology ***

Parameters:
c -
Returns:
A set of Jena resource

getInstances

public java.util.Set getInstances(com.hp.hpl.jena.rdf.model.Resource c,
                                  boolean direct)
Returns the instances of class c. Depending on the second parameter the resulting list will include all or only the direct instances. An individual x is a direct instance of c iff x is of type c and there is no subclass d of c such that x is of type d.

*** This function will first realize the whole ontology ***

Parameters:
c - Class whose instances are returned
direct - if true return only the direct instances, otherwise return all the instances
Returns:
A set of Jena resources

getTypes

public java.util.Set getTypes(com.hp.hpl.jena.rdf.model.Resource ind)
Get all the (named) classes individual belongs to.

*** This function will first realize the whole ontology ***

Parameters:
ind - An individual name
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are Jena resources.

getTypes

public java.util.Set getTypes(com.hp.hpl.jena.rdf.model.Resource ind,
                              boolean direct)
Returns the (named) classes individual belongs to. Depending on the second parameter the result will include either all types or only the direct types.

Parameters:
ind - An individual name
direct - If true return only the direct types, otherwise return all types
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are Jena resources

getType

public com.hp.hpl.jena.rdf.model.Resource getType(com.hp.hpl.jena.rdf.model.Resource ind)

getType

public com.hp.hpl.jena.rdf.model.Resource getType(com.hp.hpl.jena.rdf.model.Resource ind,
                                                  boolean direct)

getIndividualsWithProperty

public java.util.Set getIndividualsWithProperty(com.hp.hpl.jena.rdf.model.Property p,
                                                com.hp.hpl.jena.rdf.model.Resource r)
List all subjects with a given property and property value.

Returns:
Set of Jena resources.

getPropertyValues

public java.util.Set getPropertyValues(com.hp.hpl.jena.rdf.model.Property p,
                                       com.hp.hpl.jena.rdf.model.RDFNode r)
Return all property values for a given property and subject value.

Parameters:
r -
x -
Returns:
List of ATermAppl objects.

getPropertyValue

public com.hp.hpl.jena.rdf.model.RDFNode getPropertyValue(com.hp.hpl.jena.rdf.model.Property p,
                                                          com.hp.hpl.jena.rdf.model.RDFNode r)

toJenaNode

public com.hp.hpl.jena.rdf.model.RDFNode toJenaNode(aterm.ATermAppl term)
Convert an ATerm (or a Literal) to a Jena RDFNode.

Parameters:
term -
Returns:

toJenaResource

public com.hp.hpl.jena.rdf.model.Resource toJenaResource(aterm.ATermAppl term)
Convert an ATerm to a Jena resource. Use this function only if you are sure that givne term is not a literal value.

Parameters:
term -
Returns:

runQuery

public com.hp.hpl.jena.rdql.QueryResults runQuery(java.lang.String queryStr)
                                           throws UnsupportedQueryException
Run the RDQL query and return the results.

Parameters:
queryStr - The RDQL query
Returns:
Query results
Throws:
UnsupportedQueryException

runQuery

public com.hp.hpl.jena.rdql.QueryResults runQuery(com.hp.hpl.jena.rdql.Query rdql)
                                           throws UnsupportedQueryException
Throws:
UnsupportedQueryException

execQuery

public com.hp.hpl.jena.query.ResultSet execQuery(java.lang.String queryStr)
                                          throws UnsupportedQueryException
Throws:
UnsupportedQueryException

execQuery

public com.hp.hpl.jena.query.ResultSet execQuery(com.hp.hpl.jena.query.Query sparql)
                                          throws UnsupportedQueryException
Throws:
UnsupportedQueryException

isEconnEnabled

public boolean isEconnEnabled()
Returns:
Returns the econnEnabled.

setEconnEnabled

public void setEconnEnabled(boolean econnEnabled)
Parameters:
econnEnabled - The econnEnabled to set.

getLoader

public OWLMETLoader getLoader()

isDiscardJenaGraph

public boolean isDiscardJenaGraph()

setDiscardJenaGraph

public void setDiscardJenaGraph(boolean discardJenaGraph)


Copyright © 2007-2009 Natalya Keberle. All Rights Reserved.