org.jomc.ant
Class WriteModelTask

Package class diagram package WriteModelTask
java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.jomc.ant.JomcTask
              extended by org.jomc.ant.JomcModelTask
                  extended by org.jomc.ant.WriteModelTask
All Implemented Interfaces:
Cloneable

public final class WriteModelTask
extends JomcModelTask

Task for writing model objects.

Version:
$JOMC: WriteModelTask.java 4174 2012-01-15 09:30:01Z schulte2005 $
Author:
Christian Schulte

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
WriteModelTask()
          Creates a new WriteModelTask instance.
 
Method Summary
 WriteModelTask clone()
          Creates and returns a copy of this object.
 void executeTask()
          Called by the execute method prior to the postExecuteTask method.
 String getImplementation()
          Gets the identifier of an implementation to write.
 Instance getInstance(Model model)
          Gets the instance to write from a given model.
 String getModelEncoding()
          Gets the encoding of the model resource.
 File getModelFile()
          Gets the file to write the model to.
 String getModule()
          Gets the identifier of a module to write.
 Module getModule(Model model)
          Gets the module to write from a given model.
 String getSpecification()
          Gets the identifier of a specification to write.
 Specification getSpecification(Model model)
          Gets the specification to write from a given model.
 void setImplementation(String value)
          Sets the identifier of an implementation to write.
 void setModelEncoding(String value)
          Sets the encoding of the model resource.
 void setModelFile(File value)
          Sets the file to write the model to.
 void setModule(String value)
          Sets the identifier of a module to write.
 void setSpecification(String value)
          Sets the identifier of a specification to write.
 
Methods inherited from class org.jomc.ant.JomcModelTask
createModuleResource, getModel, getModuleLocation, getModuleResources, getTransformerLocation, isModelObjectClasspathResolutionEnabled, isModelResourceValidationEnabled, newModelContext, preExecuteTask, setModelObjectClasspathResolutionEnabled, setModelResourceValidationEnabled, setModuleLocation, setTransformerLocation
 
Methods inherited from class org.jomc.ant.JomcTask
assertKeysNotNull, assertLocationsNotNull, assertNamesNotNull, assertNotNull, createClasspath, createModelContextAttribute, createTransformationOutputProperty, createTransformationParameter, createTransformationParameterResource, execute, getClasspath, getDirectory, getIf, getModel, getModelContextAttributes, getModelContextFactoryClassName, getModletLocation, getModletSchemaSystemId, getPlatformProviderLocation, getProperties, getProviderLocation, getResource, getResources, getTransformationOutputProperties, getTransformationParameterResources, getTransformationParameters, getTransformer, getUnless, isModelProcessingEnabled, isModletResourceValidationEnabled, logMessage, logMessage, logSeparator, logValidationReport, newProjectClassLoader, postExecuteTask, setClasspath, setClasspathRef, setIf, setModel, setModelContextFactoryClassName, setModelProcessingEnabled, setModletLocation, setModletResourceValidationEnabled, setModletSchemaSystemId, setPlatformProviderLocation, setProviderLocation, setUnless
 
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
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteModelTask

public WriteModelTask()
Creates a new WriteModelTask instance.

Method Detail

getModelEncoding

public String getModelEncoding()
Gets the encoding of the model resource.

Returns:
The encoding of the model resource.
See Also:
setModelEncoding(java.lang.String)

setModelEncoding

public void setModelEncoding(String value)
Sets the encoding of the model resource.

Parameters:
value - The new encoding of the model resource or null.
See Also:
getModelEncoding()

getModelFile

public File getModelFile()
Gets the file to write the model to.

Returns:
The file to write the model to or null.
See Also:
setModelFile(java.io.File)

setModelFile

public void setModelFile(File value)
Sets the file to write the model to.

Parameters:
value - The new file to write the model to or null.
See Also:
getModelFile()

getSpecification

public String getSpecification()
Gets the identifier of a specification to write.

Returns:
The identifier of a specification to write or null.
See Also:
setSpecification(java.lang.String)

setSpecification

public void setSpecification(String value)
Sets the identifier of a specification to write.

Parameters:
value - The new identifier of a specification to write or null.
See Also:
getSpecification()

getSpecification

public Specification getSpecification(Model model)
Gets the specification to write from a given model.

Parameters:
model - The model to get the specification to write from.
Returns:
The specification to write or null.
Throws:
NullPointerException - if model is null.
See Also:
getSpecification()

getImplementation

public String getImplementation()
Gets the identifier of an implementation to write.

Returns:
The identifier of an implementation to write or null.
See Also:
setImplementation(java.lang.String)

setImplementation

public void setImplementation(String value)
Sets the identifier of an implementation to write.

Parameters:
value - The new identifier of an implementation to write or null.
See Also:
getImplementation()

getInstance

public Instance getInstance(Model model)
Gets the instance to write from a given model.

Parameters:
model - The model to get the instance to write from.
Returns:
The instance to write or null.
Throws:
NullPointerException - if model is null.
See Also:
getImplementation()

getModule

public String getModule()
Gets the identifier of a module to write.

Returns:
The identifier of a module to write or null.
See Also:
setModule(java.lang.String)

setModule

public void setModule(String value)
Sets the identifier of a module to write.

Parameters:
value - The new identifier of a module to write or null.
See Also:
getModule()

getModule

public Module getModule(Model model)
Gets the module to write from a given model.

Parameters:
model - The model to get the module to write from.
Returns:
The module to write or null.
Throws:
NullPointerException - if model is null.
See Also:
getModule()

executeTask

public void executeTask()
                 throws org.apache.tools.ant.BuildException
Called by the execute method prior to the postExecuteTask method.

Overrides:
executeTask in class JomcTask
Throws:
org.apache.tools.ant.BuildException - if execution fails.
See Also:
JomcTask.execute()

clone

public WriteModelTask clone()
Creates and returns a copy of this object.

Overrides:
clone in class JomcModelTask
Returns:
A copy of this object.


Copyright © 2005-2012 The JOMC Project. All Rights Reserved.Get JOMC at SourceForge.net. Fast, secure and Free Open Source software downloads
Please note that this documentation is maintained by non-native english speaking authors. As such, you may encounter phrases or wordings which seem imprecise or may even have a totally different meaning to native english speaking readers than what the individual author was trying to express. If you are a native english speaking reader and find any such phrases or wordings we kindly ask you to send an email to the corresponding author and help us improve this documentation in order to avoid misunderstandings. You will find the authors' email addresses at the top of each class. Please accept our apologies for any inconvenience caused.