OntologyEntityFinder
Class OntologyEntityFinder

java.lang.Object
  extended by OntologyEntityFinder.OntologyEntityFinder

public class OntologyEntityFinder
extends java.lang.Object

Author:
Simeon Polfliet (simeon.polfliet@ensimag.imag.fr)

Field Summary
private  java.util.Hashtable<java.lang.String,java.lang.String> alreadyCalc
          Stores the relations to not recalculate them
private  OntologyDescription curOnto
          Ontology currently being loaded
private  double lastResult
           
private  java.util.LinkedList<OntologyDescription> listOnto
          List of used ontologies
private  java.util.Hashtable<java.lang.String,java.lang.String> obviousRelations
          Dictionary of the obvious associations between a word and an entity, to avoid useless computations
 
Constructor Summary
OntologyEntityFinder(boolean useWN)
          Standard constructor
 
Method Summary
 java.lang.String getEntity(java.lang.String str)
          Associate a string (= Table name or table attribute) with an ontology entity
 java.lang.String getEntity(java.lang.String str, java.lang.String context)
          Associate a string (= Table name or table attribute) with an ontology entity
 double getLastResult()
           
private  void loadEntity(java.util.Set<org.semanticweb.owlapi.model.OWLEntity> setEntity, org.semanticweb.owlapi.model.OWLOntology ontology)
          Add all the entities of the set to the current ontology
 void loadOntology(java.lang.String fileName, java.lang.String url, java.lang.String prefix)
          Add an ontology the the list of ontology by parsing an ontology description given in a RDF/XML file
 void updateAlreadyCalc(java.util.Hashtable<java.lang.String,java.lang.String> table)
          Update the set of calculated elements Can be used to take into account user input
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listOnto

private java.util.LinkedList<OntologyDescription> listOnto
List of used ontologies


curOnto

private OntologyDescription curOnto
Ontology currently being loaded


obviousRelations

private java.util.Hashtable<java.lang.String,java.lang.String> obviousRelations
Dictionary of the obvious associations between a word and an entity, to avoid useless computations


alreadyCalc

private java.util.Hashtable<java.lang.String,java.lang.String> alreadyCalc
Stores the relations to not recalculate them


lastResult

private double lastResult
Constructor Detail

OntologyEntityFinder

public OntologyEntityFinder(boolean useWN)
Standard constructor

Parameters:
useWN - will use WordNet Similarity if true and only String similarity if false
Method Detail

getLastResult

public double getLastResult()

updateAlreadyCalc

public void updateAlreadyCalc(java.util.Hashtable<java.lang.String,java.lang.String> table)
Update the set of calculated elements Can be used to take into account user input

Parameters:
table - The table of relations

loadEntity

private void loadEntity(java.util.Set<org.semanticweb.owlapi.model.OWLEntity> setEntity,
                        org.semanticweb.owlapi.model.OWLOntology ontology)
Add all the entities of the set to the current ontology

Parameters:
setEntity -
ontology -

loadOntology

public void loadOntology(java.lang.String fileName,
                         java.lang.String url,
                         java.lang.String prefix)
Add an ontology the the list of ontology by parsing an ontology description given in a RDF/XML file

Parameters:
fileName - path of the file with the ontology description
url - base url of the ontology
prefix - prefix tu use for this ontology

getEntity

public java.lang.String getEntity(java.lang.String str,
                                  java.lang.String context)
Associate a string (= Table name or table attribute) with an ontology entity

Parameters:
str - the input string
context - the context string (= TableName + Attribute)
Returns:
the "best" corresponding entity name

getEntity

public java.lang.String getEntity(java.lang.String str)
Associate a string (= Table name or table attribute) with an ontology entity

Parameters:
str - the input string
Returns:
the "best" corresponding entity name