Javadoc API Reference - geotax_sdk - 2.2

GeoTAX SDK Developer Guide

Product type
Software
Portfolio
Locate
Product family
Geo Addressing
Product
GeoTAX SDK
Version
2.2
Language
English
Product name
GeoTAX SDK
Title
GeoTAX SDK Developer Guide
Copyright
2024
First publish date
2023
Last updated
2024-08-30
Published on
2024-08-30T02:47:25.239250

After deployment, the Javadoc API reference for the GeoTAX SDK is included in the sdk/javadoc folder. The API reference documents Java packages and classes provided with the GeoTAX SDK. This API reference is also posted to our Support site:

You can use this code snippet to get started:
ListDataSource dataSourceList = new ArrayList<>();
        dataSourceList.add(new FileDataSource(Paths.get("{directory}/data")));

        configuration = new TaxRateLookupConfigurationBuilder()
                .withData(dataSourceList)
                .withResources(Paths.get("{directory}/geotax-dist-$project.version/taxing-resources"))
                .withRuntimeLib(Paths
                        .get("directory/geotax-dist-${project.version}/taxing-resources/bin/win64"))
                .build();

        lookup = new TaxRateLookupBuilder().withConfiguration(configuration)
                .build();

        Preferences preferences = new PreferencesBuilder().build();
        TaxRateAddress address = new TaxRateAddress();

        address.setAddressLines(Arrays.asList("1820 PAUL THOMAS BLVD BROWNSVILLE, PA"));

        TaxResponse response = lookup.lookupByAddress(address, preferences);
        printField("status", response.getStatus());
        if(response.getStatus() == Status.OK) {
            for(Result result: response.getResults()) {
                printField("score", result.getConfidence());
                printField("formattedAddress", result.getMatchedAddress().getFormattedAddress());
                printField("formattedStreetAddress", result.getMatchedAddress().getFormattedStreetAddress());
                printField("formattedLocationAddress", result.getMatchedAddress().getFormattedLocationAddress());
                printField("matchCode", result.getMatchedAddress().getMatchCode());
            }
        }

        try {
            lookup.close();
        } catch (Exception e) {
            e.printStackTrace();
        }