Bus

org.topcased.service.writeemfxmi
Class WriteModelManager

java.lang.Object
  extended by org.topcased.service.writeemfxmi.WriteModelManager

public class WriteModelManager
extends java.lang.Object

Drives the model. Acts as the model entry point.


Constructor Summary
WriteModelManager()
           
 
Method Summary
 EObject createModel(org.eclipse.core.runtime.IPath path)
          Creates a new model.
 AdapterFactory getAdapterFactory()
          Returns the Adapter factory for the current model
 EObject getModel()
          Gets the top level object.
 Resource getResource(org.eclipse.core.runtime.IPath path)
          Returns the resource containing the network.
 void load(org.eclipse.core.runtime.IPath path)
          Loads the content of the model from the file.
 void reload(org.eclipse.core.runtime.IPath path)
          reloads the content of the model from the file.
 void save(org.eclipse.core.runtime.IPath path, EObject diagrams)
          Saves the content of the model to the file.
 void saveAs(org.eclipse.core.runtime.IPath path, EObject theModel)
          Saves the content of the model to a new file.
 void setModel()
          Sets the model in the EMF resource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteModelManager

public WriteModelManager()
Method Detail

getResource

public Resource getResource(org.eclipse.core.runtime.IPath path)
Returns the resource containing the network. This uses lazy initialization.

Parameters:
path -
Returns:
the associated resource

createModel

public EObject createModel(org.eclipse.core.runtime.IPath path)
Creates a new model.

Parameters:
path - the model path
Returns:
the main object

load

public void load(org.eclipse.core.runtime.IPath path)
          throws java.io.IOException
Loads the content of the model from the file.

Parameters:
path -
Throws:
java.io.IOException

reload

public void reload(org.eclipse.core.runtime.IPath path)
            throws java.io.IOException
reloads the content of the model from the file.

Parameters:
path -
Throws:
java.io.IOException

save

public void save(org.eclipse.core.runtime.IPath path,
                 EObject diagrams)
          throws java.io.IOException
Saves the content of the model to the file.

Parameters:
path -
diagrams -
Throws:
java.io.IOException

saveAs

public void saveAs(org.eclipse.core.runtime.IPath path,
                   EObject theModel)
            throws java.io.IOException
Saves the content of the model to a new file.

Parameters:
path -
theModel - The model to save
Throws:
java.io.IOException

getModel

public EObject getModel()
Gets the top level object.

Returns:
the edited model

setModel

public void setModel()
Sets the model in the EMF resource


getAdapterFactory

public AdapterFactory getAdapterFactory()
Returns the Adapter factory for the current model

Returns:
the factory

Bus

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.