org.tigris.gef.xml.pgml
Class PGMLParser
java.lang.Object
org.xml.sax.HandlerBase
org.tigris.gef.xml.pgml.PGMLParser
- All Implemented Interfaces:
- org.xml.sax.DocumentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- public class PGMLParser
- extends org.xml.sax.HandlerBase
Method Summary |
void |
annotationStateStartElement(java.lang.String tagName,
org.xml.sax.AttributeList attrList)
|
void |
characters(char[] ch,
int start,
int length)
|
protected java.awt.Color |
colorByName(java.lang.String name,
java.awt.Color defaultColor)
|
void |
endElement(java.lang.String elementName)
|
protected org.tigris.gef.presentation.Fig |
findFig(java.lang.String uri)
|
protected java.lang.Object |
findOwner(java.lang.String uri)
|
protected java.lang.String[] |
getEntityPaths()
|
protected GraphModel |
getGraphModelFor(java.lang.String desc)
|
java.lang.String |
getSystemId()
|
protected org.tigris.gef.presentation.FigCircle |
handleEllipse(org.xml.sax.AttributeList attrList)
|
protected org.tigris.gef.presentation.Fig |
handleGroup(org.xml.sax.AttributeList attrList)
|
protected org.tigris.gef.presentation.FigLine |
handleLine(org.xml.sax.AttributeList attrList)
|
protected org.tigris.gef.presentation.FigPoly |
handlePath(org.xml.sax.AttributeList attrList)
|
protected void |
handlePGML(org.xml.sax.AttributeList attrList)
|
protected org.tigris.gef.presentation.Fig |
handlePolyLine(org.xml.sax.AttributeList attrList)
|
protected org.tigris.gef.presentation.FigRect |
handleRect(org.xml.sax.AttributeList attrList)
|
protected org.tigris.gef.presentation.FigText |
handleText(org.xml.sax.AttributeList attrList)
|
protected void |
initDiagram(java.lang.String diagDescr)
|
protected void |
lineStateStartElement(java.lang.String tagName,
org.xml.sax.AttributeList attrList)
|
Diagram |
readDiagram(java.io.InputStream is)
|
Diagram |
readDiagram(java.io.InputStream is,
boolean closeStream)
|
Diagram |
readDiagram(java.net.URL url)
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
|
protected void |
rollbackAdd(org.tigris.gef.presentation.Fig currentFig)
|
protected void |
setAttrs(org.tigris.gef.presentation.Fig f,
org.xml.sax.AttributeList attrList)
|
protected void |
setDetectedFailure(boolean newValue)
|
protected void |
setOwnerAttr(org.tigris.gef.presentation.Fig f,
org.xml.sax.AttributeList attrList)
|
void |
setOwnerRegistry(java.util.Map owners)
|
void |
setSystemId(java.lang.String id)
|
void |
startElement(java.lang.String elementName,
org.xml.sax.AttributeList attrList)
|
protected java.lang.String |
translateClassName(java.lang.String oldName)
|
Methods inherited from class org.xml.sax.HandlerBase |
endDocument, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, startDocument, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SINGLETON
public static PGMLParser SINGLETON
_diagram
protected Diagram _diagram
_nestedGroups
protected int _nestedGroups
_figRegistry
protected java.util.HashMap _figRegistry
_ownerRegistry
protected java.util.Map _ownerRegistry
_detectedFailure
protected boolean _detectedFailure
systemId
protected java.lang.String systemId
_elementState
protected int _elementState
DEFAULT_STATE
protected static final int DEFAULT_STATE
- See Also:
- Constant Field Values
TEXT_STATE
protected static final int TEXT_STATE
- See Also:
- Constant Field Values
LINE_STATE
protected static final int LINE_STATE
- See Also:
- Constant Field Values
POLY_STATE
protected static final int POLY_STATE
- See Also:
- Constant Field Values
NODE_STATE
protected static final int NODE_STATE
- See Also:
- Constant Field Values
EDGE_STATE
protected static final int EDGE_STATE
- See Also:
- Constant Field Values
PRIVATE_STATE
protected static final int PRIVATE_STATE
- See Also:
- Constant Field Values
ANNOTATION_STATE
protected static final int ANNOTATION_STATE
- See Also:
- Constant Field Values
PRIVATE_NODE_STATE
protected static final int PRIVATE_NODE_STATE
- See Also:
- Constant Field Values
PRIVATE_EDGE_STATE
protected static final int PRIVATE_EDGE_STATE
- See Also:
- Constant Field Values
ANNOTATION_EDGE_STATE
protected static final int ANNOTATION_EDGE_STATE
- See Also:
- Constant Field Values
TEXT_NODE_STATE
protected static final int TEXT_NODE_STATE
- See Also:
- Constant Field Values
TEXT_EDGE_STATE
protected static final int TEXT_EDGE_STATE
- See Also:
- Constant Field Values
TEXT_ANNOTATION_STATE
protected static final int TEXT_ANNOTATION_STATE
- See Also:
- Constant Field Values
POLY_EDGE_STATE
protected static final int POLY_EDGE_STATE
- See Also:
- Constant Field Values
POLY_NODE_STATE
protected static final int POLY_NODE_STATE
- See Also:
- Constant Field Values
DEFAULT_NODE_STATE
protected static final int DEFAULT_NODE_STATE
- See Also:
- Constant Field Values
DEFAULT_EDGE_STATE
protected static final int DEFAULT_EDGE_STATE
- See Also:
- Constant Field Values
_textBuf
protected java.lang.StringBuffer _textBuf
_currentNode
protected org.tigris.gef.presentation.FigNode _currentNode
_currentEdge
protected org.tigris.gef.presentation.FigEdge _currentEdge
PGMLParser
protected PGMLParser()
readDiagram
public Diagram readDiagram(java.net.URL url)
readDiagram
public Diagram readDiagram(java.io.InputStream is)
readDiagram
public Diagram readDiagram(java.io.InputStream is,
boolean closeStream)
setOwnerRegistry
public void setOwnerRegistry(java.util.Map owners)
initDiagram
protected void initDiagram(java.lang.String diagDescr)
startElement
public void startElement(java.lang.String elementName,
org.xml.sax.AttributeList attrList)
endElement
public void endElement(java.lang.String elementName)
characters
public void characters(char[] ch,
int start,
int length)
handlePGML
protected void handlePGML(org.xml.sax.AttributeList attrList)
handlePolyLine
protected org.tigris.gef.presentation.Fig handlePolyLine(org.xml.sax.AttributeList attrList)
handleLine
protected org.tigris.gef.presentation.FigLine handleLine(org.xml.sax.AttributeList attrList)
lineStateStartElement
protected void lineStateStartElement(java.lang.String tagName,
org.xml.sax.AttributeList attrList)
handleEllipse
protected org.tigris.gef.presentation.FigCircle handleEllipse(org.xml.sax.AttributeList attrList)
handleRect
protected org.tigris.gef.presentation.FigRect handleRect(org.xml.sax.AttributeList attrList)
handleText
protected org.tigris.gef.presentation.FigText handleText(org.xml.sax.AttributeList attrList)
handlePath
protected org.tigris.gef.presentation.FigPoly handlePath(org.xml.sax.AttributeList attrList)
handleGroup
protected org.tigris.gef.presentation.Fig handleGroup(org.xml.sax.AttributeList attrList)
annotationStateStartElement
public void annotationStateStartElement(java.lang.String tagName,
org.xml.sax.AttributeList attrList)
setAttrs
protected void setAttrs(org.tigris.gef.presentation.Fig f,
org.xml.sax.AttributeList attrList)
setOwnerAttr
protected void setOwnerAttr(org.tigris.gef.presentation.Fig f,
org.xml.sax.AttributeList attrList)
findOwner
protected java.lang.Object findOwner(java.lang.String uri)
findFig
protected org.tigris.gef.presentation.Fig findFig(java.lang.String uri)
getGraphModelFor
protected GraphModel getGraphModelFor(java.lang.String desc)
colorByName
protected java.awt.Color colorByName(java.lang.String name,
java.awt.Color defaultColor)
translateClassName
protected java.lang.String translateClassName(java.lang.String oldName)
getEntityPaths
protected java.lang.String[] getEntityPaths()
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
setSystemId
public void setSystemId(java.lang.String id)
getSystemId
public java.lang.String getSystemId()
rollbackAdd
protected void rollbackAdd(org.tigris.gef.presentation.Fig currentFig)
setDetectedFailure
protected void setDetectedFailure(boolean newValue)