@@ -0,0 +1,2087 @@
+package de.fabiankeller.palladio.environment;%0A%0Aimport org.eclipse.emf.common.util.URI;%0Aimport org.palladiosimulator.analyzer.workflow.blackboard.PCMResourceSetPartition;%0Aimport org.palladiosimulator.analyzer.workflow.configurations.AbstractPCMWorkflowRunConfiguration;%0A%0A/**%0A * Creates a %7B@link PCMResourceSetPartition%7D where Palladio default models are already loaded.%0A */%0Apublic interface PCMResourceSetPartitionFactory %7B%0A%0A    /**%0A     * Creates a %7B@link PCMResourceSetPartition%7D that can be used in headless mode.%0A     */%0A    PCMResourceSetPartition create();%0A%0A    /**%0A     * %7B@link PCMResourceSetPartition%7Ds do not by default hold references to the default models shipped with Palladio.%0A     * They are somehow automagically registered when loading the model. However, we need to load them manually and%0A     * this class shows how this can be done. While this is not nice and future proof, it works for the moment. This%0A     * should be replaced by some proper loading in the near future.%0A     */%0A    class DefaultFactory implements PCMResourceSetPartitionFactory %7B%0A%0A        private static final String%5B%5D toLoad = %7B%0A                %22pathmap://PCM_MODELS/Palladio.resourcetype#_o3sScH2AEdyH8uerKnHYug%22, // LAN%0A                %22pathmap://PCM_MODELS/Palladio.resourcetype#_oro4gG3fEdy4YaaT-RYrLQ%22, // PCU%0A                %22pathmap://PCM_MODELS/Palladio.resourcetype#_BIjHoQ3KEdyouMqirZIhzQ%22, // HDD%0A                %22pathmap://PCM_MODELS/Palladio.resourcetype#_nvHX4KkREdyEA_b89s7q9w%22, // DELAY%0A        %7D;%0A%0A        @Override%0A        public PCMResourceSetPartition create() %7B%0A            final PCMResourceSetPartition rsp = new PCMResourceSetPartition();%0A            rsp.getResourceSet().setURIConverter(PalladioEclipseEnvironment.INSTANCE.getUriConverter());%0A            rsp.initialiseResourceSetEPackages(AbstractPCMWorkflowRunConfiguration.PCM_EPACKAGES);%0A%0A            // load default models%0A            for (final String model : toLoad) %7B%0A                rsp.loadModel(URI.createURI(model));%0A            %7D%0A%0A            rsp.resolveAllProxies();%0A            return rsp;%0A        %7D%0A    %7D%0A%7D%0A

create factory for PCMResourceSetPartition that registers some default Palladio models