Class StandaloneProjectDescriptor
- java.lang.Object
-
- net.ssehub.easy.producer.core.persistence.standard.StandaloneProjectDescriptor
-
- All Implemented Interfaces:
IProjectDescriptor
public class StandaloneProjectDescriptor extends java.lang.Object implements IProjectDescriptor
Implements a descriptor for the source and target VIL project locations. Thesecond constructorallows to specify a different target location.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.ssehub.easy.instantiation.core.model.vilTypes.IProjectDescriptor
IProjectDescriptor.ModelKind
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.Filebaseprivate IProjectDescriptorparentprivate ScriptvilScript
-
Constructor Summary
Constructors Constructor Description StandaloneProjectDescriptor(ModelInfo<Script> vilInfo, java.io.File base)Creates a standalone project descriptor.StandaloneProjectDescriptor(Script vilScript, java.io.File base)Creates a standalone project descriptor.StandaloneProjectDescriptor(IProjectDescriptor parent, java.io.File base)Allows to instantiate into a given location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProgressObservercreateObserver()Creates a progress observer on demand, e.g., when predecessors are accessed the first time.java.io.FilegetBase()The base folder of the project (typically the project location).ScriptgetMainVilScript()Returns the main VIL script of the project.java.lang.StringgetModelFolder(IProjectDescriptor.ModelKind kind)Returns the path to the respective models relative toIProjectDescriptor.getBase().IProjectDescriptorgetPredecessor(int index)Returns a specific predecessor descriptor.intgetPredecessorCount()The number of predecessor projects.
-
-
-
Field Detail
-
parent
private IProjectDescriptor parent
-
base
private java.io.File base
-
vilScript
private Script vilScript
-
-
Constructor Detail
-
StandaloneProjectDescriptor
public StandaloneProjectDescriptor(ModelInfo<Script> vilInfo, java.io.File base) throws ModelManagementException
Creates a standalone project descriptor.- Parameters:
vilInfo- the model information instance for the VIL script to runbase- the folder to instantiate into- Throws:
ModelManagementException- in case that resolving the model, obtaining information etc failed.
-
StandaloneProjectDescriptor
public StandaloneProjectDescriptor(Script vilScript, java.io.File base) throws ModelManagementException
Creates a standalone project descriptor.- Parameters:
vilScript- the VIL script to runbase- the folder to instantiate into- Throws:
ModelManagementException- in case that resolving the model, obtaining information etc failed.
-
StandaloneProjectDescriptor
public StandaloneProjectDescriptor(IProjectDescriptor parent, java.io.File base)
Allows to instantiate into a given location.- Parameters:
parent- the parent descriptor (also representing the source, to be obtained via#ProjectDescriptor())base- the folder to instantiate into
-
-
Method Detail
-
getBase
public java.io.File getBase()
Description copied from interface:IProjectDescriptorThe base folder of the project (typically the project location).- Specified by:
getBasein interfaceIProjectDescriptor- Returns:
- the base folder
-
getPredecessorCount
public int getPredecessorCount()
Description copied from interface:IProjectDescriptorThe number of predecessor projects.- Specified by:
getPredecessorCountin interfaceIProjectDescriptor- Returns:
- the number of predecessor projects
-
getPredecessor
public IProjectDescriptor getPredecessor(int index)
Description copied from interface:IProjectDescriptorReturns a specific predecessor descriptor.- Specified by:
getPredecessorin interfaceIProjectDescriptor- Parameters:
index- the index of the predecessor to be returned- Returns:
- the predecessor
-
getMainVilScript
public Script getMainVilScript()
Description copied from interface:IProjectDescriptorReturns the main VIL script of the project.- Specified by:
getMainVilScriptin interfaceIProjectDescriptor- Returns:
- the main VIL script
-
createObserver
public ProgressObserver createObserver()
Description copied from interface:IProjectDescriptorCreates a progress observer on demand, e.g., when predecessors are accessed the first time. [factory method]- Specified by:
createObserverin interfaceIProjectDescriptor- Returns:
- the progress observer to be used
-
getModelFolder
public java.lang.String getModelFolder(IProjectDescriptor.ModelKind kind)
Description copied from interface:IProjectDescriptorReturns the path to the respective models relative toIProjectDescriptor.getBase().- Specified by:
getModelFolderin interfaceIProjectDescriptor- Parameters:
kind- the model kind to return the folder for- Returns:
- the relative path to the model folder
-
-