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

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

public class Article
extends java.lang.Object

This class represents a wiki article.

Author:
Tobias Kuhn

Constructor Summary
protected Article(OntologyElement element)
          Creates a new article for the given ontology element.
 
Method Summary
 void add(Statement followingStatement, java.util.List<Statement> newStatements)
          Adds one or more new statements to the article.
 void add(Statement followingStatement, Statement newStatement)
          Adds one new statement to the article.
 void edit(Statement oldStatement, java.util.List<Statement> newStatements)
          Edits a statement of the article.
 void edit(Statement oldStatement, Statement newStatement)
          Edits a statement of the article.
 Ontology getOntology()
          Returns the ontology object.
 OntologyElement getOntologyElement()
          Returns the ontology element of this article.
 java.util.List<Sentence> getSentences()
          Returns the ACE sentences of the article text.
 java.util.List<Statement> getStatements()
          Returns the article text as a list of statements.
protected  void log(java.lang.String text)
          Writes the text to the log file.
 void remove(Statement statement)
          Removes the given statement from the article.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Article

protected Article(OntologyElement element)
Creates a new article for the given ontology element.

Parameters:
element - The ontology element.
Method Detail

getOntologyElement

public OntologyElement getOntologyElement()
Returns the ontology element of this article.

Returns:
The ontology element.

getOntology

public Ontology getOntology()
Returns the ontology object.

Returns:
The ontoloy.

getStatements

public java.util.List<Statement> getStatements()
Returns the article text as a list of statements.

Returns:
The statements.

getSentences

public java.util.List<Sentence> getSentences()
Returns the ACE sentences of the article text.

Returns:
The ACE sentences.

edit

public void edit(Statement oldStatement,
                 Statement newStatement)
Edits a statement of the article. The old statement is replaced by the new statement.

Parameters:
oldStatement - The statement that should be edited.
newStatement - The new statement.

edit

public void edit(Statement oldStatement,
                 java.util.List<Statement> newStatements)
Edits a statement of the article. The old statement is replaced by the new statements.

Parameters:
oldStatement - The statement that should be edited.
newStatements - The new statements.

add

public void add(Statement followingStatement,
                Statement newStatement)
Adds one new statement to the article. One has to specify in front of which statement the new statement should be added.

Parameters:
followingStatement - The statement in front of which the new statement should be added, or null if the statement should be added to the end of the article.
newStatement - The new statement to be added.

add

public void add(Statement followingStatement,
                java.util.List<Statement> newStatements)
Adds one or more new statements to the article. It has to be specified in front of which statement the new statement should be added.

Parameters:
followingStatement - The statement in front of which the new statements should be added, or null if the statements should be added to the end of the article.
newStatements - The new statements to be added.

remove

public void remove(Statement statement)
Removes the given statement from the article.

Parameters:
statement - The statement to be removed.

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.


Copyright 2008-2012, AceWiki developers