de.ukn.hci.squidy.designer.model
Class ModelViewHandler

java.lang.Object
  extended by de.ukn.hci.squidy.designer.model.ModelViewHandler

public class ModelViewHandler
extends Object

ModelViewHandler.

 Date: Feb 21, 2009
 Time: 11:34:09 PM
 

Since:
1.0.0
Version:
$Id: ModelViewHandler.java 75 2009-11-14 00:11:38Z raedle $
Author:
Roman R&aumldle
Roman.Raedle@uni-konstanz.de
Human-Computer Interaction Group
University of Konstanz

Constructor Summary
protected ModelViewHandler()
          Use singleton pattern.
 
Method Summary
protected  javax.xml.bind.JAXBContext getContext()
          Initializes the JAXB context with all required classes.
static ModelViewHandler getModelViewHandler()
          Singleton pattern.
 Data load(InputStream inputStream)
          Parses a given input stream (should contain model and diagram code as xml structure) and returns it as an object structure.
static void resetJAXBContext(Class<?> type)
           
 void save(OutputStream outputStream, Data data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelViewHandler

protected ModelViewHandler()
Use singleton pattern.

Method Detail

getModelViewHandler

public static ModelViewHandler getModelViewHandler()
Singleton pattern.

Returns:
Single instance of diagram model parser.

getContext

protected javax.xml.bind.JAXBContext getContext()
                                         throws javax.xml.bind.JAXBException
Initializes the JAXB context with all required classes.

Returns:
The initialized JAXB context.
Throws:
javax.xml.bind.JAXBException - The exception will be thrown if initialization of the JAXB context has been failed.

resetJAXBContext

public static void resetJAXBContext(Class<?> type)

load

public Data load(InputStream inputStream)
          throws SquidyException
Parses a given input stream (should contain model and diagram code as xml structure) and returns it as an object structure.

Parameters:
inputStream - The input stream should contain model and diagram structure.
Returns:
The parsed XMI document containing model and diagram in object representation.
Throws:
SquidyException

save

public void save(OutputStream outputStream,
                 Data data)
Parameters:
outputStream -
xmi -


Copyright © 2007-2010 Human-Computer-Interaction :: University of Konstanz. All Rights Reserved.