Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview | Advanced Features | Release Notes

...

Note that for upper-level entries that appear more than once within the import file (United States, Massachusetts, Plymouth County) the user-generated id only needs to be specified one, though it is not problematic if it is specified more than once. In the event that more than one id is specified for a single entry, the id that ends up being stored is arbitrary (i.e., in a proper import file, no entry should have more than one id!).

Developer

...

Tools

Upon start-up, the address hierarchy module loads it's entire address cache into memory to speed up address searches.  Since this slows down module startup, as of version 2.2.6, developers may wish to turn this functionality off during development, This can be done by setting the global property addresshierarchy.initializeAddressHierarchyCacheOnStartup to false.

Activator

...

Loading of

...

Address Configuration &

...

Entries 

As of version 2.11.0 it is possible to let the module activator load the address configuration and address hierarchy entries upon starting. The activator will scan the following location in the app data directory:

...

Two files are excepted to be found in there:

  1. addressConfiguration.xml
    This file defines both the address template and the address hierarchy entry levels in the hierarchy. Furthermore it indicates the location of the second configuration file. Here is a sample file:

    Code Block
    languagexml
    titleaddressConfiguration.xml
    <addressConfiguration>
      <wipe>true</wipe>
      <addressComponents>
        <addressComponent>
          <field>COUNTRY</field>
          <nameMapping>Location.country</nameMapping>
          <sizeMapping>40</sizeMapping>
          <elementDefault>Cambodia</elementDefault>
          <requiredInHierarchy>true</requiredInHierarchy>
        </addressComponent>
        <addressComponent>
          <field>STATE_PROVINCE</field>
          <nameMapping>Location.province</nameMapping>
          <sizeMapping>40</sizeMapping>
          <requiredInHierarchy>true</requiredInHierarchy>
        </addressComponent>
        <addressComponent>
          <field>COUNTY_DISTRICT</field>
          <nameMapping>Location.district</nameMapping>
          <sizeMapping>40</sizeMapping>
          <requiredInHierarchy>true</requiredInHierarchy>
        </addressComponent>
        <addressComponent>
          <field>ADDRESS_1</field>
          <nameMapping>Commune</nameMapping>
          <sizeMapping>40</sizeMapping>
          <requiredInHierarchy>true</requiredInHierarchy>
        </addressComponent>
        <addressComponent>
          <field>CITY_VILLAGE</field>
          <nameMapping>Location.village</nameMapping>
          <sizeMapping>40</sizeMapping>
          <requiredInHierarchy>true</requiredInHierarchy>
        </addressComponent>
      </addressComponents>
      <lineByLineFormat>
        <string>cityVillage, address1</string>
        <string>countyDistrict, stateProvince</string>
        <string>country</string>
      </lineByLineFormat>
      <addressHierarchyFile>
        <filename>addresshierarchy.csv</filename>
        <entryDelimiter>,</entryDelimiter>
        <identifierDelimiter>%</identifierDelimiter>
      </addressHierarchyFile>
    </addressConfiguration>

    When wipe is set true the existing address hierarchy entries will be wiped before loading the address hierarchy entries from the CSV import file. On the other hand setting wipe to false allows to add additionnal entries to a persisted set already in database.

  2. The CSV import file for address entries
    Based on the above sample configuration this file is expected to be named addresshierarchy.csv.
    This is the "usual" address hierarchies CSV import file, see 'Importing an Address Hierarchy' for more details about it.