org.jomc.ant
Class MergeModulesTask

Package class diagram package MergeModulesTask
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.MergeModulesTask
All Implemented Interfaces:
Cloneable

public final class MergeModulesTask
extends JomcModelTask

Task for merging module resources.

Version:
$JOMC: MergeModulesTask.java 4200 2012-01-25 09:46:13Z 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
MergeModulesTask()
          Creates a new MergeModulesTask instance.
 
Method Summary
 MergeModulesTask clone()
          Creates and returns a copy of this object.
 TransformerResourceType createModelObjectStylesheetResource()
          Creates a new modelObjectStylesheetResource element instance.
 NameType createModuleExclude()
          Creates a new moduleExclude element instance.
 NameType createModuleInclude()
          Creates a new moduleInclude element instance.
 void executeTask()
          Merges module resources.
 List<TransformerResourceType> getModelObjectStylesheetResources()
          Gets the XSLT documents to use for transforming model objects.
 String getModuleEncoding()
          Gets the encoding of the module resource.
 Set<NameType> getModuleExcludes()
          Gets a set of module names to exclude.
 File getModuleFile()
          Gets the file to write the merged module to.
 Set<NameType> getModuleIncludes()
          Gets a set of module names to include.
 String getModuleName()
          Gets the name of the merged module.
 String getModuleVendor()
          Gets the vendor of the merged module.
 String getModuleVersion()
          Gets the version of the merged module.
 boolean isModuleExcluded(Module module)
          Tests exclusion of a given module based on property moduleExcludes.
 boolean isModuleIncluded(Module module)
          Tests inclusion of a given module based on property moduleIncludes.
 void preExecuteTask()
          Called by the execute method prior to the executeTask method.
 void setModuleEncoding(String value)
          Sets the encoding of the module resource.
 void setModuleFile(File value)
          Sets the file to write the merged module to.
 void setModuleName(String value)
          Sets the name of the merged module.
 void setModuleVendor(String value)
          Sets the vendor of the merged module.
 void setModuleVersion(String value)
          Sets the version of the merged module.
 
Methods inherited from class org.jomc.ant.JomcModelTask
createModuleResource, getModel, getModuleLocation, getModuleResources, getTransformerLocation, isModelObjectClasspathResolutionEnabled, isModelResourceValidationEnabled, newModelContext, 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

MergeModulesTask

public MergeModulesTask()
Creates a new MergeModulesTask instance.

Method Detail

getModuleFile

public File getModuleFile()
Gets the file to write the merged module to.

Returns:
The file to write the merged module to or null.
See Also:
setModuleFile(java.io.File)

setModuleFile

public void setModuleFile(File value)
Sets the file to write the merged module to.

Parameters:
value - The new file to write the merged module to or null.
See Also:
getModuleFile()

getModuleEncoding

public String getModuleEncoding()
Gets the encoding of the module resource.

Returns:
The encoding of the module resource.
See Also:
setModuleEncoding(java.lang.String)

setModuleEncoding

public void setModuleEncoding(String value)
Sets the encoding of the module resource.

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

getModuleName

public String getModuleName()
Gets the name of the merged module.

Returns:
The name of the merged module or null.
See Also:
setModuleName(java.lang.String)

setModuleName

public void setModuleName(String value)
Sets the name of the merged module.

Parameters:
value - The new name of the merged module or null.
See Also:
getModuleName()

getModuleVersion

public String getModuleVersion()
Gets the version of the merged module.

Returns:
The version of the merged module or null.
See Also:
setModuleVersion(java.lang.String)

setModuleVersion

public void setModuleVersion(String value)
Sets the version of the merged module.

Parameters:
value - The new version of the merged module or null.
See Also:
getModuleVersion()

getModuleVendor

public String getModuleVendor()
Gets the vendor of the merged module.

Returns:
The vendor of the merge module or null.
See Also:
setModuleVendor(java.lang.String)

setModuleVendor

public void setModuleVendor(String value)
Sets the vendor of the merged module.

Parameters:
value - The new vendor of the merged module or null.
See Also:
getModuleVendor()

getModuleIncludes

public Set<NameType> getModuleIncludes()
Gets a set of module names to include.

This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make to the returned set will be present inside the object. This is why there is no set method for the module includes property.

Returns:
A set of module names to include.
See Also:
createModuleInclude()

createModuleInclude

public NameType createModuleInclude()
Creates a new moduleInclude element instance.

Returns:
A new moduleInclude element instance.
See Also:
getModuleIncludes()

getModuleExcludes

public Set<NameType> getModuleExcludes()
Gets a set of module names to exclude.

This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make to the returned set will be present inside the object. This is why there is no set method for the module excludes property.

Returns:
A set of module names to exclude.
See Also:
createModuleExclude()

createModuleExclude

public NameType createModuleExclude()
Creates a new moduleExclude element instance.

Returns:
A new moduleExclude element instance.
See Also:
getModuleExcludes()

getModelObjectStylesheetResources

public List<TransformerResourceType> getModelObjectStylesheetResources()
Gets the XSLT documents to use for transforming model objects.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the object. This is why there is no set method for the model object stylesheet resources property.

Returns:
The XSLT documents to use for transforming model objects.
See Also:
createModelObjectStylesheetResource()

createModelObjectStylesheetResource

public TransformerResourceType createModelObjectStylesheetResource()
Creates a new modelObjectStylesheetResource element instance.

Returns:
A new modelObjectStylesheetResource element instance.
See Also:
getModelObjectStylesheetResources()

preExecuteTask

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

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

executeTask

public void executeTask()
                 throws org.apache.tools.ant.BuildException
Merges module resources.

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

isModuleIncluded

public boolean isModuleIncluded(Module module)
Tests inclusion of a given module based on property moduleIncludes.

Parameters:
module - The module to test.
Returns:
true, if module is included based on property moduleIncludes.
Throws:
NullPointerException - if module is null.
See Also:
getModuleIncludes()

isModuleExcluded

public boolean isModuleExcluded(Module module)
Tests exclusion of a given module based on property moduleExcludes.

Parameters:
module - The module to test.
Returns:
true, if module is excluded based on property moduleExcludes.
Throws:
NullPointerException - if module is null.
See Also:
getModuleExcludes()

clone

public MergeModulesTask 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.