Eclipse Modeling Framework (EMF) Developer Guide http://127.0.0.1:50338/help/advanced/print.jsp?topic=/../nav/14_7_2
第3页 共215页 2008-4-11 13:38
4.1.107.
org.eclipse.emf.importer.ui.contribution
4.1.108.
org.eclipse.emf.importer.ui
4.1.109.
org.eclipse.emf.importer.util
4.1.110. org.eclipse.emf.mapping.action
4.1.111.
org.eclipse.emf.mapping.command
4.1.112.
org.eclipse.emf.mapping.domain
4.1.113. org.eclipse.emf.mapping.ecore2ecore.action
4.1.114.
org.eclipse.emf.mapping.ecore2ecore.impl
4.1.115. org.eclipse.emf.mapping.ecore2ecore
4.1.116. org.eclipse.emf.mapping.ecore2ecore.presentation
4.1.117.
org.eclipse.emf.mapping.ecore2ecore.provider
4.1.118. org.eclipse.emf.mapping.ecore2ecore.util
4.1.119. org.eclipse.emf.mapping.ecore2xml.action
4.1.120.
org.eclipse.emf.mapping.ecore2xml.impl
4.1.121.
org.eclipse.emf.mapping.ecore2xml
4.1.122. org.eclipse.emf.mapping.ecore2xml.presentation
4.1.123.
org.eclipse.emf.mapping.ecore2xml.provider
4.1.124.
org.eclipse.emf.mapping.ecore2xml.ui
4.1.125. org.eclipse.emf.mapping.ecore2xml.util
4.1.126.
org.eclipse.emf.mapping.impl
4.1.127.
org.eclipse.emf.mapping
4.1.128. org.eclipse.emf.mapping.presentation
4.1.129.
org.eclipse.emf.mapping.provider
4.1.130.
org.eclipse.emf.mapping.util
1.1. The Eclipse Modeling Framework (EMF) Overview
Last updated: June 16, 2005 (accessibility update)
This paper presents a basic overview of EMF and its code generator patterns. For a more complete description of
all the features of EMF, refer to
Eclipse Modeling Framework (Addison Wesley, 2003) or to the Javadoc for the
framework classes themselves.
Introduction
EMF is a Java framework and code generation facility for building tools and other applications based on a
structured model. For those of you that have bought into the idea of object-oriented modeling, EMF helps you
rapidly turn your models into efficient, correct, and easily customizable Java code. For those of you that aren't
necessarily sold on the value of formal models, EMF is intended to provide you with the same benefits and a very
low cost of entry.
So, what do we mean when we say model? When talking about modeling, we generally think about things like
Class Diagrams, Collaboration Diagrams, State Diagrams, and so on. UML (Unified Modeling Language) defines a
(the) standard notation for these kinds of diagrams. Using a combination of UML diagrams, a complete model of an
application can be specified. This model may be used purely for documentation or, given appropriate tools, it can
be used as the input from which to generate part of or, in simple cases, all of an application.
Given that this kind of modeling typically requires expensive Object Oriented Analysis and Design (OOA/D) tools,
you might be questioning our assertion, above, that EMF provides a low cost of entry. The reason we can say that
is because an EMF model requires just a small subset of the kinds of things that you can model in UML, specifically
simple definitions of the classes and their attributes and relations, for which a full-scale graphical modeling tool is
unnecessary.
While EMF uses XMI (XML Metadata Interchange) as its canonical form of a model definition
[1]
, you have several
ways of getting your model into that form:
Create the XMI document directly, using an XML or text editor
Export the XMI document from a modeling tool such as Rational Rose
Annotate Java interfaces with model properties
Use XML Schema to describe the form of a serialization of the model
The first approach is the most direct, but generally only appeals to XML gurus. The second choice is the most
desirable if you are already using full-scale modeling tools. The third approach provides pure Java programmers a
low-cost way to get the benefits of EMF and its code generator using just a basic Java development environment
(for example, Eclipse's Java Development Tools). The last approach is most applicable in creating an application
that must read or write a particular XML file format.
评论3
最新资源