Class ModelCopy
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
de.uni_hildesheim.sse.easy.ant.AbstractModelTask
de.uni_hildesheim.sse.easy.ant.modelcopy.ModelCopy
- All Implemented Interfaces:
Cloneable
ANT task for copying the an EASy-Producer model (IVML, VIL, VTL, .EASyConfig, ...) to a specified location, while
omitting configurations (as specified in QualiMaster).
- Author:
- El-Sharkawy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate net.ssehub.easy.varModel.model.rewrite.ProjectRewriteVisitorFields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidclearRewriter(net.ssehub.easy.varModel.model.Project project, net.ssehub.easy.varModel.model.filter.FilterType filterType) private voidcopy()Starts the copy process.voidprivate voidhandleConfigFile(String relativeFileName, File destFolder) Copies the IVML model.private net.ssehub.easy.varModel.model.ProjectprocessDefaultConfig(net.ssehub.easy.varModel.model.Project p) Methods inherited from class de.uni_hildesheim.sse.easy.ant.AbstractModelTask
addOrRemoveLocation, debugMessage, execute, getAllowDestDeletion, getDestinationFolder, getMainProject, getSourceFolder, getValidate, getVebose, loadProject, setAllowDestDeletion, setDestinationFolder, setMainProject, setSourceFolder, setValidate, setVeboseMethods 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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
CONFIG_FILE_EXTENSION
- See Also:
-
BASICS_CONFIG
- See Also:
-
PIPELINES_CONFIG
- See Also:
-
ALGORITHMS_CONFIG
- See Also:
-
DATAMGT_CONFIG
- See Also:
-
FAMILIES_CONFIG
- See Also:
-
HARDWARE_CONFIG
- See Also:
-
INFRASTRUCTURE_CONFIG
- See Also:
-
RECONFIGURABLE_HW_CONFIG
- See Also:
-
REMOVEABLE_CONFIG_EXTENSION
- See Also:
-
rewriter
private net.ssehub.easy.varModel.model.rewrite.ProjectRewriteVisitor rewriter
-
-
Constructor Details
-
ModelCopy
public ModelCopy()Constructor for the ant task. -
ModelCopy
Constructor for testing- Parameters:
orgFolder- A folder containing the source artifacts for copying.cpyfolder- The folder must exist and empty or not exist (must not benull).mainProject- the main project
-
-
Method Details
-
copy
private void copy() throws net.ssehub.easy.basics.modelManagement.ModelManagementException, IOExceptionStarts the copy process.- Throws:
net.ssehub.easy.basics.modelManagement.ModelManagementException- If IVML files could not be parsedIOException- If files could not be copied.
-
handleConfigFile
private void handleConfigFile(String relativeFileName, File destFolder) throws net.ssehub.easy.basics.modelManagement.ModelManagementException, IOException Copies the IVML model. Configs will be cleaned.- Parameters:
relativeFileName- The path insideAbstractModelTask.sourceFolder.destFolder- The destination folder where to save the copy.- Throws:
net.ssehub.easy.basics.modelManagement.ModelManagementException- If IVML files could not be parsedIOException- If files could not be copied.
-
processDefaultConfig
private net.ssehub.easy.varModel.model.Project processDefaultConfig(net.ssehub.easy.varModel.model.Project p) -
clearRewriter
private void clearRewriter(net.ssehub.easy.varModel.model.Project project, net.ssehub.easy.varModel.model.filter.FilterType filterType) -
doModelOperation
public void doModelOperation() throws org.apache.tools.ant.BuildException- Specified by:
doModelOperationin classAbstractModelTask- Throws:
org.apache.tools.ant.BuildException
-