Package edu.kit.ipd.sdq.eventsim.api
Class PCMModel
- java.lang.Object
-
- edu.kit.ipd.sdq.eventsim.api.PCMModel
-
public class PCMModel extends Object
This class encapsulates a PCM model and provides a convenient loading mechanism. A PCM model comprises several partial models:- the allocation model
- the system model
- the resource environment model
- the repository model
- the usage model
-
-
Constructor Summary
Constructors Constructor Description PCMModel(org.palladiosimulator.pcm.allocation.Allocation allocationModel, org.palladiosimulator.pcm.repository.Repository repositoryModel, org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment resourceModel, org.palladiosimulator.pcm.system.System systemModel, org.palladiosimulator.pcm.usagemodel.UsageModel usageModel, org.palladiosimulator.pcm.resourcetype.ResourceRepository resourceRepository)
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.palladiosimulator.pcm.allocation.Allocation
getAllocationModel()
Returns the allocation model.org.palladiosimulator.pcm.repository.Repository
getRepositoryModel()
Returns the repository model.org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment
getResourceEnvironmentModel()
Returns the resource environment model.org.palladiosimulator.pcm.resourcetype.ResourceRepository
getResourceRepository()
Returns the resource repository containing the resource types.org.palladiosimulator.pcm.system.System
getSystemModel()
Returns the system model.org.palladiosimulator.pcm.usagemodel.UsageModel
getUsageModel()
Returns the usage model.static PCMModel
loadFromBundle(org.osgi.framework.Bundle bundle, IPath usageModelLocation, IPath allocationModelLocation)
Loads a PCM model that is contained in the specified bundle.static PCMModel
loadFromUri(URI usageUri, URI allocationUri)
Loads a PCM model that is contained in the specified bundle.void
saveToFolder(URI folder)
-
-
-
Constructor Detail
-
PCMModel
public PCMModel(org.palladiosimulator.pcm.allocation.Allocation allocationModel, org.palladiosimulator.pcm.repository.Repository repositoryModel, org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment resourceModel, org.palladiosimulator.pcm.system.System systemModel, org.palladiosimulator.pcm.usagemodel.UsageModel usageModel, org.palladiosimulator.pcm.resourcetype.ResourceRepository resourceRepository)
Default constructor. This constructor is not intended to be used from outside this class. Instead, theloadFromBundle()
method is supposed to be used.
-
-
Method Detail
-
getUsageModel
public org.palladiosimulator.pcm.usagemodel.UsageModel getUsageModel()
Returns the usage model.- Returns:
- the usage model
-
getAllocationModel
public org.palladiosimulator.pcm.allocation.Allocation getAllocationModel()
Returns the allocation model.- Returns:
- the allocation model
-
getSystemModel
public org.palladiosimulator.pcm.system.System getSystemModel()
Returns the system model.- Returns:
- the system model
-
getResourceEnvironmentModel
public org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment getResourceEnvironmentModel()
Returns the resource environment model.- Returns:
- the resource environment model
-
getRepositoryModel
public org.palladiosimulator.pcm.repository.Repository getRepositoryModel()
Returns the repository model.- Returns:
- the repository model
-
getResourceRepository
public org.palladiosimulator.pcm.resourcetype.ResourceRepository getResourceRepository()
Returns the resource repository containing the resource types.- Returns:
- the resource repository
-
loadFromBundle
public static PCMModel loadFromBundle(org.osgi.framework.Bundle bundle, IPath usageModelLocation, IPath allocationModelLocation)
Loads a PCM model that is contained in the specified bundle. The loading procedure requires the location of two model files: the usage model and the allocation model.- Parameters:
bundle
- the bundle containing the model files that are to be loadedusageModelLocation
- the location of the usage model fileallocationModelLocation
- the location of the allocation model file- Returns:
-
loadFromUri
public static PCMModel loadFromUri(URI usageUri, URI allocationUri)
Loads a PCM model that is contained in the specified bundle. The loading procedure requires the location of two model files: the usage model and the allocation model.- Parameters:
usageModelUri
- the location of the usage model file in form of a URIallocationModelUri
- the location of the allocation model file in form of a URI- Returns:
-
saveToFolder
public void saveToFolder(URI folder) throws IOException
- Throws:
IOException
-
-