de.ukn.hci.squidy.manager.parser
Class ModelHandler

java.lang.Object
  extended by de.ukn.hci.squidy.manager.parser.ModelHandler

public class ModelHandler
extends Object

ModelHandler.

 Date: Feb 16, 2008
 Time: 11:09:44 PM
 

Version:
$Id: ModelHandler.java 30 2009-09-18 22:23:35Z nitsche $$
Author:
Roman Rädle, Roman.Raedle@uni-konstanz.de,, University of Konstanz

Constructor Summary
protected ModelHandler()
          Use singleton pattern.
 
Method Summary
protected  javax.xml.bind.JAXBContext getContext()
          Initializes the JAXB context with all required classes.
static ModelHandler getModelHandler()
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelHandler

protected ModelHandler()
Use singleton pattern.

Method Detail

getModelHandler

public static ModelHandler getModelHandler()
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.

load

public 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.

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


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