OntologyEntityFinder
Class OntologyDescription

java.lang.Object
  extended by OntologyEntityFinder.OntologyDescription

public class OntologyDescription
extends java.lang.Object

Class describing an ontology

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

Field Summary
private  java.util.HashSet<Entity> entities
          the set of entities that compose the ontology
private  java.lang.String lastResult
           
private  java.lang.String prefix
          The prefix to give to this ontology
private  java.lang.String url
          The base url of the ontology
 
Constructor Summary
OntologyDescription(java.lang.String u, java.lang.String p)
          Standard constructor
 
Method Summary
 Entity addEntities(java.lang.String name)
          Add an entity to the ontology
 double compareWord(java.util.LinkedList<java.lang.String> setStr)
          Compare a set of words with all the entities of the ontology and return the highest result and set lastResulst to the entity which provided this result
 Entity getEntity(java.lang.String name)
           
 java.lang.String getLastResult()
           
 java.lang.String getPrefix()
           
 java.lang.String getUrl()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

url

private java.lang.String url
The base url of the ontology


prefix

private java.lang.String prefix
The prefix to give to this ontology


entities

private java.util.HashSet<Entity> entities
the set of entities that compose the ontology


lastResult

private java.lang.String lastResult
Constructor Detail

OntologyDescription

public OntologyDescription(java.lang.String u,
                           java.lang.String p)
Standard constructor

Parameters:
u - the url of the ontology
p - the prefix to use for this ontology
Method Detail

getUrl

public java.lang.String getUrl()
Returns:
the base url of the ontology

getPrefix

public java.lang.String getPrefix()
Returns:
the prefix of the ontology

getLastResult

public java.lang.String getLastResult()
Returns:
the last computed result of compareWord

addEntities

public Entity addEntities(java.lang.String name)
Add an entity to the ontology

Parameters:
name - name of the entity
Returns:
the created entity

getEntity

public Entity getEntity(java.lang.String name)
Parameters:
name - the name of the entity
Returns:
the entity with this name, null if no entity has this name

compareWord

public double compareWord(java.util.LinkedList<java.lang.String> setStr)
Compare a set of words with all the entities of the ontology and return the highest result and set lastResulst to the entity which provided this result

Parameters:
setStr - the word to compare
Returns:
the similarity between the word and the entity

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object