ch.uzh.ifi.attempto.acewiki.aceowl
Class ACESentence

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.core.MonolingualSentence
              extended by ch.uzh.ifi.attempto.acewiki.aceowl.ACESentence
All Implemented Interfaces:
Sentence, Statement, OWLSentence
Direct Known Subclasses:
ACEDeclaration, ACEQuestion

public abstract class ACESentence
extends MonolingualSentence
implements OWLSentence

This class represents an ACE sentence, which can be either a declarative sentence or a question.

Author:
Tobias Kuhn

Constructor Summary
protected ACESentence(java.lang.String serialized)
          Initializes a new ACE sentence.
protected ACESentence(TextContainer textContainer)
          Initializes a new ACE sentence.
 
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()
          Returns a list of sentence details to be shown to the user.
 java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> getOWLAxioms()
          Returns a set of OWL axioms that represent this sentence.
 ch.uzh.ifi.attempto.ape.ACEParserResult getParserResult()
          Returns the parser result object.
 java.lang.String getPrettyOWL()
          Returns a pretty-printed OWL representation of this sentence.
protected  TextContainer getTextContainer()
          Returns a text container with the text of this sentence in the only available language.
 java.util.List<TextElement> getTextElements()
          Returns a list of text elements that represent the tokens of this sentence.
 boolean isOWL()
          Returns true if this sentence has an OWL representation.
 boolean isOWLSWRL()
          Returns true if this sentence has an OWL or SWRL representation.
 boolean isReasonable()
          Returns true if this sentence can participate in reasoning.
 java.lang.String serialize()
          Returns a serialization of the statement.
 void setIntegrated(boolean integrated)
          Informs the sentence object whether it is integrated into the ontology or not.
 void update()
          This method is called whenever some words of the sentence are modified.
 
Methods inherited from class ch.uzh.ifi.attempto.acewiki.core.MonolingualSentence
getDetails, getText, getTextContainer, getTextElements, getTextOperator
 
Methods inherited from class ch.uzh.ifi.attempto.acewiki.core.AbstractSentence
getText, isImmutable, isIntegrated
 
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
getDetails, getTextElements, isImmutable, isIntegrated
 
Methods inherited from interface ch.uzh.ifi.attempto.acewiki.core.Statement
getArticle, getOntology, getText, init
 

Constructor Detail

ACESentence

protected ACESentence(java.lang.String serialized)
Initializes a new ACE sentence.

Parameters:
serialized - The serialized representation of the sentence.

ACESentence

protected ACESentence(TextContainer textContainer)
Initializes a new ACE sentence.

Parameters:
textContainer - The text container with the sentence text.
Method Detail

getTextElements

public java.util.List<TextElement> getTextElements()
Description copied from class: MonolingualSentence
Returns a list of text elements that represent the tokens of this sentence.

Specified by:
getTextElements in class MonolingualSentence
Returns:
A token list.

getTextContainer

protected TextContainer getTextContainer()
Description copied from class: MonolingualSentence
Returns a text container with the text of this sentence in the only available language.

Specified by:
getTextContainer in class MonolingualSentence
Returns:
The text container.

getParserResult

public ch.uzh.ifi.attempto.ape.ACEParserResult getParserResult()
Returns the parser result object.

Returns:
The parser result object.

getPrettyOWL

public java.lang.String getPrettyOWL()
Description copied from interface: OWLSentence
Returns a pretty-printed OWL representation of this sentence.

Specified by:
getPrettyOWL in interface OWLSentence
Returns:
The pretty-printed OWL representation.

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.

isOWL

public boolean isOWL()
Description copied from interface: OWLSentence
Returns true if this sentence has an OWL representation.

Specified by:
isOWL in interface OWLSentence
Returns:
true if this sentence has an OWL representation.

isOWLSWRL

public boolean isOWLSWRL()
Description copied from interface: OWLSentence
Returns true if this sentence has an OWL or SWRL representation.

Specified by:
isOWLSWRL in interface OWLSentence
Returns:
true if this sentence has an OWL or SWRL representation.

getOWLAxioms

public java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> getOWLAxioms()
Description copied from interface: OWLSentence
Returns a set of OWL axioms that represent this sentence.

Specified by:
getOWLAxioms in interface OWLSentence
Returns:
The OWL axioms.

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

setIntegrated

public void setIntegrated(boolean integrated)
Description copied from interface: Sentence
Informs the sentence object whether it is integrated into the ontology or not. This method should only be called from the ontology or an ontology loader.

Specified by:
setIntegrated in interface Sentence
Overrides:
setIntegrated in class AbstractSentence
Parameters:
integrated - true if the sentence is integrated into the ontology.

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.

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.

getDetails

public java.util.List<SentenceDetail> getDetails()
Description copied from class: MonolingualSentence
Returns a list of sentence details to be shown to the user.

Specified by:
getDetails in class MonolingualSentence
Returns:
A list of sentence details.


Copyright 2008-2012, AceWiki developers