blob: b6d552dfd9027ffcd5a024e1e269cee844ed1804 [file] [log] [blame]
/*******************************************************************************
* 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
*
* 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 = "/UML2.5CG/model"
/**
* 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"
}
/* component = XMI2UMLResourceReader { resourceSet = resourceSet skipOnErrors = true
modelSlot = "${xmiSlot}"
uri = "${umlFolder}/UMLDI.xmi"
nsURI = "http:///UML2-5"
}
component = UMLAssociationNormalizer { skipOnErrors = true
modelSlot = "${xmiSlot}"
uri = "${umlFolder}/UMLDI.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}/UMLDI.ocl"
}
component = ResourceWriter { resourceSet = resourceSet skipOnErrors = true
modelSlot = "${oclSlot}"
}
component = ResourceWriter { resourceSet = resourceSet skipOnErrors = true
modelSlot = "${pivotSlot}"
uri = "${umlFolder}/UMLDI.ocl.pivot"
} */
}