requester
Interface OntManagerIF

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
OntManagerImpl

public interface OntManagerIF
extends java.rmi.Remote


Method Summary
 boolean addIndividuals(java.lang.String s)
          handing over a list of new individual that are to be added to the ontology.
 void addReport(java.lang.String s)
          addReport: generates the instances for one report (case report + subclasses AND instances for swpatho2.owl).
 void deleteAllIndividuals()
          deleteAllIndividuals: deletes all Individuals!
 java.lang.String getCaseReportsOfIndividual(java.lang.String className)
           
 java.lang.String getConcept(java.lang.String s)
          getConcept: Used by UP Web service, gets a concept name and tries to find a concept.
 java.lang.String getConceptAdj(java.lang.String s)
          getConceptAdj: Searches for a concept combined with an adjective.
 java.lang.String getDiagnosis()
           
 java.lang.String getExistingRelation(java.lang.String s)
           
 int getIndividualCount()
          getIndividualCount: returns number of individuals in A-Box
 java.lang.String getPathReportID(java.lang.String indName)
          getPathReportID: gets a URI of an Individual and returns the ID of a Pathology_Report-Individual.
 java.lang.String getRelations(java.lang.String s)
          getRelations: gets two concepts (uris) and returns a list of relations, that are between these concepts.
 java.lang.String getSuperClasses(java.lang.String s)
           
 void init()
          init: method, that has to be called once before communicating with the Web service.
 java.lang.String query(java.lang.String s)
          query: executes an RDQL-query. !!!
 java.lang.String query2(java.lang.String s)
          query2: executes an RDQL-query that asks for two parameters.
 void saveModels()
          saveModels: Saves model to individuals.owl.
 java.lang.String searchBest(java.lang.String conceptName)
          searchBest: gets a concept name and searches for the concept that matches best.
 

Method Detail

init


public void init()
          throws java.rmi.RemoteException
init: method, that has to be called once before communicating with the Web service. The Web service runs permanently, but after a Tomcat-Restart is has to be executed again. If Web service runs already, session is picked up (faster access, ontologies do not have to be opened again)

Throws:
java.rmi.RemoteException

query


public java.lang.String query(java.lang.String s)
                       throws java.rmi.RemoteException
query: executes an RDQL-query. !!!IMPORTANT: Query format must be like this:

SELECT ?<variable-name> WHERE ...

select and where has to be written in capital letters!!!

Parameters:
s - String: RDQL-string
Returns:
String: XML-String, format:

<result>
<conceptName value="..."/>
<conceptName...
</result>
Throws:
java.rmi.RemoteException

query2


public java.lang.String query2(java.lang.String s)
                        throws java.rmi.RemoteException
query2: executes an RDQL-query that asks for two parameters.
!!!IMPORTANT: format of RDQL-query is essentially important! MUST be like this:

SELECT ?x, ?y WHERE ...

ONE space after SELECT, after comma and before WHERE! SELECT and WHERE have to be in capital letters. argnames x and y can be chosen arbitrarily. argnames will also appear in resultset!!!

Parameters:
s - String: RDQL-string
Returns:
String, XML-string containing results. Format:

<result>
<item x="..." y="..."/>
<item...
</result>
Throws:
java.rmi.RemoteException

searchBest


public java.lang.String searchBest(java.lang.String conceptName)
                            throws java.rmi.RemoteException
searchBest: gets a concept name and searches for the concept that matches best. Returns URI

Works as follows:

- Performs substring query
- Edit distance for all results is measured
- result with lowest edit distance is returned

--> result is currently not limited to a maximum edit distance!!!

Parameters:
conceptName - String: Local name of concept
Returns:
String: URI of best matching concept or null (if no concept was found that matches)
Throws:
java.rmi.RemoteException

addIndividuals


public boolean addIndividuals(java.lang.String s)
                       throws java.rmi.RemoteException
handing over a list of new individual that are to be added to the ontology. Format:

<action>
<individual conceptName="x">
<relation uri="x" value="y" type="DatatypeProperty | ObjectProperty"/>
<relation...
</individual>
<individual...
</action>

Parameters:
s - String
Returns:
boolean
Throws:
java.rmi.RemoteException

getIndividualCount


public int getIndividualCount()
                       throws java.rmi.RemoteException
getIndividualCount: returns number of individuals in A-Box

Returns:
int
Throws:
java.rmi.RemoteException

getPathReportID


public java.lang.String getPathReportID(java.lang.String indName)
                                 throws java.rmi.RemoteException
getPathReportID: gets a URI of an Individual and returns the ID of a Pathology_Report-Individual. This value is stored in the DatatypeProperty hasID.

Parameters:
indName - String
Returns:
String
Throws:
java.rmi.RemoteException

getCaseReportsOfIndividual


public java.lang.String getCaseReportsOfIndividual(java.lang.String className)
                                            throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getDiagnosis


public java.lang.String getDiagnosis()
                              throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

saveModels


public void saveModels()
                throws java.rmi.RemoteException
saveModels: Saves model to individuals.owl. Note: only individuals.owl is saved, because it is the only file that is modified by Web service (A-Box)

Throws:
java.rmi.RemoteException

addReport


public void addReport(java.lang.String s)
               throws java.rmi.RemoteException
addReport: generates the instances for one report (case report + subclasses AND instances for swpatho2.owl). Uses the UP Web service

Following format is used:

<report belongsToCaseReport="123456">
<section name="micro|macro|diagnosis|comment" value="text of section"/>
<section...
</report>

Parameters:
s - String
Throws:
java.rmi.RemoteException

deleteAllIndividuals


public void deleteAllIndividuals()
                          throws java.rmi.RemoteException
deleteAllIndividuals: deletes all Individuals! Careful use!!!

Throws:
java.rmi.RemoteException

getConcept


public java.lang.String getConcept(java.lang.String s)
                            throws java.rmi.RemoteException
getConcept: Used by UP Web service, gets a concept name and tries to find a concept. URI is returned.

Following input format is used:

<lexlookup>
<noun>Lunge</noun>
<noun>...
</lexlookup>

Following output format is used:

<message>
<ll_reply>
<noun>uri|unknown</noun>
</ll_reply>
</message>

Parameters:
s - String
Returns:
String
Throws:
java.rmi.RemoteException

getRelations


public java.lang.String getRelations(java.lang.String s)
                              throws java.rmi.RemoteException
getRelations: gets two concepts (uris) and returns a list of relations, that are between these concepts. Also looks for is-a relations and relations inherited from superclasses. Also works, if domain is a superclass of concept2.

Following input format is used:

<rel_lookup>
<uri1>http://...</uri1>
<uri2>http://...</uri2>
</rel_lookup>

Following output format is used:

<message>
<ll_reply>
<property domain="..." range="..." name="name of property" type="allValuesFrom|someValuesFrom|hasValue|unknown" direct="Y|N"/>
<property...
</ll_reply>
</message>

Parameters:
s - String
Returns:
String
Throws:
java.rmi.RemoteException

getConceptAdj


public java.lang.String getConceptAdj(java.lang.String s)
                               throws java.rmi.RemoteException
getConceptAdj: Searches for a concept combined with an adjective. First it searches for a concept named concept_adj, if not successful, a concept is searched, that has a property named adj

Following input format is used:

<lex_lookup>
<noun>Pneumonie</noun>
<adj>interstitiell</adj>
</lex_lookup>

Following output format is used:

<message>
<ll_reply>
<noun>http://...</noun>
</ll_reply>
</message>

Parameters:
s - String
Returns:
String
Throws:
java.rmi.RemoteException

getExistingRelation


public java.lang.String getExistingRelation(java.lang.String s)
                                     throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getSuperClasses


public java.lang.String getSuperClasses(java.lang.String s)
                                 throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException