1、 Reference number ISO/IEC 19508:2014(E) ISO/IEC 2014INTERNATIONAL STANDARD ISO/IEC 19508 First edition 2014-04-15 Information technology Object Management Group Meta Object Facility (MOF) Core ISO/IEC 19508:2014(E) COPYRIGHT PROTECTED DOCUMENT ISO/IEC 2014 All rights reserved. Unless otherwise speci
2、fied, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or IS
3、Os member body in the country of the requester. ISO copyright office Case postale 56 CH-1211 Geneva 20 Tel. + 41 22 749 01 11 Fax + 41 22 749 09 47 E-mail copyrightiso.org Web www.iso.org Published in Switzerland ii ISO/IEC 2014 All rights reservedISO/IEC 19508:2014(E) ISO/IEC 2014 - All rights rese
4、rved iii Table of Contents 1 Scope 1 2 Conformance 1 3 Normative References 2 4 Terms and Definitions . 2 5 Symbols 3 6 Additional Information . 3 6.1 General Information 3 6.2 Structure of the MOF 2 Specification 3 7 MOF Architecture (informative) . 5 7.1 General . 5 7.2 MOF 2 Design Goals . 5 7.3
5、How Many Meta Layers? 6 7.4 Reuse of Common Core Packages by UML 2 and MOF 2 . 7 8 Language Formalism 9 8.1 General . 9 8.2 Metamodel Specification . 9 8.3 Using Packages to Partition and Extend Metamodels 9 9 Reflection 11 9.1 General . 11 9.2 Element . 11 9.3 Factory 13 9.4 Object 149.4.1 Operatio
6、ns 14 10 Identifiers . 17 10.1 General . 17 10.2 Extent 17 10.3 URIExtent 18 10.4 MOF:Common 19 10.5 ReflectiveCollection . 19 10.6 ReflectiveSequence 20 11 Extension . 23 11.1 General . 23 11.2 Tag 23ISO/IEC 19508:2014(E) iv ISO/IEC 2014 - All rights reserved 12 The Essential MOF (EMOF) Model 25 12
7、.1 General 25 12.2 EMOF Merged Model 26 12.3 Merged Elements from MOF . 28 12.4 EMOF Constraints . 29 12.5 EMOF Definitions and Usage Guidelines for the UML Models . 31 12.6 Predefined Tags 32 13 CMOF Reflection . 35 13.1 General 35 13.2 Link 36 13.3 Argument . 37 13.4 Object 37 13.5 Element . 38 13
8、.6 Factory 38 13.7 Extent 38 14 The Complete MOF (CMOF) Model . 41 14.1 General 41 14.2 Elements used from UML 2 . 42 14.3 Imported Elements from MOF . 42 14.4 CMOF Constraints . 43 14.5 CMOF Extensions to Capabilities 4514.5.1 Reflection 4514.5.2 Extension 45 15 CMOF Abstract Semantics 47 15.1 Gene
9、ral 47 15.2 Approach . 47 15.3 MOF Instances Model . 47 15.4 Remarks on MOF Instance Modeling 50 15.5 Object Capabilities 50 15.6 Link Capabilities 52 15.7 Factory Capabilities . 52 15.8 Extent Capabilities . 53 15.9 Additional Operations 55 Annex A - XMI for MOF 2 Core 59 Annex B - Metamodel Constr
10、aints in OCL61 Annex C - Migration from MOF 1.4.63 Annex D - Bibliography.69 Annex E - Legal Information.71 Annex F - Acknowledgments75 ISO/IEC 19508:2014(E) ISO/IEC 2014 - All rights reserved v Foreword ISO (the International Organization for Standardization) and IEC (the International Electrotechn
11、ical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical act
12、ivity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information technology, ISO and IEC have established a joint technical comm
13、ittee, ISO/IEC JTC 1. International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2. The main task of the joint technical committee is to prepare International Standards. Draft International Standards adopted by the joint technical committee are circulated
14、to national bodies for voting. Publication as an International Standard requires approval by at least 75% of the national bodies casting a vote. Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. ISO and IEC shall not be held respons
15、ible for identifying any or all such patent rights. ISO/IEC 19508 was prepared by the Object Management Group (OMG) and was adopted, under the PAS procedure, by Joint Technical Committee ISO/IEC JTC 1, Information technology, in parallel with its approval by national bodies of ISO and IEC. ISO/IEC 1
16、9508 is related to: ISO/IEC 19505-2:2012 Information technology - Object Management Group Unified Modeling Language (OMG UML), Superstructure ISO/IEC 19509:2014 Information technology - Object Management Group XML Metadata Interchange ISO/IEC 14769, Information technology - Open Distributed Processi
17、ng - Type Repository Function ISO/IEC 19508, under the general title Information technology - Object Management Goup - Meta Object Facility (MOF) Core, apart from this introductory material, is identical with that for the OMG specification for Meta Object Facility (MOF) Core version 2.4.2.ISO/IEC 19
18、508:2014(E) vi ISO/IEC 2014 - All rights reserved Introduction The Meta-Object Facility (MOF) International Standard defines a language architecture and metamodel (defined using MOF) that can be used to define and manipulate a set of interoperable metamodels and their corresponding models. These int
19、eroperable metamodels include the Unified Modeling Language (UML) metamodel (ISO/IEC 19505), the MOF meta- metamodel, as well as standard technologies specified using metamodels. The MOF provides the infrastructure for implementing design and reuse repositories, application development tool framewor
20、ks, etc. Mappings from MOF to W3C XML and XSD are specified in the XMI (ISO/IEC 19509) International Standard. Mappings from MOF to Java TMare in the JMI (Java Metadata Interchange) specification defined by the Java Community Process. This International Standard does not deprecate or replace the exi
21、sting standard ISO/IEC 19502:2005, Information technology - Meta Object Facility (MOF). The specification provided by this International Standard is identical to the OMG specification MOF Core 2.4.2, that is aligned with UML 2.4.1 (ISO/IEC 19505) UML2Sup and XMI 2.4.2 (ISO/ IEC 19509) XMI24. While M
22、OF 2.4.2 MOF2 is conceptually similar to MOF 1.4 MOF1, it is not backward compatible, as UML 2.4.1 is not backward compatible with UML 1.4.2 UML1, and XMI 2.4.2 XMI24 is not compatible with XMI 2.0 XMI2. In order to achieve architectural alignment considerable effort has been expended to base UML an
23、d MOF on the same metamodel, the UML metamodel. The MOF metamodel is derived from the UML metamodel by applying a well-defined set of constraints. Two sets of such constraints are defined in this document, yielding in either the Essential MOF (EMOF) or the Complete MOF (CMOF) metamodel. This alignme
24、nt ensures semantic compatibility between MOF-based and UML models, also allows the MOF to reuse the UML notation for visualizing of MOF metamodels. UML 2.4.1 is defined in ISO/IEC 19505. While not limited to this context, the MOF International Standard is closely related to work on the standardizat
25、ion of Open Distributed Processing (ODP). In particular, the ODP Type Repository Function (ISO/IEC 14769| Rec.X.960) references the OMG Meta Object Facility, version 1.3. This function specifies how to use the OMG MOF as a repository for ODP types. INTERNATIONAL STANDARD ISO/IEC 19508:2014(E) ISO/IE
26、C 2014 - All rights reserved 1 Information technology - Object Management Group Meta Object Facility (MOF) Core 1S c o p e This International Standard provides the basis for metamodel definition in OMGs family of MDA languages and is based on a simplification of UML2s class modeling capabilities. In
27、 addition to providing the means for metamodel definition it adds core capabilities for model management in general, including Identifiers, a simple generic Tag capability and Reflective operations that are defined generically and can be applied regardless of metamodel. MOF 2 Core is built on by oth
28、er OMG MOF specifications, including the following (in this list MOF based model means any model that instantiates a metamodel defined using MOF, which includes metamodels themselves): XMI - for interchanging MOF-based models in XML XMI24 MOF 2 Facility and Object Lifecycle - for connecting to and m
29、anaging collections of MOF-based model elements MOFFOL MOF 2 Versioning and Development Lifeycle - for managing versions and configurations of MOF-based models MOFVD MOF Queries Views and Transformations - for transforming MOF-based models QVT MOF Models to Text - for generating text, such as progra
30、ms, from MOF-based models MOFM2T Object Constraint Language - for specifying constraints on MOF-based models OCL 2 Conformance There are two compliance points: Essential MOF (EMOF) Complete MOF (CMOF) Compliant implementations may support EMOF only, see sub clause 12.4 for further detail, or may sup
31、port CMOF, which includes EMOF. See sub clause 14.4 for detail. All compliant implementations shall conform to the MOF Platform-Independent Model specified in Clause 15 and support the technology mapping specified in the XML Metadata Interchange (XMI) specification XMI24. ISO/IEC 19508:2014(E) 2 ISO
32、/IEC 2014 - All rights reserved 3 Normative References The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) app
33、lies. Readers of this MOF 2 Core specification are expected to be familiar with the UML specification since UML provides the structures forming MOF metamodels. The structures supported by MOF are at the level of those in the UML 2 Infrastructure: specifically the Basic package for the EMOF complianc
34、e level and Constructs for the CMOF compliance level. However, for ease of definition, MOF uses full UML Superstructure models directly, albeit with constraints (defined in the chapters for EMOF and CMOF). Hence the normative reference is the Classes clause of the following specification: UML2Sup IS
35、O/IEC 19505-2:2012 “Information technology - Object Management Group Unified Modeling Language (OMG UML), Superstructure” (OMG Unified Modeling Language (OMG UML), Superstructure http:/ www.omg.org/spec/UML/2.4.1/Superstructure) The mandatory mapping of MOF to XMI is specified at: XMI24 ISO/IEC 1950
36、9:2014 “Information technology - Object Management Group XML Metadata Interchange (XMI)” (XML Metadata Interchange - http:/www.omg.org/spec/XMI/2.4.2) Formal constraints are expressed in OCL, which is specified at: OCL ISO/IEC 19507:2012 “Information technology - Object Management Group Object Const
37、raint Language (OCL)” (OMG Object Constraint Language (OCL) - http:/www.omg.org/spec/OCL/2.3.1) The following reference is used in MOF1 to MOF2 migration Annex: MOF1 ISO/IEC 19502:2005 “Meta Object Facility (MOF) Specification Version 1.4.1” (OMG Meta Object Facility (MOF) Specification (Version 1.4
38、) - http:/www.omg.org/spec/MOF/1.4) The mandatory mapping of MOF to XMI is specified at: XMI24 ISO/IEC 19509:2014 “Information technology - Object Management Group XML Metadata Interchange (XMI)” (XML Metadata Interchange - http:/www.omg.org/spec/XMI/2.4.2) Formal constraints are expressed in OCL, w
39、hich is specified at: OCL ISO/IEC 19507:2012 “Information technology - Object Management Group Object Constraint Language (OCL)” (OMG Object Constraint Language (OCL) - http:/www.omg.org/spec/OCL/2.3.1) 4 Terms and Definitions NULL Null is used in this International Standard to indicate the absence
40、of a value. for example, a single-valued property that is null has no value, and when an operations returns null, it is returning no value. ISO/IEC 19508:2014(E) ISO/IEC 2014 - All rights reserved 3 5 Symbols MOF 2 reuses the subset of the structural modeling symbols from UML 2 that is needed for cl
41、ass modeling. MOF 2 does not define any additional symbols. See the UML superstructure specification UML2Sup for the symbol definitions. 6 Additional Information 6.1 General Information Incompatible and often proprietary metadata across different systems is a primary limitation on data exchange and
42、application integration. Metadata are data about data. They are the data used by tools, databases, middleware, etc. to describe structure and meaning of data. The Meta Object Facility (MOF) provides an open and platform-independent metadata management framework and associated set of metadata service
43、s to enable the development and interoperability of model and metadata driven systems. Examples of systems that use MOF include modeling and development tools, data warehouse systems, metadata repositories, etc. MOF has contributed significantly to the core principles of the OMG Model Driven Archite
44、cture. Building on the modeling foundation established by UML, MOF introduced the concept of formal metamodels and Platform Independent Models (PIM) of metadata (examples include several standard OMG metamodels including UML, MOF itself, CWM, SPEM, Java EJB, EDOC, EAI, etc.) as well as mappings from
45、 PIMs to specific platforms (Platform Specific Models and mapping examples include MOF-to-Text mapping in the MOF-to-Text specification MOFM2T, MOF-to-XML mapping in the XMI specification XMI24, MOF-to-XML Schema mapping in the XMI production of XML Schema specification XMI24, and MOF-to-Java in the
46、 JMI specification). The OMG adopted the MOF 1.1 specification in November 1997 coincident with the adoption of UML 1.1. In March 2003, the significantly re-architected MOF 2.0 Core was adopted by the OMG, aligned with the then also adopted UML 2.0. The alignment between MOF and UML was then complet
47、ed with MOF 2.4 and UML 2.4 by sharing the same metamodel for the definition of UML and MOF, using OCL constraints to define the metamodel subset relevant for MOF. The resulting MOF specification is presented in this document and referred to as “MOF 2” to distinguish it from the MOF 1.4 specificatio
48、n, which continues to exist as OMG specification and the ISO/IEC 19505 international standard. MOF 2 is represented by a set of specifications: MOF 2 Core MOF2, MOF 2 XMI Mapping (now titled XML Metadata Interchange) XMI24, MOF 2 Facility and Object Lifecycle MOFFOL, MOF 2 Versioning and Development
49、 Lifecycle MOFVD, MOF 2 Query/View/Transformations QVT, MOF Model to Text MOFM2T. 6.2 Structure of the MOF 2 Specification MOF 2 reuses the structural modeling capabilities of UML 2, based on the common metamodel shared between UML 2 and MOF 2. The OCL constraints limiting this metamodel to the MOF 2 - relevant subsets are defined in C