de.dfleischhacker.uni.thesis.utils.types
Class TypeMap

java.lang.Object
  extended by de.dfleischhacker.uni.thesis.utils.types.TypeMap

public class TypeMap
extends java.lang.Object

This class builds a map with entity types for the entities contained in the given ontologies and provides an interface to receive these contents.


Constructor Summary
TypeMap(Ontology onto1, Ontology onto2)
          Initializes the internal entity type maps from the given ontologies.
 
Method Summary
 void dump(java.lang.String filename)
          Dumps the generated typemap to the given file
 java.lang.String getType(java.lang.String uri)
          Returns the type of the given entity.
 boolean isClass(java.lang.String entity)
          Checks whether the given entity is a class.
 boolean isDataProperty(java.lang.String entity)
          Checks whether the given entity is a data property.
 boolean isObjectProperty(java.lang.String entity)
          Checks whether the given entity is an object property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeMap

public TypeMap(Ontology onto1,
               Ontology onto2)
Initializes the internal entity type maps from the given ontologies.

Parameters:
onto1 - ontology 1
onto2 - ontology 2
Method Detail

isClass

public boolean isClass(java.lang.String entity)
Checks whether the given entity is a class.

Parameters:
entity - entity to check
Returns:
true if entity is class, false otherwise

isDataProperty

public boolean isDataProperty(java.lang.String entity)
Checks whether the given entity is a data property.

Parameters:
entity - entity to check
Returns:
true if entity is data property, false otherwise

isObjectProperty

public boolean isObjectProperty(java.lang.String entity)
Checks whether the given entity is an object property.

Parameters:
entity - entity to check
Returns:
true if entity is object property, false otherwise

getType

public java.lang.String getType(java.lang.String uri)
Returns the type of the given entity. This method is used for debugging purposes.

Parameters:
uri - entity's URI
Returns:
type as string

dump

public void dump(java.lang.String filename)
          throws java.io.IOException
Dumps the generated typemap to the given file

Parameters:
filename - filename to dump typemap to
Throws:
java.io.IOException