kaos.ontology.util
Class ConceptTranslator

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

public final class ConceptTranslator
extends java.lang.Object

Implements static methods in order to store various mappings between concepts defined in agent systems and terms defined in KAoS ontologies. It also defines methods to translate the concepts of the agent system contained in KAoSEntityDescription and ActionInstanceDescription into their equivalents in KAoS ontologies.


Field Summary
static java.lang.String KAOS_MAPPING
           
 
Method Summary
protected static void printDebugString(java.lang.String msg, int loggerDisplayLevel)
          Print debug messages.
static boolean setMapping(java.lang.String mappingName, java.lang.String fileNameLoc)
          Load the mapping, whose name and location are given.
static ActionInstanceDescription translateAID(ActionInstanceDescription originalAID)
          Translate ontological concepts contained by the given ActionInstanceDescription into concepts used in KAoS ontologies.
static java.lang.String translateConceptInMapping(java.lang.String conceptName, java.lang.String mappingName)
          Translate the given concept using the specified mapping into a concept used in KAoS ontologies.
static KAoSEntityDescription translateKAoSEntityDescription(KAoSEntityDescription desc)
          Translate ontological concepts contained by the given KAoSEntityDescription into concepts used in KAoS ontologies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KAOS_MAPPING

public static final java.lang.String KAOS_MAPPING
See Also:
Constant Field Values
Method Detail

setMapping

public static boolean setMapping(java.lang.String mappingName,
                                 java.lang.String fileNameLoc)
Load the mapping, whose name and location are given.

Parameters:
mappingName - The String specifying the name of the mapping.
fileNameLoc - The String specifying the name and path of the file containing the mapping.
Returns:
boolean indicating success(true)/failure(false) of the operation.

translateAID

public static ActionInstanceDescription translateAID(ActionInstanceDescription originalAID)
Translate ontological concepts contained by the given ActionInstanceDescription into concepts used in KAoS ontologies.

Parameters:
originalAID - The ActionInstanceDescription containing concepts from the agent system to be translated into concepts used in KAoS ontology.
Returns:
ActionInstanceDescription containing the agent concepts translated into KAoS ontology concepts, or originalAID if the name of the mapping is "KAoS", indicating no translation necessary, or null if the name of the mapping contained by originalAID is null, or null if the mapping is not stored by the ConceptTranslator, or null if any of the agent concepts cannot be translated into KAoS ontology concepts.

translateConceptInMapping

public static java.lang.String translateConceptInMapping(java.lang.String conceptName,
                                                         java.lang.String mappingName)
Translate the given concept using the specified mapping into a concept used in KAoS ontologies.

Parameters:
conceptName - The String specifying the given concept.
mappingName - The String specifying the mapping to be used in translation.
Returns:
String containing the equivalent in KAoS ontologies.

translateKAoSEntityDescription

public static KAoSEntityDescription translateKAoSEntityDescription(KAoSEntityDescription desc)
Translate ontological concepts contained by the given KAoSEntityDescription into concepts used in KAoS ontologies.

Parameters:
desc - The KAoSEntityDescription containing concepts from the agent system to be translated into concepts used in KAoS ontology.
Returns:
KAoSEntityDescription containing the agent concepts translated into KAoS ontology concepts, or desc if the name of the mapping is "KAoS", indicating no translation necessary, or desc if the ontological types to be translated are null, or null if the name of the mapping contained by desc is null, or null if the mapping is not stored by the ConceptTranslator, or

printDebugString

protected static void printDebugString(java.lang.String msg,
                                       int loggerDisplayLevel)
Print debug messages.