de.cau.cs.kieler.kiml.service.formats
Interface ITransformationHandler<T>

Type Parameters:
T - type of handled graphs
All Known Implementing Classes:
AbstractEmfHandler, DotHandler, KGraphHandler

public interface ITransformationHandler<T>

Interface for handlers of graph format transformations.

Rating red

Method Summary
 void deserialize(String serializedGraph, TransformationData<T,KNode> transData)
          Create a graph instance from serial representation.
 IGraphTransformer<KNode,T> getExporter()
          Return a graph transformer for exporting graphs from the KGraph format.
 IGraphTransformer<T,KNode> getImporter()
          Return a graph transformer for importing graphs into the KGraph format.
 String serialize(T graph)
          Serialize the given graph instance in the format supported by this transformer.
 

Method Detail

deserialize

void deserialize(String serializedGraph,
                 TransformationData<T,KNode> transData)
Create a graph instance from serial representation. The created object, which is stored as source graph in the given transformation data instance, may actually contain multiple graphs.

Parameters:
serializedGraph - the serialized graph
transData - transformation data for graph import

serialize

String serialize(T graph)
Serialize the given graph instance in the format supported by this transformer.

Parameters:
graph - the graph instance
Returns:
serialization of the given graph

getImporter

IGraphTransformer<T,KNode> getImporter()
Return a graph transformer for importing graphs into the KGraph format.

Returns:
a KGraph importer

getExporter

IGraphTransformer<KNode,T> getExporter()
Return a graph transformer for exporting graphs from the KGraph format.

Returns:
a KGraph exporter