recognition/australia-post-settings.js

const _MwWrapper  = require("../_mwbridge/_mw-wrapper.js");
/**
 * AustraliaPost decoding parameters. Contains parameters which make influence on recognized data of AustraliaPost symbology.
 */
class AustraliaPostSettings extends _MwWrapper
{

    /**
     * AustraliaPostSettings constructor
     */
    constructor(javaclass)
    {
        super(javaclass);
        this._initializeWrapperMembers()
    }

    _initializeWrapperMembers()
    {
    }

    /**
     * Gets the Interpreting Type for the Customer Information of AustralianPost BarCode.DEFAULT is CustomerInformationInterpretingType.OTHER.
     * @return The interpreting type (CTable, NTable or Other) of customer information for AustralianPost BarCode
     */
    getCustomerInformationInterpretingType()
    {
        return this.getJavaClass().getCustomerInformationInterpretingTypeSync();
    }

    /**
     * Sets the Interpreting Type for the Customer Information of AustralianPost BarCode.DEFAULT is CustomerInformationInterpretingType.OTHER.<br>
     * @param value The interpreting type (CTable, NTable or Other) of customer information for AustralianPost BarCode
     */
    setCustomerInformationInterpretingType(value)
    {
        this.getJavaClass().setCustomerInformationInterpretingTypeSync(value);
    }

    /**
     * The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method.<br>
     * CTable encoding method does not have any gaps in encoding table and sequnce "333" of filling paterns is decoded as letter "z".
     *
     * @example
     *
     * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "5912345678AB");
     * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE);
     * let image = generator.generateBarCodeImage(BarcodeImageFormat.PNG);
     * let reader = new BarCodeReader(image, null, DecodeType.AUSTRALIA_POST);
     * reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
     * reader.getBarcodeSettings().getAustraliaPost().setIgnoreEndingFillingPatternsForCTable(true);
     * let results = reader.readBarCodes();
     * for(let i = 0; i < results.length; i++)
     * {
     *     let result = results[i];
     *     console.log("BarCode Type: " + result.getCodeType());
     *     console.log("BarCode CodeText: " + result.getCodeText());
     * }
     *
     * @return The flag which force AustraliaPost decoder to ignore last filling patterns during CTable method decoding
     */
    getIgnoreEndingFillingPatternsForCTable()
    {
        return this.getJavaClass().getIgnoreEndingFillingPatternsForCTableSync();
    }

    /**
     * The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method.<br>
     * CTable encoding method does not have any gaps in encoding table and sequnce "333" of filling paterns is decoded as letter "z".
     *
     * @example
     *
     * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "5912345678AB");
     * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE);
     * let image = generator.generateBarCodeImage(BarcodeImageFormat.PNG);
     * let reader = new BarCodeReader(image, null, DecodeType.AUSTRALIA_POST);
     * reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
     * reader.getBarcodeSettings().getAustraliaPost().setIgnoreEndingFillingPatternsForCTable(true);
     * let results = reader.readBarCodes();
     * for(let i = 0; i < results.length; i++)
     * {
     *     let result = results[i];
     *     console.log("BarCode Type: " + result.getCodeType());
     *     console.log("BarCode CodeText: " + result.getCodeText());
     * }
     *
     * @return The flag which force AustraliaPost decoder to ignore last filling patterns during CTable method decoding
     */
    setIgnoreEndingFillingPatternsForCTable(value)
    {
        this.getJavaClass().setIgnoreEndingFillingPatternsForCTableSync(value);
    }
}

module.exports = AustraliaPostSettings;