org.argouml.xml.pgml
Class PGMLParser

org.argouml.xml.pgml.PGMLParser

public class PGMLParser


Inner Class Summary
protected  class PGMLParser.NameVal
          Utility class to pair a name and a value String together.
 
Field Summary
protected  org.tigris.gef.presentation.FigNode _previousNode
           
protected  java.lang.StringBuffer _privateText
           
protected  int _privateTextDepth
           
protected  java.util.HashMap _translateUciToOrg
           
protected static org.apache.log4j.Category 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()
           
 org.tigris.gef.base.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)
           
 

Field Detail

cat

protected static org.apache.log4j.Category cat

_privateTextDepth

protected int _privateTextDepth

_privateText

protected java.lang.StringBuffer _privateText

SINGLETON

public static PGMLParser SINGLETON

_translateUciToOrg

protected java.util.HashMap _translateUciToOrg

_previousNode

protected org.tigris.gef.presentation.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 org.tigris.gef.base.Diagram readDiagram(java.io.InputStream is,
                                               boolean closeStream)

endElement

public void endElement(java.lang.String arg0)
See Also:
org.xml.sax.DocumentHandler#endElement(java.lang.String)


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