From: <lh...@us...> - 2008-10-06 15:13:48
|
Revision: 166 http://tinytim.svn.sourceforge.net/tinytim/?rev=166&view=rev Author: lheuer Date: 2008-10-06 15:12:42 +0000 (Mon, 06 Oct 2008) Log Message: ----------- JavaDocs Modified Paths: -------------- tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java Modified: tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java =================================================================== --- tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java 2008-10-06 13:12:10 UTC (rev 165) +++ tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java 2008-10-06 15:12:42 UTC (rev 166) @@ -37,10 +37,15 @@ import org.tmapi.core.TopicMapSystemFactory; /** + * Console to issue commands against a {@link org.tmapi.core.TopicMapSystem}. + * <p> + * Even if the implementation tries to use TMAPI as much as possible, the console + * needs tinyTiM and is not compatible to other TMAPI implementations. Adapting the code + * to pure TMAPI should be possible with some effort, though. + * </p> * - * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> - * @version $Rev:$ - $Date:$ + * @version $Rev$ - $Date$ */ public class Console { @@ -143,7 +148,6 @@ _print(">>> "); String line = _reader.readLine(); if (line == null) { - // EOF return null; } StringBuilder buf = new StringBuilder(256); @@ -154,7 +158,7 @@ buf.append('\n') .append(line); } - // Remove closing dot + // Remove command delimiter buf.setLength(buf.length() - 1); return buf.toString().trim(); } @@ -200,6 +204,9 @@ } + /** + * Creates a new topic map with the specified locator + */ private class CreateCommand extends AbstractCommand { public CreateCommand() { @@ -224,9 +231,11 @@ } } + /** + * Deserializes a topic map and adds the content to a local topic map. + */ + private class ReadCommand extends AbstractCommand { - public class ReadCommand extends AbstractCommand { - public ReadCommand() { super("read <source:url> into <target:url> [using <syntax:identifier>]", "Reads the content from a source into a local topic map"); @@ -242,7 +251,10 @@ } - public class ShowCommand extends AbstractCommand { + /** + * Shows an overview about the topic maps available in the system. + */ + private class ShowCommand extends AbstractCommand { public ShowCommand() { super("show", "Returns a list of topic maps"); @@ -266,6 +278,9 @@ } } + /** + * Serializes a topic map. + */ private class WriteCommand extends AbstractCommand { public WriteCommand() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |