Resource Utility: directly open an editor, import/export
- The ejdo file
- Open Resource
- Export/Import to and from XMI or XML
- Throubleshooting: empty editor when opening resource, can not add
- Throubleshooting: the editor is not started but instead the ejdo file is opened in the text editor
- Throubleshooting: editor does not start, AssertionFailedException
- Future extensions
As part of the EMF JPOX plugin install a separate utility is also installed. This utility can be used to directly open a relational JPOX controlled database in the generated EMF editor.
This resource utility is an alpha version and is in many ways very basic. It may or may not be usefull for you, it will be extended in the future.
The ejdo file
The resource utility operates on files with the extension ejdo. This file contains registration and database connection information for a Persistence Manager Factory. An example ejdo file with a description of its content can be downloaded here: library.ejdo.
Open Resource
When rightclicking on an ejdo file the Teneo menu option is displayed. Within this menu the option Open Resource is shown. Choosing this option will open a EMF editor which reads its contents from the connection/session information in the ejdo file.
Export/Import to and from XMI or XML
The XML/XMI export function can be used to make a backup of your current data and import this again later in an empty database. The main drawback of the XML/XMI import is that it will add all the content to the database and will not check if the content already exists in the database. Note that the XMI export/import is more powerfull (than XML) because it supports export/import of multiple root objects.
Throubleshooting: empty editor when opening resource, can not add
When you open an empty resource (relational database) by right clicking on the ejdo file an editor is opened which does not allow you to add the first document. This is a restriction of the generated EMF editor. So you should always have at least one document in the resource. This document can be created by importing from a XML document or by using the standard EMF open model wizard.
Throubleshooting: the editor is not started but instead the ejdo file is opened in the text editor
This happens when the ejdo file is already open in a text editor. This can happen because you need to edit the properties in a text editor. So first close the text editor with the ejdo file and then choose 'Open Resource'.
Throubleshooting: editor does not start, AssertionFailedException
See here in the troubleshooting page.
Future extensions
- Instead of a property file offer a more advanced ui
- Extend the export/import to support different modes such as overwrite existing documents, add to the relational store etc.
- Support for xsl transformations when exporting/importing
- Export subsets of the relational store using HQL queries or other filtering
Please post a message on the newsgroup if you have other ideas or requirements for resource utilities.