Package org.eclipse.m2m.atl.emftvm.ant
Class LoadModelTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- org.eclipse.m2m.atl.emftvm.ant.EMFTVMTask
-
- org.eclipse.m2m.atl.emftvm.ant.LoadModelTask
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
LoadMetamodelTask,NewModelTask
public class LoadModelTask extends EMFTVMTask
Loads aModel.
-
-
Field Summary
-
Fields inherited from class org.eclipse.m2m.atl.emftvm.ant.EMFTVMTask
RESOURCE_SET
-
-
Constructor Summary
Constructors Constructor Description LoadModelTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ModelcreateModel(org.eclipse.emf.ecore.resource.Resource resource)Creates a newModelinstance for the givenResource.java.lang.StringgetName()Returns the model name.java.lang.StringgetUri()Returns the model URI.java.lang.StringgetWspath()Returns the model workspace path.protected voidinnerExecute()Performs the actual execution.protected voidloadFromNsuri(java.lang.String uri)Loads model fromprotected voidloadFromURI(org.eclipse.emf.common.util.URI uri)Loads model fromprotected voidloadFromWspath(java.lang.String wspath)Loads model fromvoidsetName(java.lang.String name)Sets the model name.voidsetUri(java.lang.String uri)Sets the model URI.voidsetWspath(java.lang.String wspath)Sets the model workspace path.-
Methods inherited from class org.eclipse.m2m.atl.emftvm.ant.EMFTVMTask
execute, getMetamodel, getModel, getResourceSet, setModel
-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Method Detail
-
setName
public void setName(java.lang.String name)
Sets the model name.- Parameters:
name- the name to set
-
getName
public java.lang.String getName()
Returns the model name.- Returns:
- the name
-
setWspath
public void setWspath(java.lang.String wspath)
Sets the model workspace path.- Parameters:
wspath- the wspath to set
-
getWspath
public java.lang.String getWspath()
Returns the model workspace path.- Returns:
- the wspath
-
setUri
public void setUri(java.lang.String uri)
Sets the model URI.- Parameters:
uri- the uri to set
-
getUri
public java.lang.String getUri()
Returns the model URI.- Returns:
- the uri
-
innerExecute
protected void innerExecute() throws java.lang.ExceptionPerforms the actual execution.- Specified by:
innerExecutein classEMFTVMTask- Throws:
java.lang.Exception
-
createModel
protected Model createModel(org.eclipse.emf.ecore.resource.Resource resource)
Creates a newModelinstance for the givenResource.- Parameters:
resource- theResource- Returns:
- a new
Model.
-
loadFromNsuri
protected void loadFromNsuri(java.lang.String uri)
Loads model fromnsuri
.- Parameters:
uri- the namespace URI
-
loadFromWspath
protected void loadFromWspath(java.lang.String wspath)
Loads model fromwspath
.- Parameters:
wspath- the workspace path
-
loadFromURI
protected void loadFromURI(org.eclipse.emf.common.util.URI uri)
Loads model fromuri
.- Parameters:
uri- the EMF URI
-
-