kaos.ontology.repository
Class OntologyLoader

java.lang.Object
  extended by kaos.ontology.repository.OntologyLoader

public class OntologyLoader
extends java.lang.Object

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

Author:
KAoS Team $Revision: 1.23 $

Field Summary
static int MaxLoadingDepth
           
 
Constructor Summary
OntologyLoader(OntologyRepository context)
           
 
Method Summary
 java.util.Set<java.lang.String> getListOfLoadedOntologies()
          This method returns a set of urls depicting ontologies loaded into the Ontology context.
 java.util.Set<java.lang.String> 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 Ontology 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(OntologyRepository context)
Method Detail

setOntContext

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


setNotificationRef

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


getListOfLoadedOntologies

public java.util.Set<java.lang.String> getListOfLoadedOntologies()
This method returns a set of urls depicting ontologies loaded into the Ontology context.


recursiveLoadKB

public java.util.Set<java.lang.String> recursiveLoadKB(java.lang.String myURL,
                                                       int maxLoadingDepth)
                                                throws java.io.IOException,
                                                       OntologyRepository.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 imported ontologies should be loaded 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:
OntologyRepository.ReasoningException - when loading of the ontology failed.
java.io.IOException