kaos.ontology.repository
Class OntologyLoader

java.lang.Object
  extended by kaos.ontology.repository.OntologyLoader
All Implemented Interfaces:
java.io.Serializable

public class OntologyLoader
extends java.lang.Object
implements java.io.Serializable

Implements the recursive loader for ontology. Stores information which ontologies were already loaded.

See Also:
Serialized Form

Field Summary
static int MaxLoadingDepth
           
 
Constructor Summary
OntologyLoader()
           
 
Method Summary
 java.util.Set getListOfLoadedOntologies()
          This method returns a set of urls depicting ontologies loaded into the JTP.
 java.util.Set recursiveLoadKB(java.lang.String myURL, int maxLoadingDepth)
          The method recursively loads ontologies starting form ontology depicted by myURL
 void setNotificationRef(KAoSDirectoryService _myKAoSDirectoryService)
          Sets the reference to the notification class.
 void setOntContext(OntologyRepository context)
          Sets the reference to the JTP context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MaxLoadingDepth

public static final int MaxLoadingDepth
See Also:
Constant Field Values
Constructor Detail

OntologyLoader

public OntologyLoader()
Method Detail

setOntContext

public void setOntContext(OntologyRepository context)
Sets the reference to the JTP context.


setNotificationRef

public void setNotificationRef(KAoSDirectoryService _myKAoSDirectoryService)
Sets the reference to the notification class.


getListOfLoadedOntologies

public java.util.Set getListOfLoadedOntologies()
This method returns a set of urls depicting ontologies loaded into the JTP.


recursiveLoadKB

public java.util.Set recursiveLoadKB(java.lang.String myURL,
                                     int maxLoadingDepth)
                              throws java.io.IOException,
                                     ReasoningException
The method recursively loads ontologies starting form ontology depicted by myURL

Parameters:
myURL - The url of the ontology to be loaded
maxLoadingDepth - Indicates to which level the timported ontologies should be laoded maxLoadingDepth less then 0 (for instance -1) will cause loading of all ontologies regardless of inclusion depth
Returns:
Returns a set of namespaces loaded during this step
Throws:
jtp.InconsistencyException - when loading of the ontology failed.
java.io.IOException
ReasoningException