Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-1
© 2005-2006 The ATHENA Consortium.
INF5120: Lecture #3 (F3) 5 February 2007
UML Profiles and Domain-Specific
Languages (DSLs)
Brian Elvesæter, SINTEF [email protected]
2© 2005-2006 The ATHENA Consortium.
ATHENA Model-Driven Interoperability (MDI) Framework
MDA & Interoperability
Metamodelling
UML Profiles & DSLs
Model Transformations
Method Engineering
Reusable MDI Assets
• Method chunks• Tools and services
• Models and metamodels• Model transformations• DSLs and UML profiles
• Reference examples
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-2
3© 2005-2006 The ATHENA Consortium.
Outline
• Metamodelling (revisited)• UML profiles• Domain-specific languages (DSLs)• Eclipse technologies
– Eclipse Modeling Framework (EMF)– Eclipse Graphical Modeling Framework (GMF)
• Example– Metamodels and UML profiles for SOA and Web
services• References
4© 2005-2006 The ATHENA Consortium.
Metamodelling (revisited)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-3
5© 2005-2006 The ATHENA Consortium.
Fragments of a UML metamodel
UMLUML
6© 2005-2006 The ATHENA Consortium.
Three stages in the evolution ofmodelling techniques at the OMG.
UMLUML MOFMOF
UMLUMLaModelaModel
aModelaModel
MOFMOF
UMLUML
UML_for_CORBAUML_for_CORBA
aModelaModel
SPEMSPEM WorkflowWorkflow etc.etc.
Common Warehouse Metadata
Common Warehouse Metadata
Action language Action language
(a) (b) (c)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-4
7© 2005-2006 The ATHENA Consortium.
Egyptian architecture
metamodel
model
“the real world"
meta-metamodel
The MOF
The UML meta-model and other MM’s
Some UML models and other M’s
Various usages of these models
M0
M1
M2
M3
8© 2005-2006 The ATHENA Consortium.
Illustration
Class Association
Package
Package extendsClass
Association
Participant
PresentationParticipant listens
Interface Class
Java MM UML MM
Presentation
UML modelJava program
MOF M3
M2
M1
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-5
9© 2005-2006 The ATHENA Consortium.
The three modelling levels
the MOFMMM
the UMLMM
a UMLmodel m
a particularuse of m
the UPMMM (SPEM)
the CWMMM
another UMLmodel m’
anotheruse of m
M3 level
M2 level
M1 level
M0 level
CCMEDOCetc.
10© 2005-2006 The ATHENA Consortium.
Model -> Metamodel
UML MM
Class Attribute*1
UML model
Client
Name: String
entity → meta-entity
relationship
model → meta-model
relationship
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-6
11© 2005-2006 The ATHENA Consortium.
Metamodel -> Meta-metamodel
UML MM
Class Attribute*1
MOF
Class Associationsource
destination
entity → meta-entity
relationship
model → meta-model
relationship
12© 2005-2006 The ATHENA Consortium.
MOF Model (M3)ModelElement
NamespaceImport Tag Constraint TypedElement
GeneralizableElement
Package Classifier
Association Class DataType
Feature Constant StructureField Parameter
BehaviouralFeature StructuralFeatureAssociationEnd
Operation Exception Attribute Reference
PrimitiveType StructureType EnumerationType CollectionType AliasType
/Depends On
0..*
/Exposes1
ReferesTo1
0..*CanRaise0..* {ordered}
Generalizes
0..*Aliases
0..*
0..*
Contains
0..* 0..*{ordered}
AttachesTo1..*
0..*
Constrains1..*
0..*+typedElementIsOfType
1+type
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-7
13© 2005-2006 The ATHENA Consortium.
Essential MOF: Classes
14© 2005-2006 The ATHENA Consortium.
Essential MOF: Datatypes
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-8
15© 2005-2006 The ATHENA Consortium.
Essential MOF: Packages
16© 2005-2006 The ATHENA Consortium.
Essential MOF: Types
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-9
17© 2005-2006 The ATHENA Consortium.
Statemachine metamodel example
• A statemachine consists of a number of states.
• States can be start states, stop states and “normal”states.
• A transition connects two states. States know their outgoing and incoming transitions.
• We also support composite states that themselves contain sub state machines.
• A state machine is itself a composite state.
• A state has actions. Actions can either be entry or exit actions.
18© 2005-2006 The ATHENA Consortium.
Defining the metamodel (2)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-10
19© 2005-2006 The ATHENA Consortium.
UML profiles
20© 2005-2006 The ATHENA Consortium.
UML profiles
• They allow us to adapt the UML language to the needs of the analysts or the application domain
• Allows designers to model using application domain concepts.
• There are three extension mechanisms:– Stereotypes– Restrictions– Tagged values
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-11
21© 2005-2006 The ATHENA Consortium.
Stereotype
• Extends the vocabulary of UML with new construction elementsderived from existing UML but specific to a problem domain
• Can have associated restrictions and tagged values• Possibility of assigning an icon for a better graphical representation
DB Partners
22© 2005-2006 The ATHENA Consortium.
Restriction
• Is a semantical condition represented by a textual expression• Imposes some kind of condition or requisite on the element to which
it is applied• OCL – Object Constraint Language
{An interface does not have attributes, only operations}
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-12
23© 2005-2006 The ATHENA Consortium.
Tagged value
• Is a property associated to a model element• Used to store information about the element
– Management information, documentation, coding parameters, ...
• Generally, the tools store this information but it is not shown in the diagrams
24© 2005-2006 The ATHENA Consortium.
Metamodels and profiles
MOF
UML process genericMeta-model
real-timemodel
WorkflowMeta-model
UMLFor J2EE
migrationmodel
Workflowmodel
Migration orientedprocess Meta-model
UMLReal-time
M3
M2
M1
extension
relationship
model <-> meta-model
relationship
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-13
25© 2005-2006 The ATHENA Consortium.
Classification
Dog
Collie
Animal
LivingBeing Four Legged
Object
Celebrity
MovieStar
Lassie
26© 2005-2006 The ATHENA Consortium.
Classification dimensions
Collie
Celebrity
Four Legged Object
Animal
Dog
Movie Star
Model Element
Instance
Object
Ontological classification(domain types)
Linguistic classification(representation form)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-14
27© 2005-2006 The ATHENA Consortium.
Kinds of metamodels
• Two kinds of information of a set of models are modelled in metamodels– Form (linguistic aspects)
• OMG is predominantly occupied with this
– Content (ontological aspects)
28© 2005-2006 The ATHENA Consortium.
Linguistic metamodelling
LassieCollie
Class Object
Class
represents represents
linguistic ”instance-of” linguistic ”instance-of”
linguistic ”instance-of” linguistic ”instance-of”
instance-of
ontological instance-of
ontological instance-of
L0 (called M0 in OMG)
L1 (called M1 in OMG)
L2 (called M2 in OMG)
L3 (called M3 in OMG)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-15
29© 2005-2006 The ATHENA Consortium.
Ontological metamodelling
Lassie
Collie Class
Breed
represents linguistic instance-ofO0
O1
O2
O3
Object
Biological rank
ontological ”instance-of”
linguistic instance-of
linguistic instance-ofontological ”instance-of”
ontological ”instance-of”
ontological ”instance-of”
L1 L2
30© 2005-2006 The ATHENA Consortium.
Domain-specific languages (DSLs)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-16
31© 2005-2006 The ATHENA Consortium.
UML – one size fits all?
• While the OMG MDA promotes UML as the visual “universal” glue suitable for modelling everything, we are also seeing a trend towards development and co-existence of several domain-specific modelling languages, e.g. supported by the Microsoft Domain-Specific Language (DSL) tools (http://lab.msdn.microsoft.com/teamsystem/workshop/dsltools/default.aspx).
• Such approaches are now also being discussed in various OMG forums.
• UML is seen as a “general-purpose” language while DSLs may be more expressive for most purposes.
• A model-driven framework needs to acknowledge the existence of different models and views expressed in different modelling languages.
• The MDA technologies can help us to align these models through acommon metamodelling language on which model transformations and model mappings can be defined.
32© 2005-2006 The ATHENA Consortium.
Software factory
• The Software Factories Web site (http://www.softwarefactories.com/) defines the term Software Factory in the following way:
• “A Software Factory is a software product line that configures extensible development tools like Visual Studio Team System withpackaged content like DSLs, patterns, frameworks and guidance, based on recipes for building specific kinds of applications. For example, we might set up a Software Factory for thin client Customer Relationship Management (CRM) applications using the .NET framework, C#, the Microsoft Business Framework, Microsoft SQL Server, and the Microsoft Host Integration Server. Equipped with this factory, we could rapidly punch out an endless variety of CRM applications, each containing unique features based on the unique requirements of specific customers. Better yet, we could use this factory to create an ecosystem, by making it available to third parties, who could extend it to rapidly build CRM applications incorporating their value added extensions.”
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-17
33© 2005-2006 The ATHENA Consortium.
UML and DSLs
• The issue of the role of UML is often stated in overly simplistic terms: MDD advocates the use of UML for all domain modelling while the Software Factories approach advocates that UML never used.
• This is an incorrect statement of the positions of both camps.– While the MDD approach treats UML, with customization, as the
modelling language of choice for most application modelling, it also acknowledges the value of custom languages in certain specialized circumstances.
– This is the purpose of the OMG Meta-Object Facility (MOF) standard that plays an important role in MDD. UML itself is defined using MOF and there are MOF definitions of many other languages.
– The MDD approach acknowledges the value of non-UML DSLs as a technique to be applied judiciously.
– Further, the Software Factories approach does not reject UML entirely. It suggests that you use UML for developing sketches and documentation, where DSLs should be used for developing models from which code is generated.
34© 2005-2006 The ATHENA Consortium.
Advantages of using UML profiles
• UML is an open standard modelling language for which there are many available books and training courses.
• UML profiles provide a lightweight approach that is easily implemented using readily available UML tooling.
• Models with UML profiles applied can be read by all UML tools even if they do not have any knowledge of the profile.
• Basing all DSLs on UML creates a set of related languages that share common concepts.
• UML can be used for high-level architectural models as well as detailed models from which code can be generated.
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-18
35© 2005-2006 The ATHENA Consortium.
Disadvantages of using UML profiles
• UML profiles only permit a limited amount of customization.– It is not possible to introduce new modelling concepts
that cannot be expressed by extending existing UML elements.
• The use of UML does require familiarity with modelling concepts.
36© 2005-2006 The ATHENA Consortium.
Eclipse Technologies: Eclipse Modeling Framework (EMF)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-19
37© 2005-2006 The ATHENA Consortium.
Eclipse Modelling Framework (EMF 2.2.0)
• Java Framework and code generation facility• Evolved implementation of MOF specifications• Unifying of Java, XML and parts of UML• Standard serialization in form of XMI• Uses Ecore to represent EMF models
– MOF-like core meta model– Ecore is also an EMF model and therefore its own
meta-model
38© 2005-2006 The ATHENA Consortium.
Making the metamodel(EClass)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-20
39© 2005-2006 The ATHENA Consortium.
Making the metamodel (Generalization)
40© 2005-2006 The ATHENA Consortium.
Eclipse Technologies: Eclipse Graphical Modeling Framework
(GMF)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-21
41© 2005-2006 The ATHENA Consortium.
Graphical Modelling Framework (GMF)
• The Eclipse Graphical Modeling Framework(GMF) provides a generative component and runtime infrastructure for developing graphicaleditors based on EMF and GEF.
• GMF v.1.0 released June 28, 2006
42© 2005-2006 The ATHENA Consortium.
GMF overview
• GMF uses and depends on EMF and GEF– EMF:
• Core facility for defining models• generates java code for manipulating and persisting model
insances
– GEF:• Manipulates object models
• Simplifies combination of EMF and GEF• Generates GEF editors for manipulating EMF
models
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-22
43© 2005-2006 The ATHENA Consortium.
Editor Generation Overview
44© 2005-2006 The ATHENA Consortium.
The Editor
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-23
45© 2005-2006 The ATHENA Consortium.
Example #1: Metamodels and UML profiles for service-oriented
architectures (SOAs) and Web services
46© 2005-2006 The ATHENA Consortium.
Metamodel and profile development
1. MetamodelScope,
concepts, style
3. TestEvaluate in
user scenarios
2. UML profileMap
metamodel concepts to
UML
4. FeedbackAdd, remove, and modify concepts
Understanding of SOA concepts and interoperability issues• Initial (interoperability) requirements• SOA concepts• Partitioning of the metamodel into structures• Architectural style for developing interoperable software systems• Document the metamodel in RSM (.uml2) and develop it in EMF (.ecore)
Define how SOA models should be specified using UML• Map metamodel concepts to
UML types• Define UML stereotypes and
tagged values• Define new visual symbols• Define model views• Define validation rules• Implement UML profile in RSM
Evaluate and test UML profile in user scenarios• Four ATHENA use cases (pilots)
Feedback• Iterative development• Modifications according
to test and evaluation
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-24
47© 2005-2006 The ATHENA Consortium.
Characteristics for metamodel
• Suited for target roles– Support domain concepts and scenarios of target roles– Ease-of-use and understandable for business modeller (use terms)– Support precise details and correctness for solution architect
• Avoid unnecessary complexity– Keep it simple stupid (KISS)– Number of elements and associations– Type and navigation of associations
• Make it modular– Provide core with extensions– Define and illustrate possible subsets (”dialects”) that support scenarios– Consider integration and extension points
• Suited for implementation– EMF representation– Transformation from/to UML profile– Transformation to PSM
48© 2005-2006 The ATHENA Consortium.
PIM4SOA objectives
• Platform independent model for specifying service-oriented architectures– Represent SOA solutions in a platform independent
way– Integrate and define mappings to Web services,
agents, peer-to-peer (P2P) and Grid execution platforms.
– Bridging the gap between the enterprise layer and the technical layer
– Establishing relationships between layers through model-based transformations
– Two-way transformations supporting both• model-driven development (MDD); and• architecture-driven modernisation (ADM)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-25
49© 2005-2006 The ATHENA Consortium.
PIM4SOA requirements
Depending on the source of requirements• From the enterprise or business viewpoint
– Process, Organisation, Product and System (POPS) dimensions
– Mapping enterprise and business model elements to PIM4SOA
• From the platform point of view– What are the necessary PSM elements to be
represented at PIM level?– How do we identify these elements?– We need identify overlapping elements amongst
platforms
50© 2005-2006 The ATHENA Consortium.
PIM4SOA profile implementation platform
PIM4SOA
GRIDP2PBDI Teams
WSA
PIM4SOAUML Profile
Aris Grai Metis Moogo POP*
Business expert
IT infrastructure
GAP
CIM
PIM
PSM
eCore, MTF
RSM
eCore, ATL, MOFScript
EMF eCore
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-26
51© 2005-2006 The ATHENA Consortium.
PIM4SOAMetamodel
Web ServicesMetamodel
Agent Metamodel(AgentMM)
P2PMetamodel
GridMetamodel
PIM
PSM
s
Symbols
Metamodel
Concept
RelationshipCorrespondence
PIM4SOA → platform specific models
52© 2005-2006 The ATHENA Consortium.
Metamodel for (software) services Metamodel for (automated software) processes
Metamodel for information Metamodel for quality of service (QoS)
PIM4SOA addresses four system aspects
Services are an abstraction and an encapsulation of the functionality provided by an autonomous entity. Service architectures are composed of functions provided by a system or a set of systems to achieve a shared goal.
Web Services Architecture as proposed by W3C (W3C 2004)UML Profile for Enterprise Distributed Object Computing (OMG 2002)
Information is related to the messages or structures exchanged, processed and stored by software systems or software components.
Structural constructs for class modelling in UML 2.0 (OMG 2003)UML Profile for Enterprise Distributed Object Computing (OMG 2002)
Processes describe sequencing of work in terms of actions, control flows, information flows, interactions, protocols, etc.
Business Process Definition Metamodel(BPDM) (IBM et al. 2004)UML Profile for Enterprise Distributed Object Computing (OMG 2002)
Extra-functional qualities that can be applied to services, information and processes.
UML Profile for Modeling Quality of Service and Fault Tolerance Characteristics and Mechanisms (OMG 2004)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-27
53© 2005-2006 The ATHENA Consortium.
PIM4SOA metamodel description
• Service Oriented Metamodel– has the objective of describing service architectures
as proposed by the W3C – represent the functionalities provided by a system or a
set of systems to achieve a shared goal• Information Oriented Metamodel
– starting point are the UML constructs used in “plain vanilla” class modelling
– based on EDOC as well as on the Class related parts of the UML metamodel
• Process Oriented Metamodel• Non-functional oriented metamodel
54© 2005-2006 The ATHENA Consortium.
Information metamodel
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-28
55© 2005-2006 The ATHENA Consortium.
PIM datatypes
• Requirements– Base types: There must be a small set of base types that represents the
basic needs for identifying types for model properties.
– Constructed types: It must be possible to construct more complex data types from simple ones (base types).
– Platform independence: The types for PIM modelling should be independent of any target platform or language and not assume any specific representation for a type.
– Constraints on types: Constraints for types should be supported.
– Types as parameters – what are their semantics?
56© 2005-2006 The ATHENA Consortium.
UML extensions for PIM4SOA modelling
• UML extensions for Service Modelling
• UML Extensions for Process Modelling
• UML Profile for Information Modelling
• UML Extensions for QoS Modelling
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-29
57© 2005-2006 The ATHENA Consortium.
UML profile for XSD (1)Stereotype UML
construct Tagged value Description
<<any>> Class, Property
The stereotyped class or attribute will be relaced by an 'any' or 'anyAttribute' element. The tagged values are copied into the corresponding attributes of the generated element
namespace As defined in XML Schema specification processContents As defined in XML Schema specification
• values="skip | lax | strict" • default="strict"
<<attribute>> Property Assigned to UML attribute or association end. Indicates item is to be generated as an attribute within complexType and not as an element
default As defined in XML Schema specification fixed As defined in XML Schema specification form Overrides the attributeFormDefault for this
schema • values="qualified | unqualified"
use As defined in XML Schema specification • values="prohibited | optional | required" • default="optional"
<<choice>> Class Elements marked with this stereotype represent a Choice model group conatined within a complexType definition
<<complexType>> Class ComplexType definition generated in XML Schema
memberNames Overrides the package-level default for naming complexType definitions • values="qualified | unqualified"
58© 2005-2006 The ATHENA Consortium.
PIM4SOAMetamodel
Web ServicesMetamodel
Agent Metamodel(AgentMM)
P2PMetamodel
GridMetamodel
PIM
PSM
s
Symbols
Metamodel
Concept
RelationshipCorrespondence
PIM4SOA → platform specific models
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-30
59© 2005-2006 The ATHENA Consortium.
Web services architecture metamodel
Registry<<Metamodel>>
+ UDDI.
Endpoint Description<<Metamodel>>
+ WS-MetadataExchange.+ WS-Policy.
+ WS-PolicyAttachement.
Service Interface Description
<<Metamodel>>
+ WSDL 1.1.+ WSDL 2.0.
Reliability<<Metamodel>>
+ WS-ReliableMessaging.Coordination
<<Metamodel>>
+ WS-Coordination.
Eventing<<Metamodel>>
+ WS-BaseNotification.+ WS-BrokeredNotification.
+ WS-Eventing.+ WS-Topics.
Resource Access and Management
<<Metamodel>>
+ WS-Enumeration.+ WS-Resource.
+ WS-ResourceLifetime.+ WS-ResourceProperty.
+ WS-Transfer.
Transport<<Metamodel>>
+ HTTP.
Messaging<<Metamodel>>
+ SOAP.+ WS-Addressing.
XML<<Metamodel>>
+ XML Core / XSD.+ XML Encryption.+ XML Signature.
+ XPATH.
Security<<Metamodel>>
+ WS-Security.
eContract<<Metamodel>>
+ ATHENA eContract Extensions.
Composition<<Metamodel>>
+ ACE-GIS Composition Extensions.+ WS-BPEL.+ WS-CDL.
60© 2005-2006 The ATHENA Consortium.
UML profile for Web services
• Web Service Basic Profile– This plugin implements the base UML modelling support for how to
specify and develop Web services.– This plugin can be extended with other specific Web service technology
profiles (e.g. XSD, WSDL and BPEL) each covering different parts of the Web service stack.
• UML Profile for XSD– This plugin implements UML modelling support for XML schema
definitions• UML Library for XSD
– This plugin defines XSD types to be used when modelling XML schema definitions in UML.
• UML Profile for WSDL– This plugin implements UML modelling support for WSDL.
• UML Profile for BPEL– This plugin implements UML modelling support for BPEL.
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-31
61© 2005-2006 The ATHENA Consortium.
XSD metamodel
62© 2005-2006 The ATHENA Consortium.
XSD metamodel (simplified)
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-32
63© 2005-2006 The ATHENA Consortium.
UML profile for XSD (1)Stereotype UML
construct Tagged value Description
<<any>> Class, Property
The stereotyped class or attribute will be relaced by an 'any' or 'anyAttribute' element. The tagged values are copied into the corresponding attributes of the generated element
namespace As defined in XML Schema specification processContents As defined in XML Schema specification
• values="skip | lax | strict" • default="strict"
<<attribute>> Property Assigned to UML attribute or association end. Indicates item is to be generated as an attribute within complexType and not as an element
default As defined in XML Schema specification fixed As defined in XML Schema specification form Overrides the attributeFormDefault for this
schema • values="qualified | unqualified"
use As defined in XML Schema specification • values="prohibited | optional | required" • default="optional"
<<choice>> Class Elements marked with this stereotype represent a Choice model group conatined within a complexType definition
<<complexType>> Class ComplexType definition generated in XML Schema
memberNames Overrides the package-level default for naming complexType definitions • values="qualified | unqualified"
64© 2005-2006 The ATHENA Consortium.
UML profile for XSD (2) mixed Determines whether this element may contain
mixed element and character content. • values="true | false" • default="false"
modelGroup Overrides the package-level default model group • values="all | sequence | choice"
<<element>> Property Assigned to UML attribute or association end. Indicates item is to be generated as element within complexType and not as attribute
anonymousRole The class type will be directly embedded within the complexType definition. Omit attribute or role type wrapper • values="true | false" • default="false"
anonymousType The class type will be anonymous for XML documents generated by the schema • values="true | false" • default="false"
form Overrides the elementFormDefault for this schema • values="qualified | unqualified"
position If assigned, indicates position in the sequence model group
<<facet>> Property A facet is a single defining aspect of a value space. Generally speaking, each facet characterizes a value space along independent
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-33
65© 2005-2006 The ATHENA Consortium.
UML profile for XSD (3)UML representation Text representation
66© 2005-2006 The ATHENA Consortium.
References
Principles of Model-Driven Interoperability - Part 5-2 Version 5
© 2005-2006 The ATHENA Consortium. 3-34
67© 2005-2006 The ATHENA Consortium.
References
[Atkinson and Kühne 2003] C. Atkinson and T. Kühne, "Model-Driven Development: A Metamodeling Foundation", IEEE Software, vol. 20, no. 5, pp. 36-41, 2003. http://www.mm.informatik.tu-darmstadt.de/staff/kuehne/publications/papers/mda-foundation.pdf
[Clark, et al. 2004] T. Clark, A. Evans, P. Sammut, and J. Willans, "Applied Metamodelling- A Foundation for Language Driven Development, Version 0.1", 2004. http://albini.xactium.com/web/index.php?option=com_remository&Itemid=54&func=select&id=1
[Seidewitz 2003] E. Seidewitz, "What Models Mean", IEEE Software, vol. 20, no. 5, pp. 26-32, 2003.
[Swithinbank, et al. 2005] P. Swithinbank, M. Chessell, T. Gardner, C. Griffin, J. Man, H. Wylie, and L. Yusuf, "Patterns: Model-Driven Development Using IBM RationalSoftware Architect", IBM, Redbooks, December 2005. http://www.redbooks.ibm.com/redbooks/pdfs/sg247105.pdf
68© 2005-2006 The ATHENA Consortium.
This course has been developed under the funding of the EC with the support of the EC ATHENA-IP Project.
Disclaimer and Copyright Notice: Permission is granted without fee for personal or educational (non-profit) use, previous notification is needed. For notification purposes, please, address to the ATHENA Training Programme Chair at [email protected]. In other cases please, contact at the same e-mail address for use conditions. Some of the figures presented in this course are freely inspired by others reported in referenced works/sources. For such figures copyright and all rights therein are maintained by the original authors or by other copyright holders. It is understood that all persons copying these figures will adhere to the terms and constraints invoked by each copyright holder.