ibspan.tss.core.semantic
Class Util

java.lang.Object
  extended by ibspan.tss.core.semantic.Util

public class Util
extends Object

Class helping in operation on ontological data. Provides implementation of reflection function.

Author:
Maciej Gawinecki

Constructor Summary
Util()
           
 
Method Summary
static String getClosestRDFType(com.ibm.adtech.jastor.Thing t)
          Returns the main rdf:type of the given Thing.
static Map<String,String> getMap(Map inMap)
          Translates Map object from Messaging ontology into Java Map form.
static Resource getReflection(Resource r, OntModel mDB, OntModel mDomain)
          Returns reflection of the given resource r into given domain mDomain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

getClosestRDFType

public static String getClosestRDFType(com.ibm.adtech.jastor.Thing t)
Returns the main rdf:type of the given Thing.

Parameters:
t - is thing object
Returns:
URI reference of value for rdf:type property

getReflection

public static Resource getReflection(Resource r,
                                     OntModel mDB,
                                     OntModel mDomain)
Returns reflection of the given resource r into given domain mDomain.

Parameters:
uri - uri of the resource to be reflected
mDB - is model, which contains statements about resource uri
mDomain - domain model describing classes
Returns:
<
  • uri if resource with this uri , i.e. this resource occurs as a subject of a any statement in mDomain.
  • URI of C, if resource with this uri does NOT belong do mDomain and instance of resource (class) C, belonging do mDomain.
  • null -- otherwise.

getMap

public static Map<String,String> getMap(Map inMap)
Translates Map object from Messaging ontology into Java Map form.

Parameters:
inMap - is Map object from the ontology
Returns:
Java Map form of inMap