Configuring data - geo_addressing_sdk - 5.0

Geo Addressing SDK Developer Guide

Product type
Software
Portfolio
Locate
Product family
Geo Addressing
Product
Geo Addressing SDK
Version
5.0
Language
English
Product name
Geo Addressing SDK
Title
Geo Addressing SDK Developer Guide
Copyright
2023
First publish date
2007
ft:lastEdition
2024-07-12
ft:lastPublication
2024-07-12T13:44:57.839102

Scenario

To configure data, there are two options:
  • extract and configure data programmatically
  • configure previously extracted data
Note: If you have more than one data path, use this syntax:
.withSpdPaths(Paths.get({spdDirectory1}), Paths.get(spdDirectory2))

Extract and configure data programmatically

Use spdDataSource to programmatically configure *.spd data.

AddressingConfiguration configuration = new AddressingConfigurationBuilder()  
    .withData(new SpdDataSourceBuilder()  
      .withNumberOfExtractors(3) // number of CPU to use when using extraction  
      .withSpdPaths(Paths.get("/data"), Paths.get("/data2/some.spd")) // location for *.spd  
      .withExtractedPath(Paths.get("/data-extract-location"))  
      .build())  
    .withResources(Paths.get("{ggs.home directory}/ggs-dist-{version}/resources")) // runtime resource  
   .build();

Configure previously extracted data

Use fileDataSource to programmatically configure extracted data.

Addressing addressing;
  
  public VerifyAddress() throws AddressingException {
  
    addressing = new AddressingBuilder()
        .withConfiguration(new AddressingConfigurationBuilder()
            .withData(new FileDataSource(Paths.get("{pathTo}\\extracteddata")))
            .withResources(Paths.get("{ggs.home directory}/ggs-dist-{version}/resources"))
            .build())
        .build();
  }