Retype to different featuretypes based on classification

Added by Michael Schulz almost 2 years ago

Hi,

I would like to retype instances from my source schema (db table) into different featuretypes of my target schema. So all instances from table where attribute = value1 should be mapped to featuretype1, where attribute = value2 should be mapped to featuretype2. The usecase comes again from XPlanung, where the polygons are all in one table, differentiated by an attribute "Nutzung", depending on this value the instance should be mapped to eg. FT "FP_Waldflaeche". How could this be done?

Thx, Michael


Replies (3)

RE: Retype to different featuretypes based on classification - Added by Simon Templer almost 2 years ago

Hi Michael,

this can be realised by creating condition contexts on your source type, and defining the Retype on the context (e.g. Nutzung = 'xyz').

For more information see the related topics in the hale help:
http://hale.igd.fraunhofer.de/2.9.4/help/topic/eu.esdihumboldt.hale.doc.user/html/concepts/contexts.html?cp=2_3_0_1
http://hale.igd.fraunhofer.de/2.9.4/help/topic/eu.esdihumboldt.hale.doc.user/html/tasks/schema/define_context.html?cp=2_5_0_1

There is also a very simple example project ("Type condition context example") contained in hale demonstrating that.

Hope this helps.

Best,
Simon

RE: Retype to different featuretypes based on classification - Added by Simon Templer almost 2 years ago

Note that the property mappings you define on the original source type (w/o condition context) also apply to the type relations defined on the types specializations. Specialisations are sub-types, but also the type with a condition context applied.

Thus you need to define property mappings are independent of the condition on the type only once.

In your case this might be put to use if your target types have a common super type in the model.

RE: Retype to different featuretypes based on classification - Added by Michael Schulz almost 2 years ago

Hi Simon,

thanks a lot. Clear case of rtfm... ;-)

Cheers, Michael

(1-3/3)