kaos.ontology.util
Class OntConversionUtils

java.lang.Object
  extended by kaos.ontology.util.OntConversionUtils

public class OntConversionUtils
extends java.lang.Object


Constructor Summary
OntConversionUtils()
           
 
Method Summary
static java.util.Vector getActionDescriptions(KAoSInstanceBuilder kib, java.lang.Class actionClass, Service directoryService)
          Convert the KAoSInstanceBuilder into a vector of action objects, either BasicActionDescription or ActionInstanceDescription as given in the actionClass parameter
static java.util.Vector getActionDescriptions(java.lang.String owl, java.lang.Class actionClass, Service directoryService)
          Convert the given OWL String to a Vector of action objects either BasicActionDescription or ActionInstanceDescription as given in the actionClass parameter
static ActionInstanceDescription getActionInstanceDescription(BasicActionDescription bad)
          Convert a BasicActionDescription to an ActionInstanceDescription
static ActionInstanceDescription getActionInstanceDescription(java.lang.String owl, Service directoryService)
          Convert the given OWL String to an ActionInstanceDescription
static BasicActionDescription getBasicActionDescription(KAoSInstanceBuilder kib, Service directoryService)
          Convert the given KAoSInstanceBuilder to a BasicActionDescription
static BasicActionDescription getBasicActionDescription(java.lang.String owl, Service directoryService)
          Convert the given OWL String to a BasicActionDescription
protected static KAoSInstance getKAoSInstance(OntModel ontModel, java.lang.String instanceName, Service kaosDirectoryService)
          Converts one instance from the OWL ontology Called recursively to build a nested tree of KAoSInstances with properties who's values can be KAoSInstances.
static KAoSInstanceBuilder getKAoSInstanceBuilder(BasicActionDescription ad)
          Convert the given BasicActionDesc to an OWL ontology model (wrapped as a KAoSInstanceBuilder) Currently only supports one action, one actor (e.g.
static java.lang.String getOWL(BasicActionDescription bad)
          Convert the given BasicActionDesc to an OWL ontology model and return the XML text for the OWL model
static java.util.Vector getRootKAoSInstances(OntModel instanceModel, Service directoryService)
           
static void readFromClassModel(KAoSClassBuilderImpl model, BasicActionDescription bad, OntologyInterfaces ont)
           
static BasicActionDescription readFromClassModel(KAoSClassBuilderImpl model, OntologyInterfaces ont)
           
static java.util.Vector retrieveActionClassNames(java.lang.String owl)
          Get the names of all kaos action classes defined in the given owl.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OntConversionUtils

public OntConversionUtils()
Method Detail

getOWL

public static java.lang.String getOWL(BasicActionDescription bad)
Convert the given BasicActionDesc to an OWL ontology model and return the XML text for the OWL model

Parameters:
aid -
Returns:

getKAoSInstanceBuilder

public static KAoSInstanceBuilder getKAoSInstanceBuilder(BasicActionDescription ad)
Convert the given BasicActionDesc to an OWL ontology model (wrapped as a KAoSInstanceBuilder) Currently only supports one action, one actor (e.g. ActionInstanceDescription)

Parameters:
aid -
Returns:

getBasicActionDescription

public static BasicActionDescription getBasicActionDescription(java.lang.String owl,
                                                               Service directoryService)
Convert the given OWL String to a BasicActionDescription

Parameters:
owl -

getBasicActionDescription

public static BasicActionDescription getBasicActionDescription(KAoSInstanceBuilder kib,
                                                               Service directoryService)
Convert the given KAoSInstanceBuilder to a BasicActionDescription

Parameters:
kib -
Returns:

getActionInstanceDescription

public static ActionInstanceDescription getActionInstanceDescription(java.lang.String owl,
                                                                     Service directoryService)
Convert the given OWL String to an ActionInstanceDescription

Parameters:
owl - - OWL ontology string defining an instance of the Action class
Returns:
an ActionInstanceDescription for the first action instance found in the OWL

getKAoSInstance

protected static KAoSInstance getKAoSInstance(OntModel ontModel,
                                              java.lang.String instanceName,
                                              Service kaosDirectoryService)
Converts one instance from the OWL ontology Called recursively to build a nested tree of KAoSInstances with properties who's values can be KAoSInstances.

Parameters:
ontModel -
instanceName -
Returns:

getActionDescriptions

public static java.util.Vector getActionDescriptions(KAoSInstanceBuilder kib,
                                                     java.lang.Class actionClass,
                                                     Service directoryService)
Convert the KAoSInstanceBuilder into a vector of action objects, either BasicActionDescription or ActionInstanceDescription as given in the actionClass parameter

Parameters:
kib - - the KAoSInstanceBuilder to convert
actionClass - - the Class for the desired return type: BAD or AID
Returns:
Vector of action objects typed according to the actionClass param

getActionDescriptions

public static java.util.Vector getActionDescriptions(java.lang.String owl,
                                                     java.lang.Class actionClass,
                                                     Service directoryService)
Convert the given OWL String to a Vector of action objects either BasicActionDescription or ActionInstanceDescription as given in the actionClass parameter

Parameters:
owl - - the OWL string to convert
actionClass - - the Class for the desired return type: BAD or AID
Returns:
Vector of action objects typed according to the actionClass param

retrieveActionClassNames

public static java.util.Vector retrieveActionClassNames(java.lang.String owl)
Get the names of all kaos action classes defined in the given owl.

Parameters:
owl - - String containing the owl model
Returns:
- Vector of Strings, each String being the URI to a kaos action class

getRootKAoSInstances

public static java.util.Vector getRootKAoSInstances(OntModel instanceModel,
                                                    Service directoryService)

getActionInstanceDescription

public static ActionInstanceDescription getActionInstanceDescription(BasicActionDescription bad)
Convert a BasicActionDescription to an ActionInstanceDescription


readFromClassModel

public static BasicActionDescription readFromClassModel(KAoSClassBuilderImpl model,
                                                        OntologyInterfaces ont)

readFromClassModel

public static void readFromClassModel(KAoSClassBuilderImpl model,
                                      BasicActionDescription bad,
                                      OntologyInterfaces ont)