org.argouml.xml.todo
Class TodoParser

org.argouml.xml.SAXParserBase
  |
  +--org.argouml.xml.todo.TodoParser

public class TodoParser
extends SAXParserBase

Class that reads a todo list from a todo xml file. This class is a SINGLETON.

See Also:
SINGLETON

Field Summary
protected  java.lang.String _critic
          The critic String of the ResolvedCritic currently being read.
protected  java.lang.String _description
          The description of the ToDoItem currently being read.
protected  java.lang.String _headline
          The headline of the ToDoItem currently being read.
protected  java.lang.String _moreinfourl
          The moreInfoURL of the ToDoItem currently being read.
protected  java.util.Vector _offenders
          The offenders vector of the ResolvedCritic currently being read.
protected  int _priority
          The priority of the ToDoItem currently being read.
protected static org.apache.log4j.Category cat
           
static TodoParser SINGLETON
          The SINGLETON object of this class.
 
Fields inherited from class org.argouml.xml.SAXParserBase
_dbg, _returnString, _startElement, _verbose
 
Constructor Summary
protected TodoParser()
          Creates a new TodoParser.
 
Method Summary
static java.lang.String decode(java.lang.String str)
          Utility method to decode a String filtering out any noice that an XML framework might have seen fit to add and thus regaining the original unmodified String.
static java.lang.String encode(java.lang.String str)
          Utility method to encode a String in a way that allows it to be saved properly in an XML file and regained filtering out any noice that an XML framework might have seen fit to add.
protected  void handleDescription(XMLElement e)
          Internal method.
 void handleEndElement(XMLElement e)
          Called by the XML implementation to signal the end of an XML entity.
protected  void handleHeadline(XMLElement e)
          Internal method.
protected  void handleIssueEnd(XMLElement e)
          Internal method.
protected  void handleIssueStart(XMLElement e)
          Internal method.
protected  void handleMoreInfoURL(XMLElement e)
          Internal method.
protected  void handleOffender(XMLElement e)
          Internal method.
protected  void handlePoster(XMLElement e)
          Internal method.
protected  void handlePriority(XMLElement e)
          Internal method.
protected  void handleResolvedCritics(XMLElement e)
          Internal method.
 void handleStartElement(XMLElement e)
          Called by the XML implementation to signal the start of an XML entity.
protected  void handleTodo(XMLElement e)
          Internal method.
protected  void handleTodoItemEnd(XMLElement e)
          Internal method.
protected  void handleTodoItemStart(XMLElement e)
          Internal method.
protected  void handleTodoList(XMLElement e)
          Internal method.
 void readTodoList(java.io.InputStream is, boolean addMembers)
          Reads an XML todo list from InputStream is and enters any todo items into the current designer.
 void readTodoList(java.net.URL url)
          Reads a todo list from the file named in url.
 void readTodoList(java.net.URL url, boolean addMembers)
          Reads a todo list from the file named in url. addMembers is not currently used but included for concistency towards reading XML files in ArgoUML.
 void setURL(java.net.URL url)
          Sets the _url instance variable.
 
Methods inherited from class org.argouml.xml.SAXParserBase
characters, endElement, getJarResource, getParseTime, getStats, ignoreElement, notImplemented, parse, parse, resolveEntity, setDebug, setStats, startElement
 

Field Detail

cat

protected static org.apache.log4j.Category cat

SINGLETON

public static TodoParser SINGLETON
The SINGLETON object of this class.

_headline

protected java.lang.String _headline
The headline of the ToDoItem currently being read.

_priority

protected int _priority
The priority of the ToDoItem currently being read.

_moreinfourl

protected java.lang.String _moreinfourl
The moreInfoURL of the ToDoItem currently being read.

_description

protected java.lang.String _description
The description of the ToDoItem currently being read.

_critic

protected java.lang.String _critic
The critic String of the ResolvedCritic currently being read.

_offenders

protected java.util.Vector _offenders
The offenders vector of the ResolvedCritic currently being read.
Constructor Detail

TodoParser

protected TodoParser()
Creates a new TodoParser.
Method Detail

readTodoList

public void readTodoList(java.net.URL url)
Reads a todo list from the file named in url.
Parameters:
url - The URL of the file to read from.

readTodoList

public void readTodoList(java.net.URL url,
                         boolean addMembers)
Reads a todo list from the file named in url. addMembers is not currently used but included for concistency towards reading XML files in ArgoUML.
Parameters:
url - The URL of the file to read from.
addMembers - Ignored.

setURL

public void setURL(java.net.URL url)
Sets the _url instance variable. This is mainly used for providing fancy log messages when reading a todo list from an InputStream.
Parameters:
url - The name of the file the we're eledgedly reading from.

readTodoList

public void readTodoList(java.io.InputStream is,
                         boolean addMembers)
Reads an XML todo list from InputStream is and enters any todo items into the current designer.
Parameters:
is - The stream containing TodoList XML data.
addMembers - Ignored.
See Also:
setURL(java.net.URL)

handleStartElement

public void handleStartElement(XMLElement e)
Called by the XML implementation to signal the start of an XML entity.
Overrides:
handleStartElement in class SAXParserBase
Parameters:
e - The entity being started.

handleEndElement

public void handleEndElement(XMLElement e)
Called by the XML implementation to signal the end of an XML entity.
Overrides:
handleEndElement in class SAXParserBase
Parameters:
e - The XML entity that ends.

handleTodo

protected void handleTodo(XMLElement e)
Internal method.

handleTodoList

protected void handleTodoList(XMLElement e)
Internal method.

handleResolvedCritics

protected void handleResolvedCritics(XMLElement e)
Internal method.

handleTodoItemStart

protected void handleTodoItemStart(XMLElement e)
Internal method.

handleTodoItemEnd

protected void handleTodoItemEnd(XMLElement e)
Internal method.

handleHeadline

protected void handleHeadline(XMLElement e)
Internal method.

handlePriority

protected void handlePriority(XMLElement e)
Internal method.

handleMoreInfoURL

protected void handleMoreInfoURL(XMLElement e)
Internal method.

handleDescription

protected void handleDescription(XMLElement e)
Internal method.

handleIssueStart

protected void handleIssueStart(XMLElement e)
Internal method.

handleIssueEnd

protected void handleIssueEnd(XMLElement e)
Internal method.

handlePoster

protected void handlePoster(XMLElement e)
Internal method.

handleOffender

protected void handleOffender(XMLElement e)
Internal method.

decode

public static java.lang.String decode(java.lang.String str)
Utility method to decode a String filtering out any noice that an XML framework might have seen fit to add and thus regaining the original unmodified String.
Parameters:
str - The String to decode.
Returns:
A copy of the original String.

encode

public static java.lang.String encode(java.lang.String str)
Utility method to encode a String in a way that allows it to be saved properly in an XML file and regained filtering out any noice that an XML framework might have seen fit to add.
Parameters:
str - The String to encode.
Returns:
The encoded String.


ArgoUML (c) 1996-2002
ArgoUML Project Home
ArgoUML Cookbook