Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "MoDisco/XMLDiscoverer"

(Details)
(User manual)
Line 24: Line 24:
  
 
== User manual ==
 
== User manual ==
 +
 +
=== Discovering and browsing from contextual menu ===
  
 
The plugin provides the user with a contextual menu to easily create models.
 
The plugin provides the user with a contextual menu to easily create models.
Line 29: Line 31:
 
By right-clicking on a container (folder or project) in the Eclipse Package Explorer view, you can quickly create the KDM Source model of your application (see next Figure). Each of these models can then be used with any other tool compliant with the corresponding metamodel.
 
By right-clicking on a container (folder or project) in the Eclipse Package Explorer view, you can quickly create the KDM Source model of your application (see next Figure). Each of these models can then be used with any other tool compliant with the corresponding metamodel.
  
[[Image:MoDisco-Kdm Source popup menu.png|frame|center|Menus in Eclipse to create KDM Source model]]
+
[[Image:MoDisco-XML_popup_menu.png|frame|center|Menus in Eclipse to discover XML model]]
 +
 
 +
A progress bar will appear at the bottom of the window as soon as the operation begins. At the end of the process, the newly created model is automatically opened in the MoDisco model browser, if installed, or in default editor (see next Figure).
 +
 
 +
[[Image:MoDisco-XML_model_in_browser.png|frame|center|XML model viewed with MoDisco browser]].
  
A progress bar will appear at the bottom of the window as soon as the operation begins. Depending on the size of your application, the reverse engineering might take some time to complete (see next Figure).
+
=== Discovering and serializing from Java ===
+
[[Image:MoDisco-JavaDiscoverer progress bar.jpg|frame|center|Progress bar during models creation]]
+
  
At the end of the process, the newly created model file is added at the root of your project and is automatically opened in the default editor (see next Figure).
+
The plugin exposes a discover class which allows to launch the discovering of XML model from a file (within the workspace or not), and get the resulting model.
 +
Some options can be set for this operations :
  
[[Image:MoDisco-Kdm Source model.png|frame|center|KDM Source model in the package explorer]]
+
OPTION_IGNORE_WHITESPACES : a parameter for indicating to ignore white spaces in text portions.
 +
OPTION_LIGHTWEIGHT_MODEL : to minimize the memory size of obtained. If set to true : comments are ignored, text portions with only indentation and line delimiters are ignored.
 +
OPTION_SILENT_MODE : a parameter to indicate if a browser should be opened on model after discovering.
  
It can be opened in MoDisco model browser (see next Figure) which brings some graphical improvements.
 
  
[[Image:MoDisco-Kdm Source model in MoDisco browser.png|frame|center|KDM Source model viewed with MoDisco browser]]
+
For more details see java documentation on DiscoverXMLModel
  
 
== Install ==
 
== Install ==

Revision as of 12:05, 14 August 2009

The goal of Generic XML Discoverer plugin is to allow generic extractions of XML information from a XML file, without the need of a metamodel dedicated to a conforming Document Type Definition(DTD) or XML Schema Description (XSD).

Details

This plugin aims at analysing any XML file providing a model describing the information found, conforming to Generic XML metamodel. Moreover, it allows to serialize back the xml file from the model. Thus, some m2m transformation might be used jointly to upgrade some xml files.

Considering XML files conforming to DTD or XSD, it will be more convenient to have some dedicated metamodels to manipulate information. However, Generic XML Discoverer is an alternative for miscellaneous XML files (none or uncommon DTD/XSD).

Overview of the KDM Source Discoverer

Requirements

To use the plug-in you need:

  • JDK 1.5 or above
  • a version of Eclipse 3.5 or above with the following set of plugins installed

Team

Fabien Giquel (Mia-Software)

User manual

Discovering and browsing from contextual menu

The plugin provides the user with a contextual menu to easily create models.

By right-clicking on a container (folder or project) in the Eclipse Package Explorer view, you can quickly create the KDM Source model of your application (see next Figure). Each of these models can then be used with any other tool compliant with the corresponding metamodel.

Menus in Eclipse to discover XML model

A progress bar will appear at the bottom of the window as soon as the operation begins. At the end of the process, the newly created model is automatically opened in the MoDisco model browser, if installed, or in default editor (see next Figure).

XML model viewed with MoDisco browser
.

Discovering and serializing from Java

The plugin exposes a discover class which allows to launch the discovering of XML model from a file (within the workspace or not), and get the resulting model. Some options can be set for this operations :

OPTION_IGNORE_WHITESPACES : a parameter for indicating to ignore white spaces in text portions. OPTION_LIGHTWEIGHT_MODEL : to minimize the memory size of obtained. If set to true : comments are ignored, text portions with only indentation and line delimiters are ignored. OPTION_SILENT_MODE : a parameter to indicate if a browser should be opened on model after discovering.


For more details see java documentation on DiscoverXMLModel

Install

Install from SVN

  • connect to the SVN repository with anonymous access :
URL = https://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.modisco
  • navigate in repository following 'plugins/trunk' path.
  • check-out the project named 'org.eclipse.gmt.modisco.infra.xml.discoverer' .
  • Use "export" menu to export this project as a plugin (Deployable plugins and fragments) in your Eclipse installation. Don't forget to choose "Package plug-ins as individual jar archives" option.
  • restart Eclipse to take in account this plug-in

Back to the top