| /** |
| * <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 ImportFromUML2_5 |
| |
| 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 umlFolder = "/UML-2.5/XMI-5-Jan-2012" |
| |
| /** |
| * 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 = "${umlFolder}/UML.xmi" |
| nsURI = "http:///UML2-5" |
| } |
| component = UMLAssociationNormalizer { skipOnErrors = true |
| modelSlot = "${xmiSlot}" |
| uri = "${umlFolder}/UML.pivot.uml" |
| } |
| component = ResourceWriter { resourceSet = resourceSet skipOnErrors = true |
| modelSlot = "${xmiSlot}" |
| } |
| component = UML2PivotLoader { skipOnErrors = true |
| umlSlot = "${xmiSlot}" |
| modelSlot = "${pivotSlot}" |
| } |
| component = CompleteOCLSeparator { skipOnErrors = true |
| modelSlot = "${pivotSlot}" |
| oclSlot = "${oclSlot}" |
| oclURI = "${umlFolder}/UML.ocl" |
| } |
| component = ResourceWriter { resourceSet = resourceSet skipOnErrors = true |
| modelSlot = "${oclSlot}" |
| } |
| component = ResourceWriter { resourceSet = resourceSet skipOnErrors = true |
| modelSlot = "${pivotSlot}" |
| uri = "${umlFolder}/UML.ocl.pivot" |
| } |
| } |
| |