ch.uzh.ifi.attempto.acewiki.gf
Class GFDeclaration

java.lang.Object
  extended by ch.uzh.ifi.attempto.acewiki.core.AbstractStatement
      extended by ch.uzh.ifi.attempto.acewiki.core.AbstractSentence
          extended by ch.uzh.ifi.attempto.acewiki.gf.GFDeclaration
All Implemented Interfaces:
Declaration, Sentence, Statement

public class GFDeclaration
extends AbstractSentence
implements Declaration

This class represents a declaration statement for the GF AceWiki engine.

Author:
Tobias Kuhn

Constructor Summary
GFDeclaration(org.grammaticalframework.parser.ParseState parseState, GFGrammar gfGrammar)
          Creates a new GF declaration object from a parse state.
GFDeclaration(java.lang.String text, java.lang.String language, GFGrammar gfGrammar)
          Creates a new GF declaration object from a text in a given language.
 
Method Summary
 boolean contains(OntologyElement e)
          Checks whether the sentence contains the given ontology element (no matter which word form).
 java.util.List<SentenceDetail> getDetails(java.lang.String language)
          Returns a list of sentence details in the given language.
 GFGrammar getGFGrammar()
          Returns the grammar object.
protected  TextContainer getTextContainer(java.lang.String language)
          Returns a text container with the text of this sentence in the given language.
 java.util.List<TextElement> getTextElements(java.lang.String language)
          Returns a list of text elements that represent the tokens of this sentence in the given language.
 boolean isReasonable()
          Returns true if this sentence can participate in reasoning.
 java.lang.String serialize()
          Returns a serialization of the statement.
 void update()
          This method is called whenever some words of the sentence are modified.
 
Methods inherited from class ch.uzh.ifi.attempto.acewiki.core.AbstractSentence
getText, isImmutable, isIntegrated, setIntegrated
 
Methods inherited from class ch.uzh.ifi.attempto.acewiki.core.AbstractStatement
getArticle, getDefaultLanguage, getEngine, getLanguageHandler, getOntology, getTextOperator, init, 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.Sentence
isImmutable, isIntegrated, setIntegrated
 
Methods inherited from interface ch.uzh.ifi.attempto.acewiki.core.Statement
getArticle, getOntology, getText, init
 

Constructor Detail

GFDeclaration

public GFDeclaration(org.grammaticalframework.parser.ParseState parseState,
                     GFGrammar gfGrammar)
Creates a new GF declaration object from a parse state.

Parameters:
parseState - The parse state.
gfGrammar - The grammar object.

GFDeclaration

public GFDeclaration(java.lang.String text,
                     java.lang.String language,
                     GFGrammar gfGrammar)
Creates a new GF declaration object from a text in a given language.

Parameters:
text - The declaration text.
language - The language.
gfGrammar - The grammar object.
Method Detail

getTextContainer

protected TextContainer getTextContainer(java.lang.String language)
Description copied from class: AbstractSentence
Returns a text container with the text of this sentence in the given language.

Specified by:
getTextContainer in class AbstractSentence
Parameters:
language - The language.
Returns:
The text container.

getTextElements

public java.util.List<TextElement> getTextElements(java.lang.String language)
Description copied from interface: Sentence
Returns a list of text elements that represent the tokens of this sentence in the given language.

Specified by:
getTextElements in interface Sentence
Parameters:
language - The language.
Returns:
A token list.

contains

public boolean contains(OntologyElement e)
Description copied from interface: Sentence
Checks whether the sentence contains the given ontology element (no matter which word form).

Specified by:
contains in interface Sentence
Parameters:
e - The ontology element.
Returns:
true if the ontology element occurs in this sentence.

getDetails

public java.util.List<SentenceDetail> getDetails(java.lang.String language)
Description copied from interface: Sentence
Returns a list of sentence details in the given language.

Specified by:
getDetails in interface Sentence
Parameters:
language - The language.
Returns:
A list of sentence details.

isReasonable

public boolean isReasonable()
Description copied from interface: Sentence
Returns true if this sentence can participate in reasoning.

Specified by:
isReasonable in interface Sentence
Returns:
true if this sentence can participate in reasoning.

update

public void update()
Description copied from interface: Sentence
This method is called whenever some words of the sentence are modified.

Specified by:
update in interface Sentence

serialize

public java.lang.String serialize()
Description copied from interface: Statement
Returns a serialization of the statement.

Specified by:
serialize in interface Statement
Returns:
The serialized representation of the statement.

getGFGrammar

public GFGrammar getGFGrammar()
Returns the grammar object.

Returns:
The grammar object.


Copyright 2008-2012, AceWiki developers