org.jupe.editors.classdiagram.model.serializer
Class ClassDiagramSerializer

java.lang.Object
  extended by org.jupe.editors.classdiagram.model.serializer.ClassDiagramSerializer

public class ClassDiagramSerializer
extends java.lang.Object

Utility class that provides static methods to convert ClassDiagrams to XML and vice-versa.

Author:
jourdan

Constructor Summary
ClassDiagramSerializer(JupeProject jupeProject)
           
 
Method Summary
 java.lang.String convertDiagramToXML(ClassDiagram diagram)
          Converts a ClassDiagram to XML.
 ClassDiagram convertXMLtoDiagram(java.lang.String xml)
          Converts an XML string to a ClassDiagram object The XML representation of the ClassDiagram must be in coherence with the current workspace - every element that is referenced in it must exist in the UML2 model with the same key.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassDiagramSerializer

public ClassDiagramSerializer(JupeProject jupeProject)
Method Detail

convertDiagramToXML

public java.lang.String convertDiagramToXML(ClassDiagram diagram)
Converts a ClassDiagram to XML.

Parameters:
diagram - ClassDiagram to be converted
Returns:
The XML version of the class diagram.

convertXMLtoDiagram

public ClassDiagram convertXMLtoDiagram(java.lang.String xml)
Converts an XML string to a ClassDiagram object The XML representation of the ClassDiagram must be in coherence with the current workspace - every element that is referenced in it must exist in the UML2 model with the same key.

Parameters:
xml - String containing the XML representation of the diagram.
Returns:
The newly created ClassDiagram object.