Skip to content

Latest commit

 

History

History
82 lines (72 loc) · 3.69 KB

addresshierarchy.md

File metadata and controls

82 lines (72 loc) · 3.69 KB

Domain 'addresshierarchy'

The addresshierarchy subfolder contains configuration files expected by the Address Hierarchy module.

Below is a typical content of the 'addresshierarchy' configuration subfolder:

addresshierarchy/
  ├── addressConfiguration.xml
  ├── addresshierarchy.csv
  ├── messages_en.properties
  └── messages_fr.properties
Address Entries CSV File (mandatory)

This file is usually named addresshierarchy.csv, however this name is configurable.

It contains the address hierarchy entries themselves. This is typically a large file since it usually contains thousands of lower level entries. Here is an sample snippet for Haiti with the entries down to the third commune level. We see on each row Pays,Département,Commune (country, district, borough):

Haiti,Artibonite,Anse Rouge
Haiti,Artibonite,Desdunes
Haiti,Artibonite,Dessalines
...
Haiti,Sud-Est,Marigot
Haiti,Sud-Est,Thiotte

NOTE: This file provides raw entries, without a header row.

The entries levels will be mapped, following their order of enumeration in the file, to the fields in the address template, see below.

File addressConfiguration.xml (mandatory)

This file defines the address template. Example, for Haiti:

<addressConfiguration>
  <wipe>true</wipe>
  <addressComponents>
    <addressComponent>
      <field>COUNTRY</field>
      ...
    </addressComponent>
    <addressComponent>
      <field>STATE_PROVINCE</field>
      ...
    </addressComponent>
    <addressComponent>
      <field>CITY_VILLAGE</field>
      ...
    </addressComponent>
    <addressComponent>
      <field>ADDRESS_2</field>
      ...
    </addressComponent>
  </addressComponents>
  <addressHierarchyFile>
    <filename>addresshierarchy.csv</filename>
    <entryDelimiter>,</entryDelimiter>
    ...
  </addressHierarchyFile>
</addressConfiguration>```

In this Haiti example, the configuration loader will map address field and hierarchy levels as such because of the enumeration order in each of the two files:

Address field Hierarchy level
COUNTRY Pays
STATE_PROVINCE Département
CITY_VILLAGE Commune
ADDRESS_2 -
I18n .properties files (optional)

The i18n .properties files are used to localise the address-related fields of PersonAdress and Location entities by filling the i18n reverse cache of Ext I18n.

  • For PersonAdress the following fields are supported:
    address1 to address15, cityVillage, countyDistrict, stateProvince, country, postalCode, latitude, longitude
  • For Location the following fields are supported:
    address1, address2, cityVillage, countyDistrict, stateProvince, country, postalCode, latitude, longitude

The messages files can be similarly defined as those loaded by the messageproperties domain.

Requirements

Further examples: