Last updated: July 6, 2005
Load XML without schema
Similarly to SAX and DOM, EMF can now load any XML document without the need to specify a schema for the document. The implementation will use xsi:schemaLocation or noNamespaceSchema location attributes to locate a schema; or, if no schema is located will treat the content as XML Schema wildcard. In the case schema is located, the implementation will dynamically generate Ecore and use it to validate the document. To use this functionality, register the org.eclipse.emf.ecore.xmi.impl.GenericXMLResourceFactoryImpl for a file extension you want to process. For more information see the EMF FAQ.
DOM and XPath
EMF now provides a way to load EMF resources using DOM as an input source, as well as serializing EMF resources to DOM trees. To load an EMF resource from DOM use XMLResource.load(Node, Map) methods; to save an EMF resource to DOM use XMLResource.save(Document,Map,DOMHandler) (see org.eclipse.emf.ecore.xmi).
EMF natively does not support XPath. However, using new functionality in EMF 2.1, you can convert your EMF resource to a DOM tree, run XPath queries on those DOM nodes, and then iterate via Node result sets using the DOMHandler API to get ahold of the corresponding EMF Objects.
EMF & SDO Runtime Performance
In this release, the EMF team was focused on improving performance of the EMF runtime. In particular, we improved XML and XMI serialization/deserialization performance. Improved performance for EMF accessors, copy, reduced footprint of EMF models. For more information see EMF performance.
This release adds support to resume recording (see beginRecording(ChangeDescription, Collection) in org.eclipse.emf.ecore.change.util.ChangeRecorder).
In addition, EMF 2.1 provides a mechanism for recording and applying changes for FeatureMaps to help to provide complete redo/undo capabilities for models that use FeatureMaps.
Improved Generator Capabilities
EMF now provides an extension point so that model importers can be added to the framework: org.eclipse.emf.importer.modelImporterDescriptors. The existing importers (Rose, XML Schema, annotated Java interfaces and Ecore model) were refactored into this design, being contributed by different plugins. EMF now also includes a provisional API that can be used by anyone to provide their own importer.
JET (Java Emitter Templates) now supports conditional inclusion, specified by a fail="silent" or fail="alternative" attribute on the include directive. EMF's templates use conditional includes quite extensively, to allow more flexible overriding and inserting of sections.
Users can now easily customize the packages into which code will be generated, allowing them to, for example, generate their implementation classes in an "internal" package.
Multiplicities on operations and parameters are now fully supported in code generation.
A new generator action, "Generate Test Code" generates JUnit test skeletons for testing volatile features and operations, as well some example code for working with the model in a standalone context.