ch.uzh.ifi.attempto.acewiki
Class Wiki

java.lang.Object
  extended by ch.uzh.ifi.attempto.acewiki.Wiki
All Implemented Interfaces:
echopointng.externalevent.ExternalEventListener, java.io.Serializable, java.util.EventListener, nextapp.echo2.app.event.ActionListener

public class Wiki
extends java.lang.Object
implements nextapp.echo2.app.event.ActionListener, echopointng.externalevent.ExternalEventListener

This class represents an AceWiki wiki.

Author:
Tobias Kuhn
See Also:
Serialized Form

Method Summary
 void actionPerformed(nextapp.echo2.app.event.ActionEvent e)
           
 void back()
          Go to the previous page in the history.
 void enqueueAsyncTask(java.lang.String title, java.lang.String message, Task task)
          Runs the task in an asynchronous way and shows a wait window while it is executed.
 void enqueueAsyncTask(Task task)
          Runs the task in an asynchronous way without showing a wait window.
 void enqueueTask(java.lang.Runnable task)
          Runs the task without showing a wait window while it is executed.
 void externalEvent(echopointng.externalevent.ExternalEvent e)
           
 void forward()
          Go to the next page in the history.
 nextapp.echo2.app.ApplicationInstance getApplication()
          Returns the application instance object of this wiki.
 nextapp.echo2.app.ContentPane getContentPane()
          Returns the content pane containing the wiki GUI.
 Grammar getGrammar()
          Returns the grammar to be used for this wiki.
static java.lang.String getInfo(java.lang.String key)
          Returns information about AceWiki, like the version number and the release date.
 Ontology getOntology()
          Returns the ontology;
 java.util.Collection<OntologyElement> getOntologyElements()
          Returns all ontology elements.
 void log(java.lang.String type, java.lang.String text)
          Writes the log entry to the log file.
 void refresh()
          Refreshes the current page.
 void setUsername(java.lang.String username)
          Sets the user name.
 void showIndexPage()
          Show the index page.
 void showPage(OntologyElement e)
          Switches to the page of the given ontology element.
 void showPage(WikiPage page)
          Switches to the given page.
 void showSearchPage()
          Show the search page.
 void showStartPage()
          Show the start page.
 void showWindow(WindowPane window)
          Displays the window in the wiki.
 void update()
          Updates the GUI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContentPane

public nextapp.echo2.app.ContentPane getContentPane()
Returns the content pane containing the wiki GUI.

Returns:
The content pane.

getApplication

public nextapp.echo2.app.ApplicationInstance getApplication()
Returns the application instance object of this wiki.

Returns:
The application instance.

showWindow

public void showWindow(WindowPane window)
Displays the window in the wiki.

Parameters:
window - The window to be shown.

showPage

public void showPage(WikiPage page)
Switches to the given page.

Parameters:
page - The page to switch to.

showPage

public void showPage(OntologyElement e)
Switches to the page of the given ontology element.

Parameters:
e - The ontology element the page of which should be shown.

back

public void back()
Go to the previous page in the history.


forward

public void forward()
Go to the next page in the history.


showStartPage

public void showStartPage()
Show the start page.


showIndexPage

public void showIndexPage()
Show the index page.


showSearchPage

public void showSearchPage()
Show the search page.


getOntology

public Ontology getOntology()
Returns the ontology;

Returns:
The ontology.

getOntologyElements

public java.util.Collection<OntologyElement> getOntologyElements()
Returns all ontology elements.

Returns:
A collection of all ontology elements.

update

public void update()
Updates the GUI.


refresh

public void refresh()
Refreshes the current page.


actionPerformed

public void actionPerformed(nextapp.echo2.app.event.ActionEvent e)
Specified by:
actionPerformed in interface nextapp.echo2.app.event.ActionListener

externalEvent

public void externalEvent(echopointng.externalevent.ExternalEvent e)
Specified by:
externalEvent in interface echopointng.externalevent.ExternalEventListener

log

public void log(java.lang.String type,
                java.lang.String text)
Writes the log entry to the log file.

Parameters:
type - The type of the log entry.
text - The text of the log entry.

setUsername

public void setUsername(java.lang.String username)
Sets the user name.

Parameters:
username - The user name.

getGrammar

public Grammar getGrammar()
Returns the grammar to be used for this wiki.

Returns:
The grammar.

enqueueTask

public void enqueueTask(java.lang.Runnable task)
Runs the task without showing a wait window while it is executed.

Parameters:
task - The task.

enqueueAsyncTask

public void enqueueAsyncTask(java.lang.String title,
                             java.lang.String message,
                             Task task)
Runs the task in an asynchronous way and shows a wait window while it is executed.

Parameters:
title - The title of the wait window.
message - The message of the wait window.
task - The task.

enqueueAsyncTask

public void enqueueAsyncTask(Task task)
Runs the task in an asynchronous way without showing a wait window.

Parameters:
task - The task.

getInfo

public static java.lang.String getInfo(java.lang.String key)
Returns information about AceWiki, like the version number and the release date. This information is read from the file "acewiki.properties".

Parameters:
key - The key string.
Returns:
The value for the given key.


Copyright 2008-2009, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch)