be.ac.vub.cocompose.io
Interface ModelReader

All Known Implementing Classes:
XMIModelReader

public interface ModelReader

Generic model reading interface for reading a model from its URI.

Since:
0.1.0
Version:
0.2.10, 07/05/2004
Author:
Dennis Wagelaar

Method Summary
 Model read(InputStream input, String uri, ModelFactory factory)
          Reads the model from its uri.
 Model read(String uri, ModelFactory factory)
          Reads the model from its uri.
 

Method Detail

read

public Model read(String uri,
                  ModelFactory factory)
           throws IOException,
                  ModelElementException
Reads the model from its uri.

Parameters:
uri - the uri to read from.
factory - the model factory used to create the elements.
Returns:
the model
Throws:
IOException - if the model could not be read.
ModelElementException - if a model element could not be read.

read

public Model read(InputStream input,
                  String uri,
                  ModelFactory factory)
           throws IOException,
                  ModelElementException
Reads the model from its uri.

Parameters:
input - the stream to read from.
uri - the uri of the model.
factory - the model factory used to create the elements.
Returns:
the model
Throws:
IOException - if the model could not be read.
ModelElementException - if a model element could not be read.