org.deri.wsml.reasoner.wsml_dl_reasoner
Class Reasoner

java.lang.Object
  extended by org.deri.wsml.reasoner.wsml_dl_reasoner.Reasoner

public class Reasoner
extends java.lang.Object

DIG reasoner connector for WSML-DL. With this class you can convert WSML-DL ontologies and WSML-DL conjunctive queries to DIG ontologies and DIG queries, respectively. Furthermore, you can connect to an FaCT++ reasoner instance and execute the query against the given ontology. The reasoner depends on WSMO4J for the parsing of WSML documents and for internal representation of WSML. At the current stage, the reasoner only supports the logical expressions in an ontology. Furthermore, only basic concepts can be used as queries. The WSML syntax constructs impliesType, ofType and numbered/unnumbered anonymous Ids are not supported yet.

Author:
Livia Predoiu

Constructor Summary
Reasoner()
           
 
Method Summary
static void connectDIGReasoner(java.lang.String address, int port)
          This method connects to a the DIG interface of FaCT++.
 java.net.URI loadOntology(java.io.InputStream input)
          This method takes an input WSML-DL ontology, converts it into the DIG syntax and loads the converted ontology into the reasoner knowledge base.
static java.lang.String[] query_allConceptNames(java.net.URI kbURI)
          This method queries for all concepts which are contained in a knowledge base which is identified by a uri (kbURI)
static java.lang.String[] query_ancestorsNames(java.lang.String wsmlConcept, java.net.URI kbURI)
          This method queries for the ancestors of a concept which is contained in a knowledge base which is identified by a uri (kbURI)
static java.lang.String[] query_childrenNames(java.lang.String wsmlConcept, java.net.URI kbURI)
          This method queries for the children of a concept which is contained in a knowledge base which is identified by a uri (kbURI)
static java.lang.String[] query_descendantsNames(java.lang.String wsmlConcept, java.net.URI kbURI)
          This method queries for the descendants of a concept which is contained in a knowledge base which is identified by a uri (kbURI)
static java.lang.String[] query_equivalentsNames(java.lang.String wsmlConcept, java.net.URI kbURI)
          This method queries for the equivalents of a concept which is contained in a knowledge base which is identified by a uri (kbURI)
static java.lang.String[] query_parentsNames(java.lang.String wsmlConcept, java.net.URI kbURI)
          This method queries for the parents of a concept which is contained in a knowledge base which is identified by a uri (kbURI)
static boolean query_satisfiable(java.lang.String wsmlConcept, java.net.URI kbURI)
          This method queries whether a concept is satisfiable with respect to a knowledge base which is identified by a uri (kbURI)
static boolean query_subsumes(java.lang.String subsumer, java.lang.String subsumee, java.net.URI kbURI)
          This method queries whether the subsumption relationship holds between two concepts with respect to an ontology which is identified by a uri (kbURI)
static boolean releaseKB(java.net.URI kbURI)
          This method releases the knowledge base with an identifying URI
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Reasoner

public Reasoner()
Method Detail

connectDIGReasoner

public static void connectDIGReasoner(java.lang.String address,
                                      int port)
This method connects to a the DIG interface of FaCT++.

Parameters:
address - The url of the dig interface of the reasoner
port - The port of the reasoner

loadOntology

public java.net.URI loadOntology(java.io.InputStream input)
This method takes an input WSML-DL ontology, converts it into the DIG syntax and loads the converted ontology into the reasoner knowledge base.

Parameters:
input - An input stream which contains a valid WSML-DL ontology
Returns:
URI A uri which serves as identifier for the ontology

query_allConceptNames

public static java.lang.String[] query_allConceptNames(java.net.URI kbURI)
This method queries for all concepts which are contained in a knowledge base which is identified by a uri (kbURI)

Parameters:
kbURI - the identifier of the ontology
Returns:
String[] An array containing all concept names

query_ancestorsNames

public static java.lang.String[] query_ancestorsNames(java.lang.String wsmlConcept,
                                                      java.net.URI kbURI)
This method queries for the ancestors of a concept which is contained in a knowledge base which is identified by a uri (kbURI)

Parameters:
wsmlConcept - a wsml-dl concept (the query concept)
kbURI - the identifier of the ontology
Returns:
String[] An array containing all ancestor names

query_parentsNames

public static java.lang.String[] query_parentsNames(java.lang.String wsmlConcept,
                                                    java.net.URI kbURI)
This method queries for the parents of a concept which is contained in a knowledge base which is identified by a uri (kbURI)

Parameters:
wsmlConcept - a wsml-dl concept (the query concept)
kbURI - the identifier of the ontology
Returns:
String[] An array containing all parents names

query_descendantsNames

public static java.lang.String[] query_descendantsNames(java.lang.String wsmlConcept,
                                                        java.net.URI kbURI)
This method queries for the descendants of a concept which is contained in a knowledge base which is identified by a uri (kbURI)

Parameters:
wsmlConcept - a wsml-dl concept (the query concept)
kbURI - the identifier of the ontology
Returns:
String[] An array containing all descendants names

query_childrenNames

public static java.lang.String[] query_childrenNames(java.lang.String wsmlConcept,
                                                     java.net.URI kbURI)
This method queries for the children of a concept which is contained in a knowledge base which is identified by a uri (kbURI)

Parameters:
wsmlConcept - a wsml-dl concept (the query concept)
kbURI - the identifier of the ontology
Returns:
String[] An array containing all children names

query_equivalentsNames

public static java.lang.String[] query_equivalentsNames(java.lang.String wsmlConcept,
                                                        java.net.URI kbURI)
This method queries for the equivalents of a concept which is contained in a knowledge base which is identified by a uri (kbURI)

Parameters:
wsmlConcept - a wsml-dl concept (the query concept)
kbURI - the identifier of the ontology
Returns:
String[] An array containing all equivalents names

query_subsumes

public static boolean query_subsumes(java.lang.String subsumer,
                                     java.lang.String subsumee,
                                     java.net.URI kbURI)
This method queries whether the subsumption relationship holds between two concepts with respect to an ontology which is identified by a uri (kbURI)

Parameters:
subsumer - a wsml-dl concept
subsumee - a wsml-dl concept
kbURI - the identifier of the ontology
Returns:
boolean Statement whether the subsumption relationship holds or not

query_satisfiable

public static boolean query_satisfiable(java.lang.String wsmlConcept,
                                        java.net.URI kbURI)
This method queries whether a concept is satisfiable with respect to a knowledge base which is identified by a uri (kbURI)

Parameters:
wsmlConcept - a wsml-dl concept (the query concept)
kbURI - the identifier of the ontology
Returns:
boolean Statement whether the concept is satisfiable or not

releaseKB

public static boolean releaseKB(java.net.URI kbURI)
This method releases the knowledge base with an identifying URI

Parameters:
kbURI - the identifier of the ontology
Returns:
boolean Statement whether the knowledgebase has been released or not