cwi.GraphXML.debug
Class DebugGraphSemantics

java.lang.Object
  extended bycwi.GraphXML.debug.DebugGraphSemantics
All Implemented Interfaces:
GraphSemantics

public class DebugGraphSemantics
extends java.lang.Object
implements GraphSemantics

Debug implementation of the GraphSemantics interface. All methods simply print information about their arguments.

Author:
Ivan Herman

Constructor Summary
DebugGraphSemantics()
           
 
Method Summary
 void closeEditBundle()
          Close edit bundle.
 void closeGraph()
          Close current graph
 void closeGraphXML()
          Close GraphXML.
 void closeRemoveBlock()
          Close remove block
 void closeReplaceBlock()
          Close replace block
 void handlePI(java.lang.String target, java.util.HashMap props)
          Handle a processing instruction.
 void initGraphXML(ApplicationData applData, Extensions ext, ParserError parserError)
          Init GraphXML.
 void newEdge(java.lang.String name, java.lang.String source, java.lang.String target)
          New edge with no additional information.
 void newEdge(java.lang.String name, java.lang.String source, java.lang.String target, Reference sourceReference, Reference targetReference)
          New edge with no additional information.
 void newEdge(java.lang.String name, java.lang.String xml_class, java.lang.String source, java.lang.String target, ApplicationData applData, Extensions ext, VisualProperties vis_props, AttributeProperties attrs, Path path)
          New edge in a graph definition.
 void newEdge(java.lang.String name, java.lang.String xml_class, java.lang.String source, java.lang.String target, Reference sourceReference, Reference targetReference, ApplicationData applData, Extensions ext, VisualProperties vis_props, AttributeProperties attrs, Path path)
          New edge in a graph definition.
 void newEditBundle()
          New edit bundle starts.
 void newGraph(java.lang.String id, AttributeProperties attrs, ApplicationData applData, Extensions ext, Style style, Picture icon, Size size)
          New graph.
 void newNode(java.lang.String name)
          New node with no additional information.
 void newNode(java.lang.String name, java.lang.String xml_class, boolean metanode, Reference reference, ApplicationData applData, Extensions ext, VisualProperties vis_props, AttributeProperties attrs, Style subgraphStyle, Position position, Size size, Transform transform)
          New node in a graph definition.
 void newRemoveBlock(java.lang.String id, Reference reference, AttributeProperties attrs)
          New remove block starts
 void newReplaceBlock(java.lang.String id, Reference reference, AttributeProperties attrs)
          New replace block starts
 void removeEdge(java.lang.String name, java.lang.String source, java.lang.String target)
          Remove an edge
 void removeEdgeComponent(java.lang.String name, java.lang.String source, java.lang.String target, ApplicationData applData, Extensions ext, VisualProperties vis_props, AttributeProperties attrs, Path path)
          Remove edge components
 void removeNode(java.lang.String name)
          Remove a Node
 void removeNodeComponent(java.lang.String name, ApplicationData applData, Extensions ext, VisualProperties vis_props, AttributeProperties attrs, Style subgraphStyle, Position position, Size size, Transform transform)
          Remove components of a node.
 void replaceEdge(java.lang.String name, java.lang.String xml_class, java.lang.String source, java.lang.String target)
          Replace an edge
 void replaceEdgeComponent(java.lang.String name, java.lang.String xml_class, java.lang.String source, java.lang.String target, ApplicationData applData, Extensions ext, VisualProperties vis_props, AttributeProperties attrs, Path path)
          Replace edge components
 void replaceNode(java.lang.String name, java.lang.String xml_class, boolean metanode, Reference reference)
          Replace a Node
 void replaceNodeComponent(java.lang.String name, java.lang.String xml_class, boolean metanode, Reference reference, ApplicationData applData, Extensions ext, VisualProperties vis_props, AttributeProperties attrs, Style subgraphStyle, Position position, Size size, Transform transform)
          Replace components of a node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugGraphSemantics

public DebugGraphSemantics()
Method Detail

handlePI

public void handlePI(java.lang.String target,
                     java.util.HashMap props)
Handle a processing instruction.

Specified by:
handlePI in interface GraphSemantics
Parameters:
target - the target of the pi, ie the string appearing after "props - the key-value pairs appearing in the processing instruction

initGraphXML

public void initGraphXML(ApplicationData applData,
                         Extensions ext,
                         ParserError parserError)
Init GraphXML. This routine is called before any other element is interpreted, is used to initialize the full parsing.

Specified by:
initGraphXML in interface GraphSemantics
Parameters:
applData - the application element data which may be associated with the full GraphXML file
ext - user defined extensions to the GraphXML structure
parserError - the parser in charge; used to generate error messages.

closeGraphXML

public void closeGraphXML()
Close GraphXML. Invoked when all other elements have already been set.

Specified by:
closeGraphXML in interface GraphSemantics

newGraph

public void newGraph(java.lang.String id,
                     AttributeProperties attrs,
                     ApplicationData applData,
                     Extensions ext,
                     Style style,
                     Picture icon,
                     Size size)
New graph.

The visual style appearing in the call is "reconciled" with the file-level style, ie, a input argument value is the (semantic) merge of the file level and graph level style.

Specified by:
newGraph in interface GraphSemantics
Parameters:
id - graph ID
attrs - all the attributes of the graph
applData - application data (label, data, data references)
ext - possible extensions
style - visual style
icon - icon image
size - size information

closeGraph

public void closeGraph()
Close current graph

Specified by:
closeGraph in interface GraphSemantics

newNode

public void newNode(java.lang.String name,
                    java.lang.String xml_class,
                    boolean metanode,
                    Reference reference,
                    ApplicationData applData,
                    Extensions ext,
                    VisualProperties vis_props,
                    AttributeProperties attrs,
                    Style subgraphStyle,
                    Position position,
                    Size size,
                    Transform transform)
New node in a graph definition.

Specified by:
newNode in interface GraphSemantics
Parameters:
name - Name of the node
xml_class - Class of the node
metanode - whether this is a metanode
reference - reference data for a metanode
ext - possible extensions
vis_props - Visual Properties
attrs - additional attributes
position - Position of the node
size - Node size
transform - Tranformation matrix for a metanode

newNode

public void newNode(java.lang.String name)
New node with no additional information. This is a shorthand which may optimize some operations.

Specified by:
newNode in interface GraphSemantics
Parameters:
name - Name of the node

newEdge

public void newEdge(java.lang.String name,
                    java.lang.String xml_class,
                    java.lang.String source,
                    java.lang.String target,
                    Reference sourceReference,
                    Reference targetReference,
                    ApplicationData applData,
                    Extensions ext,
                    VisualProperties vis_props,
                    AttributeProperties attrs,
                    Path path)
New edge in a graph definition.

Specified by:
newEdge in interface GraphSemantics
Parameters:
name - name of the edge
xml_class - class of the edge
source - source node of the edge
target - target node of the edge
sourceReference - Cross-reference to source of the edge
targetReference - Cross-reference to target of the edge
ext - possible extensions
vis_props - Visual Properties
attrs - additional properties
path - geometric path

newEdge

public void newEdge(java.lang.String name,
                    java.lang.String xml_class,
                    java.lang.String source,
                    java.lang.String target,
                    ApplicationData applData,
                    Extensions ext,
                    VisualProperties vis_props,
                    AttributeProperties attrs,
                    Path path)
New edge in a graph definition.

Specified by:
newEdge in interface GraphSemantics
Parameters:
name - name of the edge
xml_class - class of the edge
source - source node of the edge
target - target node of the edge
ext - possible extensions
vis_props - Visual Properties
attrs - additional properties
path - geometric path

newEdge

public void newEdge(java.lang.String name,
                    java.lang.String source,
                    java.lang.String target,
                    Reference sourceReference,
                    Reference targetReference)
New edge with no additional information. This is a shorthand which may optimize some operations.

Specified by:
newEdge in interface GraphSemantics
Parameters:
name - Name of the node
source - Source of the edge
target - Target of the edge
sourceReference - Cross-reference to source of the edge
targetReference - Cross-reference to target of the edge

newEdge

public void newEdge(java.lang.String name,
                    java.lang.String source,
                    java.lang.String target)
New edge with no additional information. This is a shorthand which may optimize some operations.

Specified by:
newEdge in interface GraphSemantics
Parameters:
name - Name of the node
source - Source of the edge
target - Target of the edge

newRemoveBlock

public void newRemoveBlock(java.lang.String id,
                           Reference reference,
                           AttributeProperties attrs)
New remove block starts

Specified by:
newRemoveBlock in interface GraphSemantics
Parameters:
id - Id of the edit block
reference - reference data for the graph to be edited
attrs - additional attributes

newReplaceBlock

public void newReplaceBlock(java.lang.String id,
                            Reference reference,
                            AttributeProperties attrs)
New replace block starts

Specified by:
newReplaceBlock in interface GraphSemantics
Parameters:
id - Id of the edit block
reference - reference data for the graph to be edited
attrs - additional attributes

closeRemoveBlock

public void closeRemoveBlock()
Close remove block

Specified by:
closeRemoveBlock in interface GraphSemantics

closeReplaceBlock

public void closeReplaceBlock()
Close replace block

Specified by:
closeReplaceBlock in interface GraphSemantics

newEditBundle

public void newEditBundle()
New edit bundle starts.

Specified by:
newEditBundle in interface GraphSemantics

closeEditBundle

public void closeEditBundle()
Close edit bundle.

Specified by:
closeEditBundle in interface GraphSemantics

removeNode

public void removeNode(java.lang.String name)
Remove a Node

Specified by:
removeNode in interface GraphSemantics
Parameters:
name - Node name

replaceNode

public void replaceNode(java.lang.String name,
                        java.lang.String xml_class,
                        boolean metanode,
                        Reference reference)
Replace a Node

Specified by:
replaceNode in interface GraphSemantics
Parameters:
name - name of the node
xml_class - class of the node
metanode - whether this is a metanode
reference - reference data for a metanode

removeNodeComponent

public void removeNodeComponent(java.lang.String name,
                                ApplicationData applData,
                                Extensions ext,
                                VisualProperties vis_props,
                                AttributeProperties attrs,
                                Style subgraphStyle,
                                Position position,
                                Size size,
                                Transform transform)
Remove components of a node. Only the non-null components should be removed.

Specified by:
removeNodeComponent in interface GraphSemantics
Parameters:
name - Name of the node
ext - possible extensions
vis_props - Visual Properties
attrs - additional attributes
position - Position of the node
size - Node size
transform - Tranformation matrix for a metanode

replaceNodeComponent

public void replaceNodeComponent(java.lang.String name,
                                 java.lang.String xml_class,
                                 boolean metanode,
                                 Reference reference,
                                 ApplicationData applData,
                                 Extensions ext,
                                 VisualProperties vis_props,
                                 AttributeProperties attrs,
                                 Style subgraphStyle,
                                 Position position,
                                 Size size,
                                 Transform transform)
Replace components of a node. Only the non-null components should be replaced.

Specified by:
replaceNodeComponent in interface GraphSemantics
Parameters:
name - Name of the node
xml_class - Class of the node
metanode - whether this is a metanode
reference - reference data for a metanode
ext - possible extensions
vis_props - Visual Properties
attrs - additional properties
position - Position of the node
size - Node size
transform - Tranformation matrix for a metanode

removeEdge

public void removeEdge(java.lang.String name,
                       java.lang.String source,
                       java.lang.String target)
Remove an edge

Specified by:
removeEdge in interface GraphSemantics
Parameters:
name - Name of the edge
source - source node of the edge
target - target node of the edge

replaceEdge

public void replaceEdge(java.lang.String name,
                        java.lang.String xml_class,
                        java.lang.String source,
                        java.lang.String target)
Replace an edge

Specified by:
replaceEdge in interface GraphSemantics
Parameters:
name - name of the edge
source - source node of the edge
target - target node of the edge

removeEdgeComponent

public void removeEdgeComponent(java.lang.String name,
                                java.lang.String source,
                                java.lang.String target,
                                ApplicationData applData,
                                Extensions ext,
                                VisualProperties vis_props,
                                AttributeProperties attrs,
                                Path path)
Remove edge components

Specified by:
removeEdgeComponent in interface GraphSemantics
Parameters:
name - Name of the edge
source - source node of the edge
target - target node of the edge
ext - possible extensions
vis_props - Visual Properties
attrs - additional attributes
path - geometric path

replaceEdgeComponent

public void replaceEdgeComponent(java.lang.String name,
                                 java.lang.String xml_class,
                                 java.lang.String source,
                                 java.lang.String target,
                                 ApplicationData applData,
                                 Extensions ext,
                                 VisualProperties vis_props,
                                 AttributeProperties attrs,
                                 Path path)
Replace edge components

Specified by:
replaceEdgeComponent in interface GraphSemantics
Parameters:
name - name of the edge
xml_class - class of the edge
source - source node of the edge
target - target node of the edge
ext - possible extensions
vis_props - Visual Properties
attrs - additional attributes
path - geometric path