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

java.lang.Object
  extended by ch.uzh.ifi.attempto.acewiki.core.AbstractStatement
All Implemented Interfaces:
Statement
Direct Known Subclasses:
AbstractSentence, Comment, MonolingualStatement

public abstract class AbstractStatement
extends java.lang.Object
implements Statement

This class represents a statement that can be either an ACE sentence or a comment. A statement can either be part of an article or it can be an independent statement that has no article.

Author:
Tobias Kuhn

Constructor Summary
protected AbstractStatement()
          Initializes a new independent statement.
 
Method Summary
 Article getArticle()
          Returns the owner ontology element of this statement.
protected  java.lang.String getDefaultLanguage()
          Returns the default language.
protected  AceWikiEngine getEngine()
          Returns the AceWiki engine.
protected  LanguageHandler getLanguageHandler(java.lang.String language)
          Returns the language handler for the given language.
 Ontology getOntology()
          Returns the ontology this statement belongs to.
protected  TextOperator getTextOperator(java.lang.String language)
          Returns the text operator for the given language.
 void init(Ontology ontology, Article article)
          This method is the first one to be called.
 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.Statement
getText, serialize
 

Constructor Detail

AbstractStatement

protected AbstractStatement()
Initializes a new independent statement.

Method Detail

init

public void init(Ontology ontology,
                 Article article)
Description copied from interface: Statement
This method is the first one to be called. It provides the ontology and the article object. The article can be null if the statement is not assigned to an article.

Specified by:
init in interface Statement
Parameters:
ontology - The ontology.
article - The article.

getOntology

public Ontology getOntology()
Description copied from interface: Statement
Returns the ontology this statement belongs to.

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

getArticle

public Article getArticle()
Description copied from interface: Statement
Returns the owner ontology element of this statement.

Specified by:
getArticle in interface Statement
Returns:
The owner ontology element.

toString

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

getEngine

protected AceWikiEngine getEngine()
Returns the AceWiki engine.

Returns:
The engine.

getDefaultLanguage

protected java.lang.String getDefaultLanguage()
Returns the default language.

Returns:
The default language.

getLanguageHandler

protected LanguageHandler getLanguageHandler(java.lang.String language)
Returns the language handler for the given language.

Parameters:
language - The language.
Returns:
The language handler.

getTextOperator

protected TextOperator getTextOperator(java.lang.String language)
Returns the text operator for the given language.

Parameters:
language - The language.
Returns:
The text operator.


Copyright 2008-2012, AceWiki developers