ch.uzh.ifi.attempto.acewiki.core
Class DefaultWordIndex

java.lang.Object
  extended by ch.uzh.ifi.attempto.acewiki.core.DefaultWordIndex
All Implemented Interfaces:
WordIndex

public class DefaultWordIndex
extends java.lang.Object
implements WordIndex

This class is the default implementation of a word index.

Author:
Tobias Kuhn

Constructor Summary
DefaultWordIndex()
           
 
Method Summary
 void elementAdded(OntologyElement element)
          This method is called by the ontology object when a new ontology element is added.
 void elementAfterChange(OntologyElement element)
          This method is called just after the word forms of an ontology element have been changed.
 void elementBeforeChange(OntologyElement element)
          This method is called just before the word forms of an ontology element are changed.
 void elementRemoved(OntologyElement element)
          This method is called by the ontology object when an ontology element is removed.
 OntologyElement getElement(java.lang.String word)
          This method should return the ontology element with the given word form, or null if there is no such element.
 java.util.List<OntologyElement> searchForElements(java.lang.String searchText)
          This method should return a list of ontology elements that match the given search text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWordIndex

public DefaultWordIndex()
Method Detail

elementAdded

public void elementAdded(OntologyElement element)
Description copied from interface: WordIndex
This method is called by the ontology object when a new ontology element is added.

Specified by:
elementAdded in interface WordIndex
Parameters:
element - A new ontology element.

elementRemoved

public void elementRemoved(OntologyElement element)
Description copied from interface: WordIndex
This method is called by the ontology object when an ontology element is removed.

Specified by:
elementRemoved in interface WordIndex
Parameters:
element - The ontology element to be removed.

elementBeforeChange

public void elementBeforeChange(OntologyElement element)
Description copied from interface: WordIndex
This method is called just before the word forms of an ontology element are changed.

Specified by:
elementBeforeChange in interface WordIndex
Parameters:
element - The ontology element to be changed.

elementAfterChange

public void elementAfterChange(OntologyElement element)
Description copied from interface: WordIndex
This method is called just after the word forms of an ontology element have been changed.

Specified by:
elementAfterChange in interface WordIndex
Parameters:
element - The changed ontology element.

getElement

public OntologyElement getElement(java.lang.String word)
Description copied from interface: WordIndex
This method should return the ontology element with the given word form, or null if there is no such element.

Specified by:
getElement in interface WordIndex
Parameters:
word - The word form.
Returns:
The ontology element or null.

searchForElements

public java.util.List<OntologyElement> searchForElements(java.lang.String searchText)
Description copied from interface: WordIndex
This method should return a list of ontology elements that match the given search text.

Specified by:
searchForElements in interface WordIndex
Parameters:
searchText - The text to search for.
Returns:
The list of ontology elements.


Copyright 2008-2012, AceWiki developers