Our goal is to build a mapping between the schema that has been implemented in the
caaml_data database and our small portion of the EAWS CAAML schema
Open Hale Studio for the goal of this section:
If we want to work with the GeoAvalanche server in order to upload the mapping configuration of CAAML as new GML application schema datastore we have to double check that Hale is properly set up and the compatibility mode is on. Select Transformation → Compatibility mode → GeoServer from the menu. You should see Geo appearing close to a green tick mark icon at the status bar on the bottom right side:
Things can be a little more complex for complex relations like Bulletin, BulletinMeasurements and LocationCollection, just to mention few, but the concept of mapping would still continue to be valid.
Define the source as a JDBC connection:
Once imported the source then edit the relevant source types of interest:
And choice what you are interested in mapping, for now just
caaml_Region is fine:
Define the source as a file resource (the modified XSD CAAML schema is part of the data package):
Then click on
Finally click on
We will now define the caaml_Region → Region relation (our case is the simplest one):
caaml_Region type in the Source section of the Schema Explorer view;
Region type in the Target section of the Schema Explorer view
Click on the blue bi-directional arrow icon in between the Source and Target sections of the Schema Explorer view and select Retype from the popup menu
Verify from the popup window that the entities are those previously selected and click on the button
Next and then
Finish on the next window.
A new retype mapping will be added in the Assignment view.
Once the type relation have been assigned, it is time to configure the relations between source and target properties.
The mapping between the source and target is not completely done because we want more. Specifically we'd like to have a reword of the GML identification
id of the Region feature. Effectively we want to end up to something like this:
In order to achieve that we have to add a new mapping property:
IDattribute from the Source type of the Schema Explorer view and finally select
idattribute from the Target type of the Schema Explorer view:
then click on
Formatted String item
double check source and target variables then click
assign the format pattern for the retype which is in our case
you finally should see a new mapping item in the Alignment view
We want then to configure the remaining properties as a simple pass through from source to target type. So we can see how it works for one of them and then apply the concept to the rest.
Let's apply the Rename to
descriptionattribute from the Source type of the Schema Explorer view and finally select
descriptionattribute from the Target type of the Schema Explorer view:
then click on
double check source and target property then click
Leave parameters as it is and click
You should now see the Alignment view updated with the Rename mapping for
description. Then it's just a matter of applying the same to all properties from the source type.