blob: 848a681d9381824f1022582f680e16c9e6aa7629 [file] [log] [blame]
/**
* <copyright>
*
* Copyright (c) 2011 E.D.Willink and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* E.D.Willink - initial API and implementation
*
* </copyright>
*
* $Id$
*
* Run As->MWE2 Workflow to regenerate the pivot model.
*/
module ImportFromOMG
import org.eclipse.ocl.examples.build.utilities.*
import org.eclipse.emf.mwe.utils.*
import org.eclipse.emf.mwe.utils.*
import org.eclipse.emf.ecore.resource.impl.*
var xmiSlot = "xmi"
var pivotSlot = "pivot"
var oclSlot = "ocl"
//var omgName = "org.eclipse.uml2"
var projectName = "org.eclipse.ocl.examples.build"
/**
* Generate the Pivot Model, by performing the merge to create the flattened package
* with additional MDT/OCL content, alphabeticsing the classes, reloading the genmodel
* and finally generating the model code.
*/
Workflow {
bean = ResourceSetImpl : resourceSet {}
bean = StandaloneSetup { resourceSet = resourceSet
platformUri = ".."
scanClassPath = true
uriMap = Mapping {
from = "platform:/plugin/org.eclipse.uml2.uml.resources/"
to = "platform:/resource/org.eclipse.uml2.uml.resources/"
}
uriMap = Mapping {
from = "platform:/plugin/org.eclipse.uml2.uml/"
to = "platform:/resource/org.eclipse.uml2.uml/"
}
}
// bean = UMLStandaloneSetup { resourceSet = resourceSet }
bean = OCLStandaloneSetup {}
component = XMI2UMLResourceReader { resourceSet = resourceSet skipOnErrors = true
modelSlot = "${xmiSlot}"
uri = "/${projectName}/model/Infrastructure.xmi"
}
component = UML2PivotLoader { skipOnErrors = true
umlSlot = "${xmiSlot}"
modelSlot = "${pivotSlot}"
}
component = CompleteOCLSeparator { skipOnErrors = true
modelSlot = "${pivotSlot}"
oclSlot = "${oclSlot}"
oclURI = "/${projectName}/model/Infrastructure.ocl"
}
component = ResourceWriter { skipOnErrors = true
modelSlot = "${oclSlot}"
}
component = ResourceWriter { skipOnErrors = true
modelSlot = "${pivotSlot}"
uri = "/${projectName}/model/Infrastructure.model.pivot"
}
}