vocleditor.model
Class VOCLModelManager

java.lang.Object
  extended by vocleditor.model.VOCLModelManager

public class VOCLModelManager
extends java.lang.Object

Drives the model. Acts as the model entry point.


Constructor Summary
VOCLModelManager()
           
 
Method Summary
 VOCLModel.VOCLDiagram createVOCLModel(org.eclipse.core.runtime.IPath path)
          Creates a new VOCLModel.
static VOCLModel.VOCLModelFactory getFactory()
          Returns the factory associated with the model.
 VOCLModel.VOCLDiagram getModel()
          Gets the top level VOCLmodel.
 org.eclipse.emf.ecore.resource.Resource getResource(org.eclipse.core.runtime.IPath path)
          Returns the resource containing the VOCLmodel.
 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)
          Saves the content of the model to the file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VOCLModelManager

public VOCLModelManager()
Method Detail

getResource

public org.eclipse.emf.ecore.resource.Resource getResource(org.eclipse.core.runtime.IPath path)
Returns the resource containing the VOCLmodel. Uses lazy initialization.

Parameters:
path - The path to the requested vocl file
Returns:
the requested resource

getFactory

public static VOCLModel.VOCLModelFactory getFactory()
Returns the factory associated with the model. Object creation are made through that factory.

Returns:
the associated factory

createVOCLModel

public VOCLModel.VOCLDiagram createVOCLModel(org.eclipse.core.runtime.IPath path)
Creates a new VOCLModel.

Parameters:
path - The path to the new file
Returns:
the new VOCLDiagram

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)
          throws java.io.IOException
Saves the content of the model to the file.

Parameters:
path -
Throws:
java.io.IOException

getModel

public VOCLModel.VOCLDiagram getModel()
Gets the top level VOCLmodel.

Returns:
the top VOCLDiagram