| <?xml version="1.0" encoding="ISO-8859-1"?><!-- |
| Copyright (c) 2005, 2006, 2007 Springsite BV (The Netherlands) and others |
| All rights reserved. This program and the accompanying materials |
| are made available under the terms of the Eclipse Public License v1.0 |
| which accompanies this distribution, and is available at |
| http://www.eclipse.org/legal/epl-v10.html |
| --><!-- |
| @author <a href="mtaal@elver.org">Martin Taal</a> |
| @version $Revision: 1.10 $ $Date: 2007/02/05 20:12:02 $ |
| --><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "document-v13.dtd"> |
| <document> |
| 	<header> |
| 		<title>Resource Utility: directly open an editor, import/export</title> |
| 	</header> |
| 	<body> |
| 		<p>As part of the EMF Hibernate plugin install a separate utility is also installed. |
| 			This utility can be used to directly open a relational Hibernate database in |
| 			the generated EMF editor. |
| 		</p> |
| 		<p><em>This resource utility is in many |
| 		ways very basic. It may or may not be usefull for you and will be extended in the future.</em></p> |
| 		<section><title>The ehb file</title> |
| 		<p>The resource utility operates on files with the extension <em>ehb</em>. This file |
| 		contains registration and database connection information for a Session Factory. |
| 		An example ehb file with a description of its content can be downloaded here: |
| 			<link href="samples/library.ehb">library.ehb</link>.</p> |
| 		<p><em/></p> |
| 		</section> |
| 		<section><title>Open Resource</title> |
| 		<p>When rightclicking on an ehb file the Teneo menu option is displayed. Within this |
| 		menu the option <em>Open Resource</em> is shown. Choosing this option will open a |
| 		EMF editor which reads its contents from the connection/session information in the |
| 		ehb file.</p> |
| 		<p> |
| 		<img src="images/resourceutility.jpg" alt="Resource utility"/>		 |
| 		</p> |
| 		</section> |
| 		<section><title>Export/Import to and from XMI or XML</title> |
| 			<p>The XML/XMI export |
| 				function can be used to make a backup of your current data and import this |
| 				data again in an empty (new) 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.</p> |
| 		</section> |
| 		<section><title>Throubleshooting: empty editor when opening resource, can not add</title> |
| 		<p>When you open an empty resource (relational database) by right clicking on the |
| 			ehb 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.</p> |
| 		</section> |
| 		<section><title>Throubleshooting: the editor is not started but instead the ehb file is opened in the text editor</title> |
| 		<p>This happens when the ehb 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 ehb file and then choose 'Open Resource'.</p> |
| 		</section> |
| 				<section><title>Throubleshooting: editor does not start, AssertionFailedException</title> |
| 		<p>See <link href="troubleshooting.html#Editor+does+not+start%2C+AssertionFailedException">here</link> |
| 		in the troubleshooting page.</p> |
| 		</section> |
| 		 |
| 		<section><title>Future extensions</title> |
| 			<ul> |
| 				<li>Instead of a property file offer a more advanced ui</li> |
| 				<li>Extend the export/import to support different modes such as |
| 					overwrite existing documents, add to the relational store etc.</li> |
| 				<li>Support for xsl transformations when exporting/importing</li> |
| 				<li>Export subsets of the relational store using HQL queries or other |
| 				filtering</li> |
| 			</ul> |
| 			<p>Please post a message on the <link href="mailinglist.html">newsgroup</link> if you |
| 			have other ideas or requirements for resource utilities.</p> |
| 		<p/> |
| 		</section>		 |
| 	</body> |
| </document> |