Jump to: navigation, search

Changes


XML Interface Toolkit

9 bytes removed, 15:13, 11 February 2014
=== Sections of mapping file ===
A mapping configuration file consists of two distinctive sections for the [[#Section:_Section_.3CImport.3E_.2F_.3CExport.3E|general import and export configuration]], labeled as '''<Import>''' and '''<Export>''', respectively.
Each such section consists of multiple sections describing the [[#Section:_Section_.3CNameOfXmlElement.3E|mapping of {{UBIK}} MetaClasses to XML elements]], labeled similar to the name of the related XML element.
These class related mapping sections (also called '''ClassMapping''') consist of sections for defining
* possible key properties, labeled '''<Identifiers>'''
{{Attention|The mapping information must be enveloped by a XML tag <UbikXMLMap>!}}
=== Section: <Import> / <Export> ===
<source lang="xml">
<Import EvaluateReferences="1" EvaluateRelations="0" DataEnvelope="UbikXMLData">
{{Hint|The default envelope for the XML data is '''<UbikXMLData>''' and can be modified via the mapping configuration settings.}}
=== Section: <NameOfXmlElement> ===
* This section defines the ClassMapping (as mentioned above) for mapping XML elements to {{UBIK}} MetaClasses
* Each XML element contained in the data file requires an appropriate mapping
|}
=== Section: <Identifier> ===
* Mapping of XML elements to key properties used to identify an {{UBIK}} object
* The value of the XML attribute of the XML object in the data file will be used as key value
|}
=== Section: <Property> ===
* Mapping of XML elements to properties
* The data type of the inner texts of the XML elements in the data file must be {{Text|string}}. The casting of the values to the actual MetaProperty's data type happens internally. The user does not have to care about the data type.
|}
=== Section: <Reference> ===
* Mapping of a XML elements to an MetaProperty representing either, a foreign key or a Guid value, linking to an another {{UBIK}} object
* The system tries to load the content object of the MetaClass as defined in the class mapping identified by '''TargetType''' with key values similar to the values of the according XML attribute in the data file. If an object can be found, a reference to this object is set on the MetaProperty named similar to the inner text of the XML element in the mapping file.
|}
=== Section: <Relation> ===
* Mapping of XML elements to an {{UBIK}} relation
* The system tries to load a content object of the MetaClass as defined in the class mapping identified by '''TargetType''' with key values similar to the values of the according XML attribute in the data file. If an object is found a relation between this and the current object is created using the relation <Identifier>.
|}
=== Section: <Object> ===
* Listof possible child '''TargetTypes'''
* Import: each element defined in '''<Object>''' tells the interface to treat child elements with a similar name as XML object (instead of property, reference or relation).
10,686
edits