Hexagon Geospatial
MENU

GMSC Tutorials

Not sure on how to get started or looking for a workflow to get GeoMedia Smart Client up and running. Tutorials provide step by instruction on some of the most common configurations and workflows to get GeoMedia Smart Client configured up and running quickly.
Showing results for 
Search instead for 
Do you mean 

XMLAutomate

by Technical Evangelist ‎09-02-2015 05:27 AM - edited ‎05-13-2016 12:45 AM (1,111 Views)

 

 

Note: The support of the XMLAutomate Applet is ending with GMSC 16.

 

 

At a Glance

 

With the XMLAutomate, the third-party manufacturers of desktop or Web applications will be offered the ability to operate GeoMedia Smart Client or to export data from the GMSC.
The communication is based on the exchange of XML files and on the use of so-called "File-Watchers“. The File-Watchers monitor defined files in the Administrator and inform the GMSC about newly created files.
The export will be realised with the command of the GMSC user via a button, which is specially defined for the external application. Therefore, the export XML will be transferred to the software of the third party manufacturer by storing it in the export folder.


XMLAutomate_Overview.png


Import


To connect an application of a third-party manufacturer to the GMSC, a new entry must be created under "Automate“ in the Smart Client Administrator. The directory will be defined with this entry, which must be monitored by the GMSC. If the file of the external application exported in the “import folder” is not compatible with the import XML of the GMSC, the following arrays can be set in the Administrator:

 

  • XSL-Import

With an XSL file, an XSL transformation will be made of the external application file created before the import. This transformation can be used to transform the XML in the required structure of the GMSC.
For more information about the XSL transformation, see the XSL transformation chapter or http://www.w3.org/TR/xslt.

 

  • Pre-Processor

If the file created by the external application is not an XML file, with a pre-processor, for example, a property file can be transformed in the required XML structure of the GMSC.

 

 


Activity chart of the import

 

The directories defined in the Administrator will be monitored by the File-Watchers in regular intervals. When a new file arrives in the directory, the GMSC will be informed and will perform the following activities (see chart).


XMLAutomate_import.png

 

 


Important and notable points

 

At the import, the following topics must be noted by third-party manufacturers, depending on the file structure:

 


GMSC Import XML structure

 

  • The distinction between the particular files, which correspond to the GMSC structure, happens via the attribute "alias" must correspond in the Administrator as well as in the XML and is used to establish a relationship between the components.
  • In this import directory of the GMSC, only complete files are allowed to be stored, otherwise, the conversion cannot be performed correctly.


Other file formats or XML structures

  • An import folder, which is defined in the Administrator, is not allowed to be used from several applications at the same time. A violation of this point can lead to a wrong transformation.
  • In the import directory of the GMSC, only complete files are allowed to be stored, otherwise, the conversion can not be performed correctly. 
  • If the file of the third-party manufacturer is not an XML, a transformation with a pre-processor must be made.
  • The pre-processer will be invoked before the XSL transformation. The path of the file for editing will be invoked to the pre-processor as a parameter. 
  • It must be considered by the transformation through a pre-processor that the transformed file must be stored as the same name as the source file in the import folder. Only the file extension is allowed to be different from the original.


Used XSD for import

 

XMLAutomate ImportXSD.zip

 

 

 

Export

 

For the data export of the user, the file, created by GMSC, must be transformed in the required structure with an XSL transformation or with the declaration of a post-processor. Alternatively, the post-processor can be used to transfer the path of the file directly to the external application.

 

  • XSL-Export

If the export XML does not correspond with the required file needed from the third-party manufacturer, a transformation can be made with an XSL file after the export.
An XSL file can be used for a transformation of an XML in another XML structure as well as a transformation in a text or property file.
For more information about the XSL transformation, see the XSL transformation chapter or http://www.w3.org/TR/xslt.

 

  • Post-processor

Like the pre-processor, the post-processor can be used to transform an exported XML file of the GMSC in the required structure of the external application. If needed, the external application can be declared as a post-processor. This option is an advantage, for example, if the external application does not have the ability to check a particular directory for new files.

 

 

Activity chart of the export

 

The directories defined in the Administrator will be monitored by the File-Watchers in regular intervals. When a new file arrives in the directory, the GMSC will be informed and will perform the following activities (see chart).


XMLAutomate_export.png

 


Important and notable points

 

At the import, the following topics must be noted by third-party manufacturers, depending on the file structure:

  • To give the user the ability to export data out of the GMSC, an action must be created in the Administrator, which is derived from "Automate_Export". And it must get the Alias as parameter, which is defined in the Administrator for the external application under the point Automate. 
  • The export file will be stored in the export folder defined in the Administrator. Note that for every application, your own folder must be used because the name of the file, independent of the software of the third party manufacturer, has the same name and is therefore not unique. 
  • With an XSL transformation, the XML structure can be transformed in the required format of the external application if applicable. Alternatively, the post-processor can be used for this. 
  • If the external application has no ability to monitor a directory regarding changes, a post-processor can be used to inform the external application about new activities.


Used XSD for export

XMLAutomate ExportXSD.zip

 


XSL-Transformation

 

XSL transformations can be used to change the structure of XML files. This transformation will be used at the import and at the export, if it is declared in the Administrator. To learn how to construct an XSL file, see following example or http://www.w3.org/TR/xslt.
Furthermore, note that at the XSL transformation of the import, the attribute alias of the element XMLAutomateImport must be set correctly.

An example for an XSL-Transformation can be found LINK XSL.

 

Integration of web applications

 

For the integration of a Web application in the GMSC, a Java applet is available, which can be activated with a Javascript to create the XML import file needed by the GMSC.

For detailled information see LINK.


Example for the creation of an XML


An example for the creation of an XML can be found LINK.

 

Overview
Contributors