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

java.lang.Object
  extended by ch.uzh.ifi.attempto.acewiki.core.StatementFactory

public class StatementFactory
extends java.lang.Object

This factory class is used to generate different kind of statements (declarations, questions and comments).

Author:
Tobias Kuhn

Method Summary
 Sentence createAssignmentSentence(Individual ind, Concept conc)
          Creates an assignment sentence.
 Comment createComment(java.lang.String text, Article article)
          Creates a new comment.
 Sentence createHierarchySentence(Concept subConc, Concept superConc)
          Creates a hierarchy sentence.
 Sentence createSentence(java.lang.String serialized, Article article)
          Creates a new sentence object with the given article.
 java.util.List<Sentence> extractSentences(LanguageHandler languageHandler, TextContainer tc, PredictiveParser parser, Article article)
          Extracts sentence objects out of a text container and/or a parser state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createComment

public Comment createComment(java.lang.String text,
                             Article article)
Creates a new comment. Comments must be part of an article.

Parameters:
text - The comment text.
article - The article.
Returns:
The new comment.

createSentence

public Sentence createSentence(java.lang.String serialized,
                               Article article)
Creates a new sentence object with the given article.

Parameters:
serialized - The serialized representation of the sentence.
article - The article.
Returns:
A new sentence object.

extractSentences

public java.util.List<Sentence> extractSentences(LanguageHandler languageHandler,
                                                 TextContainer tc,
                                                 PredictiveParser parser,
                                                 Article article)
Extracts sentence objects out of a text container and/or a parser state.

Parameters:
tc - The text container.
languageHandler - The language handler.
parser - The parser object with the parsed text.
article - The article of the sentences.
Returns:
A list of sentences.

createAssignmentSentence

public Sentence createAssignmentSentence(Individual ind,
                                         Concept conc)
Creates an assignment sentence.

Parameters:
ind - The individual.
conc - The concept.
Returns:
A new assignement sentence.

createHierarchySentence

public Sentence createHierarchySentence(Concept subConc,
                                        Concept superConc)
Creates a hierarchy sentence.

Parameters:
subConc - The sub-concept.
superConc - The super-concept.
Returns:
A new hierarchy sentence.


Copyright 2008-2012, AceWiki developers