org.argouml.xml.pgml
Class PGMLParser

java.lang.Object
  |
  +--org.tigris.gef.xml.pgml.PGMLParser
        |
        +--org.argouml.xml.pgml.PGMLParser

public class PGMLParser
extends org.tigris.gef.xml.pgml.PGMLParser

See Also:
Serialized Form

Nested Class Summary
protected  class PGMLParser.NameVal
          Utility class to pair a name and a value String together.
 
Field Summary
private  java.lang.String[] _entityPaths
           
protected  FigNode _previousNode
           
protected  java.lang.StringBuffer _privateText
           
protected  int _privateTextDepth
           
protected  java.util.HashMap _translateUciToOrg
           
protected static Logger cat
           
static PGMLParser SINGLETON
           
 
Constructor Summary
protected PGMLParser()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Called by the PGML framework when there are characters inside an XML entity.
 void endElement(java.lang.String arg0)
           
protected  java.lang.String[] getEntityPaths()
           
 Diagram readDiagram(java.io.InputStream is, boolean closeStream)
           
protected  void setElementItemUID(java.lang.String id)
          Sets the ItemUID value of the current element in the file.
protected  PGMLParser.NameVal splitNameVal(java.lang.String str)
          Splits a name value pair into a NameVal instance.
 void startElement(java.lang.String elementName, org.xml.sax.AttributeList attrList)
          Called by the XML framework when an entity starts.
protected  java.lang.String translateClassName(java.lang.String oldName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cat

protected static Logger cat

_privateTextDepth

protected int _privateTextDepth

_privateText

protected java.lang.StringBuffer _privateText

SINGLETON

public static PGMLParser SINGLETON

_translateUciToOrg

protected java.util.HashMap _translateUciToOrg

_entityPaths

private java.lang.String[] _entityPaths

_previousNode

protected FigNode _previousNode
Constructor Detail

PGMLParser

protected PGMLParser()
Method Detail

translateClassName

protected java.lang.String translateClassName(java.lang.String oldName)

getEntityPaths

protected java.lang.String[] getEntityPaths()

startElement

public void startElement(java.lang.String elementName,
                         org.xml.sax.AttributeList attrList)
Called by the XML framework when an entity starts.


characters

public void characters(char[] ch,
                       int start,
                       int length)
Called by the PGML framework when there are characters inside an XML entity. We need to save them if it would turn out to be a private entity.


setElementItemUID

protected void setElementItemUID(java.lang.String id)
Sets the ItemUID value of the current element in the file.


splitNameVal

protected PGMLParser.NameVal splitNameVal(java.lang.String str)
Splits a name value pair into a NameVal instance. A name value pair is a String on the form .

Parameters:
str - A String with a name value pair.
Returns:
A NameVal, or null if they could not be split.

readDiagram

public Diagram readDiagram(java.io.InputStream is,
                           boolean closeStream)

endElement

public void endElement(java.lang.String arg0)
See Also:
DocumentHandler.endElement(java.lang.String)


ArgoUML © 1996-2004 (20040306)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook