Document toolboxDocument toolbox

(sv) Fi2 Mappings

Translation needed

The content of this page was copied from another page tree and needs to be translated or updated.

When you finish translation, make sure to

  • Replace the label NEEDS-TRANSLATING with TRANSLATED

  • Remove this macro from the page

Map object classes

While registering a domain, in Object Classes (External) set all Fi2 class names as defined by the standard:

  • fi2property

  • fi2structure

  • fi2floor

  • fi2space

These class names must be used as they will be recognized and mapped to corresponding fi2 object types.

Here is a sample with mappings for Fi2 classes (note, that internal class names may vary in your system).

 

image-20240516-151202.png

Map Data fields

For each class, user can define any number of mapped fields. 

  • Source class: External class from fi2 schema

  • Source field - External field name, used when exporting to generic type

  • Target field - Internal Field

  • Source field type (Fi2 Field Type) - External field type, e.g. area, class etc

  • Source value type (Fi 2 Value Type) - External sub type, e.g. BRA, NTA

 

Sample usage of fields mapping for Fi2 and Space object:

image-20240516-151241.png

As an example, in this mapping first row we are instructing the system to export our space_bra field as AREA tag with fi2area_code set to BRA.

Please inspect the specific types listed below and their possible values for “Value Type” and their impact on the output XML.

Possible field types

Source field type - Fi2 Field Type

  • AREA - use for fields containing area values. Requires Source value type

  • CLASS - use with dictionary / lookup fields

  • VALUE - use for generic values

  • ID - use for object ID values

  • NAME - use from object name tag

  • ADDRESS - use for object address tag

  • DESCR - use for object description tag

  • CONSTRYEAR - use for object contrition year tag

If given type/tag is not allowed by schema on given element class, it will be omitted.

 

VALUE sample

Use "VALUE" for custom field that do not match any specific type. They will be exported as generic code/value pair:

<fi2space_value> <fi2value_code>space_coclass_ut</fi2value_code> <fi2value_value>BAB</fi2value_value> </fi2space_value>
  • fi2value_code will be filled in with Source field

  • fi2value_value will be filled in with the actual target field value

sample with schema:

<fi2space_value> <fi2value_code>CreatedDate</fi2value_code> <fi2value_value>2002-08-19T21:33:02</fi2value_value> <!-- optional --> <fi2value_scheme> <fi2scheme_id>VB001_005_001</fi2scheme_id> <fi2scheme_name>Tillåtna värden för alla typer av fi2objekt</fi2scheme_name> <fi2scheme_url>http://www.fi2.se/valuelist/VB001_005_001.xml</fi2scheme_url> </fi2value_scheme> </fi2space_value>

ID sample

<fi2space_ids> <fi2_id usage="SpaceId">113</fi2_id> </fi2space_ids>
  • usage will be filled with Source field

  • inner content will be filled with the actual target field value

CLASS sample

  • If type CLASS is selected, emitted tag will be fi2space_class

  • fi2class_scheme will include information about:

    • fi2scheme_name will include source (external) field name from domain mapping

    • fi2scheme_url will be based on field type config

FMA Class sample:

Original Fi2 sample

 

AREA sample

NAME sample

DESCR sample

CONSTRYEAR sample

ADDRESS sample

Possible Value Types

Value types will be used as an additional attribute in some complex output formats, like AREA.

In AREA the value type will be used for fi2area_code

In CLASS the value type will be used for fi2scheme_url

Source value type

  • BRA

  • NTA

  • BTA

  • class url

  • etc

ADDRESS Value Types

Address supports specific value types:

 

 

 

 

fi2addr_class

Address Classification

fi2addr_descr

Address Description

fi2addr_addrline

Any address line for street/delivery address

fi2addr_zipcode

Zip-code

fi2addr_city

City

fi2addr_country

Country code (ISO 3166)

fi2addr_region

Areacode

fi2addr_tel

Telephone Number linked to this address

fi2addr_fax

Fax number