|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kiml.service.formats.AbstractEmfHandler<T>
T
- type of EMF objectpublic abstract class AbstractEmfHandler<T extends EObject>
An abstract superclass for EMF-based transformers.
Constructor Summary | |
---|---|
AbstractEmfHandler()
|
Method Summary | |
---|---|
protected abstract ResourceSet |
createResourceSet()
Create an appropriate resource set for the supported type of graphs. |
void |
deserialize(String serializedGraph,
TransformationData<T,KNode> transData)
Create a graph instance from serial representation. |
protected T |
deserializeBinary(InputStream source,
Map<Object,Object> options)
Deserialize an EMF model. |
protected String |
getFileExtension()
Returns the file extension of this handler. |
String |
serialize(T graph)
Serialize the given graph instance in the format supported by this transformer. |
protected void |
serializeBinary(T graph,
OutputStream target,
Map<Object,Object> options)
Serialize a given EMF model to the given output stream. |
void |
setFileExtension(String ext)
Set the file extension for this handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.cau.cs.kieler.kiml.service.formats.ITransformationHandler |
---|
getExporter, getImporter |
Constructor Detail |
---|
public AbstractEmfHandler()
Method Detail |
---|
public void deserialize(String serializedGraph, TransformationData<T,KNode> transData)
deserialize
in interface ITransformationHandler<T extends EObject>
serializedGraph
- the serialized graphtransData
- transformation data for graph importpublic String serialize(T graph)
serialize
in interface ITransformationHandler<T extends EObject>
graph
- the graph instance
public final void setFileExtension(String ext)
ext
- a file extensionprotected String getFileExtension()
protected final T deserializeBinary(InputStream source, Map<Object,Object> options) throws IOException
source
- the stream to parseoptions
- optional map of settings. Can be null
IOException
- when an exception occurs while parsing the modelprotected final void serializeBinary(T graph, OutputStream target, Map<Object,Object> options) throws IOException
graph
- the model to be serializedtarget
- the output stream to write tooptions
- optional map of settings. Can be null
IOException
- when an exception occurs while writing the modelprotected abstract ResourceSet createResourceSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |