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

java.lang.Object
  extended by ch.uzh.ifi.attempto.acewiki.core.AbstractOntologyElement
All Implemented Interfaces:
OntologyElement
Direct Known Subclasses:
AbstractOWLOntoElement, DummyOntologyElement

public abstract class AbstractOntologyElement
extends java.lang.Object
implements OntologyElement

This is a partial implementation of an ontology element.

Author:
Tobias Kuhn

Constructor Summary
AbstractOntologyElement()
           
 
Method Summary
 Article getArticle()
          Returns the article of this ontology element.
 java.lang.String[] getHeadwords()
          Returns the headwords that are used in the GUI (title, index, etc) to refer to this ontology element.
 long getId()
          Returns the numerical id of this ontology element.
 Ontology getOntology()
          Returns the ontology of this ontology element.
 java.lang.String getWord()
          Returns the main word form.
 java.lang.String getWord(int n)
          Returns the word form for the given word form id.
 void initArticle(Article article)
          Initializes the article of this ontology element.
 void initId(long id)
          Initializes the id of this ontology element.
 void initOntology(Ontology ontology)
          Initializes the ontology of this ontology element.
protected  void log(java.lang.String text)
          Writes the text to the log file.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ch.uzh.ifi.attempto.acewiki.core.OntologyElement
getInternalType, getType, getWords, serializeWords, setWords
 

Constructor Detail

AbstractOntologyElement

public AbstractOntologyElement()
Method Detail

initId

public void initId(long id)
Description copied from interface: OntologyElement
Initializes the id of this ontology element.

Specified by:
initId in interface OntologyElement
Parameters:
id - The id.

initOntology

public void initOntology(Ontology ontology)
Description copied from interface: OntologyElement
Initializes the ontology of this ontology element.

Specified by:
initOntology in interface OntologyElement
Parameters:
ontology - The ontology.

initArticle

public void initArticle(Article article)
Description copied from interface: OntologyElement
Initializes the article of this ontology element.

Specified by:
initArticle in interface OntologyElement
Parameters:
article - The article.

getWord

public java.lang.String getWord(int n)
Description copied from interface: OntologyElement
Returns the word form for the given word form id.

Specified by:
getWord in interface OntologyElement
Parameters:
n - The word form id.
Returns:
The word form.

getWord

public java.lang.String getWord()
Description copied from interface: OntologyElement
Returns the main word form.

Specified by:
getWord in interface OntologyElement
Returns:
The word form.

getHeadwords

public java.lang.String[] getHeadwords()
Description copied from interface: OntologyElement
Returns the headwords that are used in the GUI (title, index, etc) to refer to this ontology element. At least one headword is required.

Specified by:
getHeadwords in interface OntologyElement
Returns:
The headwords.

getId

public long getId()
Description copied from interface: OntologyElement
Returns the numerical id of this ontology element.

Specified by:
getId in interface OntologyElement
Returns:
The id.

getOntology

public Ontology getOntology()
Description copied from interface: OntologyElement
Returns the ontology of this ontology element.

Specified by:
getOntology in interface OntologyElement
Returns:
The ontology.

getArticle

public Article getArticle()
Description copied from interface: OntologyElement
Returns the article of this ontology element.

Specified by:
getArticle in interface OntologyElement
Returns:
The article.

log

protected void log(java.lang.String text)
Writes the text to the log file.

Parameters:
text - The text to be written to the log file.

toString

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


Copyright 2008-2012, AceWiki developers