const fs = require("fs");
const generation = require("./Generation");
const joint = require('./Joint');
const java = require('java');
const aspose_barcode = require("./AsposeBarcode");
const {BaseJavaClass} = require("./Joint");
const {Base} = require("mocha/lib/reporters");
/**
* Interface for complex codetext used with ComplexBarcodeGenerator.
*/
class IComplexCodetext extends joint.BaseJavaClass
{
constructor(javaClass)
{
super(javaClass);
this.init();
}
/**
* Construct codetext for complex barcode
* @return Constructed codetext
*/
getConstructedCodetext()
{
throw new BarcodeException('You have to implement the method getConstructedCodetext!');
}
/**
* Initializes instance with constructed codetext.
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext)
{
throw new BarcodeException('You have to implement the method initFromString!');
}
/**
* Gets barcode type.
* @return Barcode type.
*/
getBarcodeType()
{
throw new BarcodeException('You have to implement the method getBarcodeType!');
}
}
/**
* ComplexBarcodeGenerator for backend complex barcode (e.g. SwissQR) images generation.
* @example
* This sample shows how to create and save a SwissQR image.
* let swissQRCodetext = new SwissQRCodetext(null);
* swissQRCodetext.getBill().setAccount("Account");
* swissQRCodetext.getBill().setBillInformation("BillInformation");
* swissQRCodetext.getBill().setBillInformation("BillInformation");
* swissQRCodetext.getBill().setAmount(1024);
* swissQRCodetext.getBill().getCreditor().setName("Creditor.Name");
* swissQRCodetext.getBill().getCreditor().setAddressLine1("Creditor.AddressLine1");
* swissQRCodetext.getBill().getCreditor().setAddressLine2("Creditor.AddressLine2");
* swissQRCodetext.getBill().getCreditor().setCountryCode("Nl");
* swissQRCodetext.getBill().setUnstructuredMessage("UnstructuredMessage");
* swissQRCodetext.getBill().setReference("Reference");
* swissQRCodetext.getBill().setAlternativeSchemes([new AlternativeScheme("AlternativeSchemeInstruction1"),new AlternativeScheme("AlternativeSchemeInstruction2")]);
* swissQRCodetext.getBill().setDebtor(new Address(null));
* swissQRCodetext.getBill().getDebtor().setName("Debtor.Name");
* swissQRCodetext.getBill().getDebtor().setAddressLine1("Debtor.AddressLine1");
* swissQRCodetext.getBill().getDebtor().setAddressLine2("Debtor.AddressLine2");
* swissQRCodetext.getBill().getDebtor().setCountryCode("Lux");
* let cg = new ComplexBarcodeGenerator(swissQRCodetext);
* let res = cg.generateBarCodeImage(BarcodeImageFormat.PNG);
*/
class ComplexBarcodeGenerator extends joint.BaseJavaClass {
static javaClassName = "com.aspose.mw.barcode.complexbarcode.MwComplexBarcodeGenerator";
parameters;
init() {
this.parameters = new generation.BaseGenerationParameters(this.getJavaClass().getParametersSync());
}
/**
* Generation parameters.
*/
getParameters() {
return this.parameters;
}
/**
* Creates an instance of ComplexBarcodeGenerator.
* @param complexCodetext Complex codetext
*/
constructor(complexCodetext)
{
let java_class_link = java.import(ComplexBarcodeGenerator.javaClassName);
super(new java_class_link(complexCodetext.getJavaClass()));
this.init();
}
/**
* Generates complex barcode image under current settings.
* @return Base64 presentation of image.
*/
generateBarCodeImage(format) {
let base64Image = this.getJavaClass().generateBarCodeImageSync(format);
return base64Image;
}
/**
* <p>
* Generates and saves complex barcode image under current settings.
* </p>
* @param filePath Path to save to.
* @param format BarCodeImageFormat(PNG, BMP, JPEG, GIF)
*/
save(filePath, format) {
let image64 = this.generateBarCodeImage(format);
let buff = Buffer.from(image64, 'base64');
fs.writeFileSync(filePath, buff);
}
}
/**
* Address of creditor or debtor.<br>
* <br>
* You can either set street, house number, postal code and town (type structured address)<br>
* or address line 1 and 2 (type combined address elements). The type is automatically set<br>
* once any of these fields is set. Before setting the fields, the address type is undetermined.<br>
* If fields of both types are set, the address type becomes conflicting.<br>
* Name and country code must always be set unless all fields are empty.<br>
*/
class Address extends joint.BaseJavaClass {
static javaClassName = "com.aspose.mw.barcode.complexbarcode.MwAddress";
constructor()
{
let javaClass = java.import(Address.javaClassName)
super(new javaClass());
this.init();
}
static construct(javaClass)
{
let address = new Address();
address.setJavaClass(javaClass);
address.init();
return address;
}
/**
* Gets the address type.<br>
* <br>
* The address type is automatically set by either setting street / house number<br>
* or address line 1 and 2. Before setting the fields, the address type is Undetermined.<br>
* If fields of both types are set, the address type becomes Conflicting.<br>
* @return The address type.
*/
getType() {
return this.getJavaClass().getTypeSync();
}
/**
* Gets the name, either the first and last name of a natural person or the<br>
* company name of a legal person.<br>
* @return The name.
*/
getName() {
return this.getJavaClass().getNameSync();
}
/**
* Sets the name, either the first and last name of a natural person or the<br>
* company name of a legal person.<br>
* @param value: The name.
*/
setName(value) {
this.getJavaClass().setNameSync(value);
}
/**
* Gets the address line 1.<br>
* <br>
* Address line 1 contains street name, house number or P.O. box.<br>
* <br>
* Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it's already<br>
* AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING.<br>
* <br>
* This field is only used for combined elements addresses and is optional.<br>
* <br>
* @return The address line 1.
*/
getAddressLine1() {
return this.getJavaClass().getAddressLine1Sync();
}
/**
* Sets the address line 1.<br>
* <br>
* Address line 1 contains street name, house number or P.O. box.<br>
* <br>
* Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it's already<br>
* AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING.<br>
* <br>
* This field is only used for combined elements addresses and is optional.<br>
* <br>
* @param value: The address line 1.<br>
*/
setAddressLine1(value) {
this.getJavaClass().setAddressLine1Sync(value);
}
/**
* Gets the address line 2.<br>
* Address line 2 contains postal code and town.<br>
* Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it's already<br>
* AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING.<br>
* This field is only used for combined elements addresses. For this type, it's mandatory.<br>
* @return The address line 2.
*/
getAddressLine2() {
return this.getJavaClass().getAddressLine2Sync();
}
/**
* Sets the address line 2.<br>
* Address line 2 contains postal code and town.<br>
* Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it's already<br>
* AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING.<br>
* This field is only used for combined elements addresses. For this type, it's mandatory.<br>
* @param value: The address line 2.
*/
setAddressLine2(value) {
this.getJavaClass().setAddressLine2Sync(value);
}
/**
* Gets the street.<br>
* The street must be speicfied without house number.<br>
* Setting this field sets the address type to AddressType.STRUCTURED unless it's already<br>
* AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.<br>
* This field is only used for structured addresses and is optional.<br>
* @return The street.
*/
getStreet() {
return this.getJavaClass().getStreetSync();
}
/**
* Sets the street.<br>
* <br>
* The street must be speicfied without house number.<br>
* <br>
* Setting this field sets the address type to AddressType.STRUCTURED unless it's already<br>
* AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.<br>
* <br>
* This field is only used for structured addresses and is optional.<br>
* <br>
* @param value: The street.
*/
setStreet(value) {
this.getJavaClass().setStreetSync(value);
}
/**
* Gets the house number.<br>
* <br>
* Setting this field sets the address type to AddressType.STRUCTURED unless it's already<br>
* AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.<br>
* <br>
* This field is only used for structured addresses and is optional.<br>
* <br>
* @return The house number.<br>
*/
getHouseNo() {
return this.getJavaClass().getHouseNoSync();
}
/**
* Sets the house number.<br>
* <br>
* Setting this field sets the address type to AddressType.STRUCTURED unless it's already<br>
* AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.<br>
* <br>
* This field is only used for structured addresses and is optional.<br>
* <br>
* @param value: The house number.
*/
setHouseNo(value) {
this.getJavaClass().setHouseNoSync(value);
}
/**
* Gets the postal code.<br>
* <br>
* Setting this field sets the address type to AddressType.STRUCTURED unless it's already<br>
* AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.<br>
* <br>
* This field is only used for structured addresses. For this type, it's mandatory.<br>
* <br>
* @return The postal code.
*/
getPostalCode() {
return this.getJavaClass().getPostalCodeSync();
}
/**
* Sets the postal code.<br>
* <br>
* Setting this field sets the address type to AddressType.STRUCTURED unless it's already<br>
* AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.<br>
* <br>
* This field is only used for structured addresses. For this type, it's mandatory.<br>
* <br>
* @param value The postal code.
*/
setPostalCode(value) {
this.getJavaClass().setPostalCodeSync(value);
}
/**
* Gets the town or city.<br>
* <br>
* Setting this field sets the address type to AddressType.STRUCTURED unless it's already<br>
* AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.<br>
* <br>
* This field is only used for structured addresses. For this type, it's mandatory.<br>
* <br>
* @return The town or city.
*/
getTown() {
return this.getJavaClass().getTownSync();
}
/**
* Sets the town or city.<br>
* <br>
* Setting this field sets the address type to AddressType.STRUCTURED unless it's already<br>
* AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.<br>
* <br>
* This field is only used for structured addresses. For this type, it's mandatory.<br>
* <br>
* @param value The town or city.
*/
setTown(value) {
this.getJavaClass().setTownSync(value);
}
/**
* Gets the two-letter ISO country code.<br>
* <br>
* The country code is mandatory unless the entire address contains null or emtpy values. <br>
* <br>
* @return The ISO country code.<br>
*/
getCountryCode() {
return this.getJavaClass().getCountryCodeSync();
}
/**
* Sets the two-letter ISO country code. <br>
* <br>
* The country code is mandatory unless the entire address contains null or emtpy values.<br>
* <br>
* @param value The ISO country code.<br>
*/
setCountryCode(value) {
this.getJavaClass().setCountryCodeSync(value);
}
/**
* Clears all fields and sets the type to AddressType.UNDETERMINED.
*/
clear() {
this.setName(null);
this.setAddressLine1(null);
this.setAddressLine2(null);
this.setStreet(null);
this.setHouseNo(null);
this.setPostalCode(null);
this.setTown(null);
this.setCountryCode(null);
}
/**
* Determines whether the specified object is equal to the current object.<br>
* @return true if the specified object is equal to the current object; otherwise, false.<br>
* @param obj The object to compare with the current object.<br>
*/
equals(obj) {
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* Gets the hash code for this instance.<br>
* @return A hash code for the current object<br>.
*/
hashCode() {
return this.getJavaClass().hashCodeSync();
}
init() {
}
}
/**
* Address type
* @enum
*/
AddressType =
{
/**
* Undetermined
*/
UNDETERMINED: 0,
/**
* Structured address
*/
STRUCTURED: 1,
/**
* Combined address elements
*/
COMBINED_ELEMENTS: 2,
/**
* Conflicting
*/
CONFLICTING: 3
};
/**
* Alternative payment scheme instructions
*/
class AlternativeScheme extends joint.BaseJavaClass {
static get javaClassName() {
return "com.aspose.mw.barcode.complexbarcode.MwAlternativeScheme";
}
constructor(instruction)
{
let javaAlternativeScheme = java.import(AlternativeScheme.javaClassName);
super(new javaAlternativeScheme(instruction));
}
static construct(javaClass)
{
let jsClass = new AlternativeScheme("");
jsClass.setJavaClass(javaClass);
return jsClass;
}
/**
* Gets the payment instruction for a given bill.<br>
* <br>
* The instruction consists of a two letter abbreviation for the scheme, a separator characters<br>
* and a sequence of parameters(separated by the character at index 2).<br>
*/
getInstruction() {
return this.getJavaClass().getInstructionSync();
}
/**
* Gets the payment instruction for a given bill.<br>
* The instruction consists of a two letter abbreviation for the scheme, a separator characters<br>
* and a sequence of parameters(separated by the character at index 2).
*/
setInstruction(value) {
this.getJavaClass().setInstructionSync(value);
}
/**
* Determines whether the specified object is equal to the current object.<br>
* @return true if the specified object is equal to the current object; otherwise, false.<br>
* @param obj The object to compare with the current object.
*/
equals(obj) {
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* Gets the hash code for this instance.<br>
* @return hash code for the current object.
*/
hashCode() {
return this.getJavaClass().hashCodeSync();
}
init() {
}
}
/**
* ComplexCodetextReader decodes codetext to specified complex barcode type.<br>
* @example
* This sample shows how to recognize and decode SwissQR image.
*
* let cr = new BarCodeReader("SwissQRCodetext.png", null, DecodeType.QR);
* cr.read();
* let result = ComplexCodetextReader.tryDecodeSwissQR(cr.getCodeText(false));
*/
class ComplexCodetextReader {
static javaClassName = "com.aspose.mw.barcode.complexbarcode.MwComplexCodetextReader";
/**
* Decodes SwissQR codetext.
*
* @param encodedCodetext encoded codetext
* @return decoded SwissQRCodetext or null.
*/
static tryDecodeSwissQR(encodedCodetext) {
let MwComplexCodetextReaderClass = java.import(ComplexCodetextReader.javaClassName);
let mwSwissQRCodetextObject = MwComplexCodetextReaderClass.tryDecodeSwissQRSync(encodedCodetext);
return mwSwissQRCodetextObject === null ? null : SwissQRCodetext.construct(mwSwissQRCodetextObject);
}
/**
* Decodes Royal Mail Mailmark 2D codetext.<br>
* @param encodedCodetext encoded codetext<br>
* @return decoded Royal Mail Mailmark 2D or null.
*/
static tryDecodeMailmark2D(encodedCodetext)
{
let javaJsComplexCodetextReader = java.import(ComplexCodetextReader.javaClassName);
let javaMailmark2D = javaJsComplexCodetextReader.tryDecodeMailmark2DSync(encodedCodetext);
return javaMailmark2D !== null ? Mailmark2DCodetext.construct(javaMailmark2D) : null;
}
/**
* Decodes Mailmark Barcode C and L codetext.<br>
* @param encodedCodetext encoded codetext<br>
* @return Decoded Mailmark Barcode C and L or null.
*/
static tryDecodeMailmark(encodedCodetext)
{
let res = new MailmarkCodetext(null);
try
{
res.initFromString(encodedCodetext);
}
catch (e)
{
return null;
}
return res;
}
/**
* Decodes MaxiCode codetext.
* @param maxiCodeMode MaxiCode mode
* @param encodedCodetext encoded codetext
* @return Decoded MaxiCode codetext.
*/
static tryDecodeMaxiCode(maxiCodeMode, encodedCodetext)
{
let javaComplexCodetextReaderClass = java.import(ComplexCodetextReader.javaClassName);
let javaMaxiCodeCodetextMode2Class = java.import(MaxiCodeCodetextMode2.JAVA_CLASS_NAME);
let javaMaxiCodeCodetextMode3Class = java.import(MaxiCodeCodetextMode3.JAVA_CLASS_NAME);
let javaMaxiCodeCodetext = javaComplexCodetextReaderClass.tryDecodeMaxiCodeSync(maxiCodeMode, encodedCodetext);
if(javaMaxiCodeCodetext == null)
{
return null;
}
if(javaMaxiCodeCodetext.getClassSync().equalsSync(javaMaxiCodeCodetextMode2Class.class))
{
return MaxiCodeCodetextMode2.construct(javaMaxiCodeCodetext);
}
else if(javaMaxiCodeCodetext.getClassSync().equalsSync(javaMaxiCodeCodetextMode3Class.class))
{
return MaxiCodeCodetextMode3.construct(javaMaxiCodeCodetext);
}
else
{
return MaxiCodeStandardCodetext.construct(javaMaxiCodeCodetext);
}
}
/**
* <p>
* Decodes HIBC LIC codetext.
* </p>
* @return decoded HIBC LIC Complex Codetext or null.
* @param encodedCodetext encoded codetext
*/
static tryDecodeHIBCLIC(encodedCodetext)
{
let javaHIBCLICSecondaryAndAdditionalDataCodetextClass = java.import(HIBCLICSecondaryAndAdditionalDataCodetext.JAVA_CLASS_NAME);
let javaHIBCLICPrimaryDataCodetextClass = java.import(HIBCLICPrimaryDataCodetext.JAVA_CLASS_NAME);
let javaHIBCLICCombinedCodetextClass = java.import(HIBCLICCombinedCodetext.JAVA_CLASS_NAME);
let javaNodeJsComplexCodetextReaderJavaClass = java.import(ComplexCodetextReader.javaClassName);
let hibclicComplexCodetext = javaNodeJsComplexCodetextReaderJavaClass.tryDecodeHIBCLICSync(encodedCodetext);
if(hibclicComplexCodetext == null)
return null;
if(hibclicComplexCodetext.getClassSync().equalsSync(javaHIBCLICSecondaryAndAdditionalDataCodetextClass.class))
{
return HIBCLICSecondaryAndAdditionalDataCodetext.construct(hibclicComplexCodetext);
}
else if(hibclicComplexCodetext.getClassSync().equalsSync(javaHIBCLICPrimaryDataCodetextClass.class))
{
return HIBCLICPrimaryDataCodetext.construct(hibclicComplexCodetext);
}
else if(hibclicComplexCodetext.getClassSync().equalsSync(javaHIBCLICCombinedCodetextClass.class))
{
return HIBCLICCombinedCodetext.construct(hibclicComplexCodetext);
}
return null;
}
/**
* <p>
* Decodes HIBC PAS codetext.
* </p>
* @return decoded HIBC PAS Complex Codetext or null.
* @param encodedCodetext encoded codetext
*/
static tryDecodeHIBCPAS(encodedCodetext)
{
let javaComplexCodetextReader = java.import(ComplexCodetextReader.javaClassName);
let javaHIBCPAS = javaComplexCodetextReader.tryDecodeHIBCPASSync(encodedCodetext);
if((javaHIBCPAS) == null)
return null;
return HIBCPASCodetext.construct(javaHIBCPAS);
}
/**
* <p>
* Decodes USADriveId codetext.
* </p>
* @return Decoded USADriveId or null.
* @param encodedCodetext Encoded codetext
*/
static tryDecodeUSADriveId(encodedCodetext)
{
let javaComplexCodetextReader = java.import(ComplexCodetextReader.javaClassName);
let usaDriveIdCodetext = javaComplexCodetextReader.tryDecodeUSADriveIdSync(encodedCodetext);
return usaDriveIdCodetext == null ? null : new USADriveIdCodetext(usaDriveIdCodetext);
}
}
/**
* SwissQR bill standard version
* @enum
*/
QrBillStandardVersion =
{
/**
*
* Version 2.0
*
*/
V2_0: 0
};
/**
* SwissQR bill data
*/
class SwissQRBill extends joint.BaseJavaClass {
creditor;
debtor;
init() {
this.creditor = Address.construct(this.getJavaClass().getCreditorSync());
this.debtor = Address.construct(this.getJavaClass().getDebtorSync());
}
constructor(javaClass) {
super(javaClass);
this.init();
}
static convertAlternativeSchemes(javaAlternativeSchemes) {
let alternativeSchemes = [];
for (let i = 0; i < javaAlternativeSchemes.sizeSync(); i++) {
alternativeSchemes[i] = AlternativeScheme.construct(javaAlternativeSchemes.getSync(i));
}
return alternativeSchemes;
}
/**
* Gets the version of the SwissQR bill standard.
* @return The SwissQR bill standard version.
*/
getVersion() {
return this.getJavaClass().getVersionSync();
}
/**
* Sets the version of the SwissQR bill standard.<br>
* @param value The SwissQR bill standard version.
*/
setVersion(value) {
this.getJavaClass().setVersionSync(value);
}
/**
* Gets the payment amount.<br>
* <br>
* Valid values are between 0.01 and 999,999,999.99.
*
* @return The payment amount.
*/
getAmount() {
return this.getJavaClass().getAmountSync();
}
/**
* Sets the payment amount.<br>
* Valid values are between 0.01 and 999,999,999.99.
*
* @param value The payment amount.
*/
setAmount(value) {
this.getJavaClass().setAmountSync(value);
}
/**
* Gets the payment currency.<br>
*
* Valid values are "CHF" and "EUR".
*
* @return The payment currency.
*/
getCurrency() {
return this.getJavaClass().getCurrencySync();
}
/**
* Sets the payment currency.<br>
*
* @param value Valid values are "CHF" and "EUR".
*/
setCurrency(value) {
this.getJavaClass().setCurrencySync(value);
}
/**
* Gets the creditor's account number.<br>
* <br>
* Account numbers must be valid IBANs of a bank of Switzerland or<br>
* Liechtenstein. Spaces are allowed in the account number.<br>
*
* @return The creditor account number.
*/
getAccount() {
return this.getJavaClass().getAccountSync();
}
/**
* Sets the creditor's account number.<br>
* <br>
* Account numbers must be valid IBANs of a bank of Switzerland<br> or<br>
* Liechtenstein. Spaces are allowed in the account number.
*
* @param value: The creditor account number.
*/
setAccount(value) {
this.getJavaClass().setAccountSync(value);
}
/**
* Gets the creditor address.
* @return The creditor address.
*/
getCreditor() {
return this.creditor;
}
/**
* Sets the creditor address.
* @param value: The creditor address.
*/
setCreditor(value) {
this.creditor = value;
this.getJavaClass().setCreditorSync(value.getJavaClass());
}
/**
* Gets the creditor payment reference.<br>
* <br>
* The reference is mandatory for SwissQR IBANs, i.e.IBANs in the range<br>
* CHxx30000xxxxxx through CHxx31999xxxxx.<br>
* <br>
* If specified, the reference must be either a valid SwissQR reference<br>
* (corresponding to ISR reference form) or a valid creditor reference<br>
* according to ISO 11649 ("RFxxxx"). Both may contain spaces for formatting.<br>
*
* @return The creditor payment reference.
*/
getReference() {
return this.getJavaClass().getReferenceSync();
}
/**
* Sets the creditor payment reference.<br>
* <br>
* The reference is mandatory for SwissQR IBANs, i.e.IBANs in the range<br>
* CHxx30000xxxxxx through CHxx31999xxxxx.<br>
* <br>
* If specified, the reference must be either a valid SwissQR reference<br>
* (corresponding to ISR reference form) or a valid creditor reference<br>
* according to ISO 11649 ("RFxxxx"). Both may contain spaces for formatting.
*
* @param value The creditor payment reference.
*/
setReference(value) {
this.getJavaClass().setReferenceSync(value);
}
/**
* Creates and sets a ISO11649 creditor reference from a raw string by prefixing<br>
* the String with "RF" and the modulo 97 checksum.<br>
* <br>
* Whitespace is removed from the reference<br>
* <br>
* @exception ArgumentException rawReference contains invalid characters.
* @param rawReference The raw reference.
*/
createAndSetCreditorReference(rawReference) {
this.getJavaClass().createAndSetCreditorReferenceSync(rawReference);
}
/**
* Gets the debtor address.<br>
* <br>
* The debtor is optional. If it is omitted, both setting this field to<br>
* null or setting an address with all null or empty values is ok.<br>
* <br>
* @return The debtor address.
*/
getDebtor() {
return this.debtor;
}
/**
* Sets the debtor address.<br>
* <br>
* The debtor is optional. If it is omitted, both setting this field to<br>
* null or setting an address with all null or empty values is ok.
*
* @param value: The debtor address.
*/
setDebtor(value) {
this.debtor = value;
this.getJavaClass().setDebtorSync(value.getJavaClass());
}
/**
* Gets the additional unstructured message.
* @return The unstructured message.
*/
getUnstructuredMessage() {
return this.getJavaClass().getUnstructuredMessageSync();
}
/**
* Sets the additional unstructured message.
* @param value: The unstructured message.
*/
setUnstructuredMessage(value) {
this.getJavaClass().setUnstructuredMessageSync(value);
}
/**
* Gets the additional structured bill information.
* @return The structured bill information.
*/
getBillInformation() {
return this.getJavaClass().getBillInformationSync();
}
/**
* Sets the additional structured bill information.
* @param value: The structured bill information.
*/
setBillInformation(value) {
this.getJavaClass().setBillInformationSync(value);
}
/**
* Gets ors sets the alternative payment schemes.<br>
* <br>
* A maximum of two schemes with parameters are allowed.
*
* @return The alternative payment schemes.
*/
getAlternativeSchemes() {
return SwissQRBill.convertAlternativeSchemes(this.getJavaClass().getAlternativeSchemesSync());
}
/**
* Gets or sets the alternative payment schemes. <br>
* <br>
* A maximum of two schemes with parameters are allowed.<br>
*
* @param value: The alternative payment schemes.
*/
setAlternativeSchemes(value) {
let ArrayList = java.import('java.util.ArrayList');
let javaArray = new ArrayList();
for(let i = 0; i < value.length; i++)
{
javaArray.addSync(value[i].getJavaClass());
}
this.getJavaClass().setAlternativeSchemesSync(javaArray);
}
/**
* Determines whether the specified object is equal to the current object.
* @return true if the specified object is equal to the current object; otherwise, false.
* @param obj The object to compare with the current object.
*/
equals(obj) {
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* Gets the hash code for this instance.
* @return A hash code for the current object.
*/
hashCode() {
return this.getJavaClass().hashCodeSync();
}
}
/**
* Class for encoding and decoding the text embedded in the SwissQR code.
*/
class SwissQRCodetext extends IComplexCodetext {
static javaClassName = "com.aspose.mw.barcode.complexbarcode.MwSwissQRCodetext";
bill;
init() {
this.bill = new SwissQRBill(this.getJavaClass().getBillSync());
}
/**
* SwissQR bill data
*/
getBill() {
return this.bill;
}
/**
* Creates an instance of SwissQRCodetext.
*
* @param bill SwissQR bill data
* @throws BarcodeException
*/
constructor(bill) {
let java_class_link = java.import(SwissQRCodetext.javaClassName);
let javaBill = null;
if (bill == null)
{
javaBill = new java_class_link();
}
else
{
javaBill = new java_class_link(bill.getJavaClass());
}
super(javaBill);
this.init();
}
static construct(javaClass)
{
let phpClass = new SwissQRCodetext(null);
phpClass.setJavaClass(javaClass);
return phpClass;
}
/**
* Construct codetext from SwissQR bill data
*
* @return Constructed codetext
*/
getConstructedCodetext() {
return this.getJavaClass().getConstructedCodetextSync();
}
/**
* Initializes Bill with constructed codetext.
*
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext) {
this.getJavaClass().initFromStringSync(constructedCodetext);
this.init();
}
/**
* Gets barcode type.
*
* @return Barcode type.
*/
getBarcodeType() {
return this.getJavaClass().getBarcodeTypeSync();
}
}
/**
* Class for encoding and decoding the text embedded in the 4-state Royal Mailmark code.
*/
class MailmarkCodetext extends IComplexCodetext
{
static javaClassName = "com.aspose.mw.barcode.complexbarcode.MwMailmarkCodetext";
/**
* "0" – Null or Test<br>
* "1" – Letter<br>
* "2" – Large Letter
*/
getFormat()
{ return this.getJavaClass().getFormatSync(); }
/**
* "0" – Null or Test<br>
* "1" – LetterN<br>
* "2" – Large Letter
*/
setFormat(value)
{ this.getJavaClass().setFormatSync(value); }
/**
* Currently "1" – For Mailmark barcode (0 and 2 to 9 and A to Z spare for future use)
*/
getVersionID()
{ return this.getJavaClass().getVersionIDSync(); }
/**
* Currently "1" – For Mailmark barcode (0 and 2 to 9 and A to Z spare for future use)
*/
setVersionID(value)
{ this.getJavaClass().setVersionIDSync(value); }
/**
* "0" - Null or Test<br>
* "1" - 1C (Retail)<br>
* "2" - 2C (Retail)<br>
* "3" - 3C (Retail)<br>
* "4" - Premium (RetailPublishing Mail) (for potential future use)<br>
* "5" - Deferred (Retail)<br>
* "6" - Air (Retail) (for potential future use)<br>
* "7" - Surface (Retail) (for potential future use)<br>
* "8" - Premium (Network Access)<br>
* "9" - Standard (Network Access)<br>
*/
getClass_()
{
return this.getJavaClass().getClass_Sync();
}
/**
* "0" - Null or Test<br>
* "1" - 1C (Retail)<br>
* "2" - 2C (Retail)<br>
* "3" - 3C (Retail)<br>
* "4" - Premium (RetailPublishing Mail) (for potential future use)<br>
* "5" - Deferred (Retail)<br>
* "6" - Air (Retail) (for potential future use)<br>
* "7" - Surface (Retail) (for potential future use)<br>
* "8" - Premium (Network Access)<br>
* "9" - Standard (Network Access)
*/
setClass_(value)
{
this.getJavaClass().setClassSync(value);
}
/**
* Maximum values are 99 for Barcode C and 999999 for Barcode L.
*/
getSupplychainID()
{ return this.getJavaClass().getSupplychainIDSync(); }
/**
* Maximum values are 99 for Barcode C and 999999 for Barcode L.
*/
setSupplychainID(value)
{ this.getJavaClass().setSupplychainIDSync(value); }
/**
* Maximum value is 99999999.
*/
getItemID()
{ return this.getJavaClass().getItemIDSync(); }
/**
* Maximum value is 99999999.
*/
setItemID(value)
{ this.getJavaClass().setItemIDSync(value); }
/**
* The PC and DP must comply with a PAF format.<br>
* Nine character string denoting international "XY11 " (note the 5 trailing spaces) or a pattern<br>
* of characters denoting a domestic sorting code.<br>
* A domestic sorting code consists of an outward postcode, an inward postcode, and a Delivery Point Suffix.
*/
getDestinationPostCodePlusDPS()
{ return this.getJavaClass().getDestinationPostCodePlusDPSSync(); }
/**
* The PC and DP must comply with a PAF format.<br>
* Nine character string denoting international "XY11 " (note the 5 trailing spaces) or a pattern<br>
* of characters denoting a domestic sorting code.<br>
* A domestic sorting code consists of an outward postcode, an inward postcode, and a Delivery Point Suffix.
*/
setDestinationPostCodePlusDPS(value)
{ this.getJavaClass().setDestinationPostCodePlusDPSSync(value); }
/**
* Initializes a new instance of the {@code MailmarkCodetext} class.
*/
constructor(mailmarkCodetext)
{
let java_class_link = java.import(MailmarkCodetext.javaClassName);
let javaClass = null;
if (mailmarkCodetext == null)
{
javaClass = new java_class_link();
}
else
{
javaClass = new java_class_link(mailmarkCodetext.getJavaClass());
}
super(javaClass);
}
init()
{}
/**
* Construct codetext from Mailmark data.
*
* @return Constructed codetext
*/
getConstructedCodetext()
{
return this.getJavaClass().getConstructedCodetextSync();
}
/**
* Initializes Mailmark data from constructed codetext.
*
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext)
{
this.getJavaClass().initFromStringSync(constructedCodetext);
}
/**
* Gets barcode type.
*
* @return Barcode type.
*/
getBarcodeType()
{
return this.getJavaClass().getBarcodeTypeSync();
}
}
/**
* Class for encoding and decoding the text embedded in the Royal Mail 2D Mailmark code.
*/
class Mailmark2DCodetext extends IComplexCodetext
{
static javaClassName = "com.aspose.mw.barcode.complexbarcode.MwMailmark2DCodetext";
static construct(javaClass)
{
let jsClass = new Mailmark2DCodetext();
jsClass.setJavaClass(javaClass);
return jsClass;
}
/**
* Identifies the UPU Country ID.Max length: 4 characters.
* @return Country ID
*/
getUPUCountryID()
{
return this.getJavaClass().getUPUCountryIDSync();
}
/**
* Identifies the UPU Country ID.Max length: 4 characters.
* @param value Country ID
*/
setUPUCountryID(value)
{
this.getJavaClass().setUPUCountryIDSync(value);
}
/**
* Identifies the Royal Mail Mailmark barcode payload for each product type.<br>
* Valid Values:<br>
* <br>
* '0' - Domestic Sorted & Unsorted<br>
* 'A' - Online Postage<br>
* 'B' - Franking<br>
* 'C' - Consolidation
*
* @return Information type ID
*/
getInformationTypeID()
{
return this.getJavaClass().getInformationTypeIDSync();
}
/**
* Identifies the Royal Mail Mailmark barcode payload for each product type.<br>
* Valid Values:<br>
* <br>
* '0' - Domestic Sorted & Unsorted<br>
* 'A' - Online Postage<br>
* 'B' - Franking<br>
* 'C' - Consolidation
*
* @param value Information type ID
*/
setInformationTypeID(value)
{
this.getJavaClass().setInformationTypeIDSync(value);
}
/**
* Identifies the barcode version as relevant to each Information Type ID.<br>
* Valid Values:<br>
* <br>
* Currently '1'.<br>
* '0' & '2' to '9' and 'A' to 'Z' spare reserved for potential future use.
*
* @return Version ID
*/
getVersionID()
{
return this.getJavaClass().getVersionIDSync();
}
/**
* Identifies the barcode version as relevant to each Information Type ID.<br>
* Valid Values:<br>
* <br>
* Currently '1'.<br>
* '0' & '2' to '9' and 'A' to 'Z' spare reserved for potential future use.
*
* @param value Version ID
*/
setVersionID(value)
{
this.getJavaClass().setVersionIDSync(value);
}
/**
* Identifies the class of the item.<br>
* <br>
* Valid Values:<br>
* '1' - 1C (Retail)<br>
* '2' - 2C (Retail)<br>
* '3' - Economy (Retail)<br>
* '5' - Deffered (Retail)<br>
* '8' - Premium (Network Access)<br>
* '9' - Standard (Network Access)
*
* @return class of the item
*/
getClass_()
{
return this.getJavaClass().getClass_Sync();
}
/**
* Identifies the class of the item.<br>
* <br>
* Valid Values:<br>
* '1' - 1C (Retail)<br>
* '2' - 2C (Retail)<br>
* '3' - Economy (Retail)<br>
* '5' - Deffered (Retail)<br>
* '8' - Premium (Network Access)<br>
* '9' - Standard (Network Access)
*
* @param value class of the item
*/
setClass_(value)
{
this.getJavaClass().setclassSync(value);
}
/**
* Identifies the unique group of customers involved in the mailing.<br>
* Max value: 9999999.
*
* @return Supply chain ID
*/
getSupplyChainID()
{
return this.getJavaClass().getSupplyChainIDSync();
}
/**
* Identifies the unique group of customers involved in the mailing.<br>
* Max value: 9999999.
*
* @param value Supply chain ID
*/
setSupplyChainID(value)
{
this.getJavaClass().setSupplyChainIDSync(value);
}
/**
* Identifies the unique item within the Supply Chain ID.<br>
* Every Mailmark barcode is required to carry an ID<br>
* so it can be uniquely identified for at least 90 days.<br>
* Max value: 99999999.
*
* @return item within the Supply Chain ID
*/
getItemID()
{
return this.getJavaClass().getItemIDSync();
}
/**
* Identifies the unique item within the Supply Chain ID.<br>
* Every Mailmark barcode is required to carry an ID<br>
* so it can be uniquely identified for at least 90 days.<br>
* Max value: 99999999.
*
* @param value item within the Supply Chain ID
*/
setItemID(value)
{
this.getJavaClass().setItemIDSync(value);
}
/**
* Contains the Postcode of the Delivery Address with DPS<br>
* If inland the Postcode/DP contains the following number of characters.<br>
* Area (1 or 2 characters) District(1 or 2 characters)<br>
* Sector(1 character) Unit(2 characters) DPS (2 characters).<br>
* The Postcode and DPS must comply with a valid PAF® format.
*
* @return the Postcode of the Delivery Address with DPS
*/
getDestinationPostCodeAndDPS()
{
return this.getJavaClass().getDestinationPostCodeAndDPSSync();
}
/**
* Contains the Postcode of the Delivery Address with DPS<br>
* If inland the Postcode/DP contains the following number of characters.<br>
* Area (1 or 2 characters) District(1 or 2 characters)<br>
* Sector(1 character) Unit(2 characters) DPS (2 characters).<br>
* The Postcode and DPS must comply with a valid PAF® format.
*
* @param value the Postcode of the Delivery Address with DPS
*/
setDestinationPostCodeAndDPS(value)
{
this.getJavaClass().setDestinationPostCodeAndDPSSync(value);
}
/**
* Flag which indicates what level of Return to Sender service is being requested.
*
* @return RTS Flag
*/
getRTSFlag()
{
return this.getJavaClass().getRTSFlagSync();
}
/**
* Flag which indicates what level of Return to Sender service is being requested.
*
* @return RTS Flag
*/
setRTSFlag(value)
{
this.getJavaClass().setRTSFlagSync(value);
}
/**
* Contains the Return to Sender Post Code but no DPS.<br>
* The PC(without DPS) must comply with a PAF® format.
*
* @return Return to Sender Post Code but no DPS
*/
getReturnToSenderPostCode()
{
return this.getJavaClass().getReturnToSenderPostCodeSync();
}
/**
* Contains the Return to Sender Post Code but no DPS.<br>
* The PC(without DPS) must comply with a PAF® format.
*
* @param value Return to Sender Post Code but no DPS
*/
setReturnToSenderPostCode(value)
{
this.getJavaClass().setReturnToSenderPostCodeSync(value);
}
/**
* Optional space for use by customer.<br>
* <br>
* Max length by Type:<br>
* Type 7: 6 characters<br>
* Type 9: 45 characters<br>
* Type 29: 25 characters
*
* @return Customer content
*/
getCustomerContent()
{
return this.getJavaClass().getCustomerContentSync();
}
/**
* Optional space for use by customer.<br>
* <br>
* Max length by Type:<br>
* Type 7: 6 characters<br>
* Type 9: 45 characters<br>
* Type 29: 25 characters
*
* @param value Customer content
*/
setCustomerContent(value)
{
this.getJavaClass().setCustomerContentSync(value);
}
/**
* Encode mode of Datamatrix barcode.<br>
* Default value: DataMatrixEncodeMode.C40.
*
* @return Encode mode of Datamatrix barcode.
*/
getCustomerContentEncodeMode()
{
return this.getJavaClass().getCustomerContentEncodeModeSync();
}
/**
* Encode mode of Datamatrix barcode.<br>
* Default value: DataMatrixEncodeMode.C40.
*
* @param value Encode mode of Datamatrix barcode.
*/
setCustomerContentEncodeMode(value)
{
this.getJavaClass().setCustomerContentEncodeModeSync(value);
}
/**
* 2D Mailmark Type defines size of Data Matrix barcode.
*
* @return Size of Data Matrix barcode
*/
getDataMatrixType()
{
return this.getJavaClass().getDataMatrixTypeSync();
}
/**
* 2D Mailmark Type defines size of Data Matrix barcode.
*
* @param value Size of Data Matrix barcode
*/
setDataMatrixType(value)
{
this.getJavaClass().setDataMatrixTypeSync(value);
}
/**
* Create default instance of Mailmark2DCodetext class.
*/
constructor()
{
let java_class_link = java.import(Mailmark2DCodetext.javaClassName);
super(new java_class_link());
this.init();
}
init()
{}
/**
* Construct codetext from Mailmark data.
* @return Constructed codetext
*/
getConstructedCodetext()
{
return this.getJavaClass().getConstructedCodetextSync();
}
/**
* Initializes Mailmark data from constructed codetext.
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext)
{
this.getJavaClass().initFromStringSync(constructedCodetext);
}
/**
* Gets barcode type.
* @return Barcode type.
*/
getBarcodeType() {
return EncodeTypes.DATA_MATRIX;
}
}
/**
* Base class for encoding and decoding the text embedded in the MaxiCode code.<br>
* <br>
* This sample shows how to decode raw MaxiCode codetext to MaxiCodeCodetext instance.
*
* @example
* let reader = new BarCodeReader("c:\\test.png", null, DecodeType.MAXI_CODE);
* let results = reader.readBarCodes();
* for(let i = 0; i < results.length; i++)
* {
* let result = results[i];
* let resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText());
* console.log("BarCode Type: " + resultMaxiCodeCodetext.getBarcodeType());
* console.log("MaxiCode mode: " + resultMaxiCodeCodetext.getMode());
* console.log("BarCode CodeText: " + resultMaxiCodeCodetext.getConstructedCodetext());
* }
*/
class MaxiCodeCodetext extends IComplexCodetext
{
/**
* Gets MaxiCode mode.
* @return MaxiCode mode
*/
getMode()
{
}
/**
* Gets a MaxiCode encode mode.
*/
getMaxiCodeEncodeMode()
{
return this.getJavaClass().getMaxiCodeEncodeModeSync();
}
/**
* Sets a MaxiCode encode mode.
*/
setMaxiCodeEncodeMode(value)
{
this.getJavaClass().setMaxiCodeEncodeModeSync(value);
}
/**
* Gets ECI encoding. Used when MaxiCodeEncodeMode is AUTO.
*/
getECIEncoding()
{
return this.getJavaClass().getECIEncodingSync();
}
/**
* Sets ECI encoding. Used when MaxiCodeEncodeMode is AUTO.
*/
setECIEncoding(value)
{
this.getJavaClass().setECIEncodingSync(value);
}
/**
* Gets barcode type.
* @return Barcode type
*/
getBarcodeType()
{
return this.getJavaClass().getBarcodeTypeSync();
}
}
/**
* Class for encoding and decoding MaxiCode codetext for modes 4, 5 and 6.
* @example
* //Mode 4
* let maxiCodeCodetext = new MaxiCodeStandardCodetext();
* maxiCodeCodetext.setMode(MaxiCodeMode.MODE_4);
* maxiCodeCodetext.setMessage("Test message");
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext());
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
*
* @example
* //Mode 5
* let maxiCodeCodetext = new MaxiCodeStandardCodetext();
* maxiCodeCodetext.setMode(MaxiCodeMode.MODE_5);
* maxiCodeCodetext.setMessage("Test message");
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext());
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
*
* @example
* //Mode 6
* let maxiCodeCodetext = new MaxiCodeStandardCodetext();
* maxiCodeCodetext.setMode(MaxiCodeMode.MODE_6);
* maxiCodeCodetext.setMessage("Test message");
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext());
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
*/
class MaxiCodeSecondMessage extends joint.BaseJavaClass
{
getMessage()
{}
}
/**
* Class for encoding and decoding MaxiCode codetext for modes 4, 5 and 6.
*
* @example
* //Mode 4
* let maxiCodeCodetext = new MaxiCodeStandardCodetext();
* maxiCodeCodetext.setMode(MaxiCodeMode.MODE_4);
* maxiCodeCodetext.setMessage("Test message");
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext());
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
*
* @example
* //Mode 5
* let maxiCodeCodetext = new MaxiCodeStandardCodetext();
* maxiCodeCodetext.setMode(MaxiCodeMode.MODE_5);
* maxiCodeCodetext.setMessage("Test message");
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext());
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
*
* @example
* //Mode 6
* let maxiCodeCodetext = new MaxiCodeStandardCodetext();
* maxiCodeCodetext.setMode(MaxiCodeMode.MODE_6);
* maxiCodeCodetext.setMessage("Test message");
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext());
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
*/
class MaxiCodeStandardCodetext extends MaxiCodeCodetext
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwMaxiCodeStandardCodetext";
constructor()
{
try
{
let java_class = java.import(MaxiCodeStandardCodetext.JAVA_CLASS_NAME);
super(new java_class());
}
catch (ex)
{
throw new BarcodeException(ex);
}
}
static construct(javaClass)
{
let _class = new MaxiCodeStandardCodetext();
_class.setJavaClass(javaClass);
return _class;
}
/**
* Gets message.
*/
getMessage()
{
return this.getJavaClass().getMessageSync();
}
/**
* Sets message.
*/
setMessage(value)
{
this.getJavaClass().setMessageSync(value);
}
/**
* Sets MaxiCode mode. Standart codetext can be used only with modes 4, 5 and 6.
*/
setMode(mode)
{
this.getJavaClass().setModeSync(mode);
}
/**
* Gets MaxiCode mode.
* @return MaxiCode mode
*/
getMode()
{
return this.getJavaClass().getModeSync();
}
/**
* Constructs codetext
* @return Constructed codetext
*/
getConstructedCodetext()
{
return this.getJavaClass().getConstructedCodetextSync();
}
/**
* Initializes instance from constructed codetext.
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext)
{
this.getJavaClass().initFromStringSync(constructedCodetext);
}
/**
* Returns a value indicating whether this instance is equal to a specified <see cref="MaxiCodeStandardCodetext"/> value.
* @param obj An <see cref="MaxiCodeStandardCodetext"/> value to compare to this instance.
* @return if obj has the same value as this instance; otherwise, <b>false</b>.
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* Returns the hash code for this instance.
* @return A 32-bit signed integer hash code
*/
getHashCode()
{
return this.getJavaClass().getHashCodeSync();
}
init()
{
}
}
/**
* Class for encoding and decoding standart second message for MaxiCode barcode.
*/
class MaxiCodeStandartSecondMessage extends MaxiCodeSecondMessage
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwMaxiCodeStandartSecondMessage";
constructor()
{
try
{
let java_class_link = java.import(MaxiCodeStandartSecondMessage.JAVA_CLASS_NAME);
let javaClass = new java_class_link();
super(javaClass);
}
catch (ex)
{
throw new BarcodeException(ex);
}
}
static construct(javaClass)
{
let _class = new MaxiCodeStandartSecondMessage();
_class.setJavaClass(javaClass);
return _class;
}
/**
* Sets second message
*/
setMessage(value)
{
this.getJavaClass().setMessageSync(value);
}
/**
* Gets second message
*/
getMessage()
{
return this.getJavaClass().getMessageSync();
}
/**
* Returns a value indicating whether this instance is equal to a specified <see cref="MaxiCodeStandartSecondMessage"/> value.
* @param obj An <see cref="MaxiCodeStandartSecondMessage"/> value to compare to this instance
* @return <b>true</b> if obj has the same value as this instance; otherwise, <b>false</b>.
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* Returns the hash code for this instance.<br>
* @return A 32-bit signed integer hash code.
*/
getHashCode()
{
return this.getJavaClass().getHashCodeSync();
}
init()
{
}
}
/**
* Base class for encoding and decoding the text embedded in the MaxiCode code for modes 2 and 3.
*
* @example
* This sample shows how to decode raw MaxiCode codetext to MaxiCodeStructuredCodetext instance.
*
* let reader = new BarCodeReader("c:\\test.png", null, DecodeType.MAXI_CODE);
* let results = reader.readBarCodes();
* for(let i = 0; i < results.length; i++)
* {
* let result = results[i];
* let resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText());
* if (resultMaxiCodeCodetext instanceof MaxiCodeStructuredCodetext)
* {
* let maxiCodeStructuredCodetext = resultMaxiCodeCodetext;
* console.log("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode());
* console.log("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode());
* console.log("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory());
* }
* }
*/
class MaxiCodeStructuredCodetext extends MaxiCodeCodetext
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwMaxiCodeStructuredCodetext";
maxiCodeSecondMessage;
constructor(javaClass)
{
try
{
super(javaClass);
}
catch (ex)
{
throw new joint.BarcodeException(ex);
}
}
init()
{
let javaMaxiCodeSecondMessage = this.getJavaClass().getSecondMessageSync();
let javaMaxiCodeStandartSecondMessageClass = java.import(MaxiCodeStandartSecondMessage.JAVA_CLASS_NAME);
let javaMaxiCodeStandartSecondMessage = new javaMaxiCodeStandartSecondMessageClass();
let javaMaxiCodeStructuredSecondMessageClass = java.import(MaxiCodeStructuredSecondMessage.JAVA_CLASS_NAME);
let javaMaxiCodeStructuredSecondMessage = new javaMaxiCodeStructuredSecondMessageClass();
if(javaMaxiCodeSecondMessage === null)
{
this.maxiCodeSecondMessage = null;
}
else if(java.instanceOf(javaMaxiCodeSecondMessage, javaMaxiCodeStandartSecondMessage.getClassSync().getNameSync()))
{
this.maxiCodeSecondMessage = MaxiCodeStandartSecondMessage.construct(this.getJavaClass().getSecondMessageSync());
}
else if(java.instanceOf(javaMaxiCodeSecondMessage, javaMaxiCodeStructuredSecondMessage.getClassSync().getNameSync()))
{
this.maxiCodeSecondMessage = MaxiCodeStructuredSecondMessage.construct(this.getJavaClass().getSecondMessageSync());
}
}
/**
* Identifies the postal code. Must be 9 digits in mode 2 or<br>
* 6 alphanumeric symbols in mode 3.
*/
getPostalCode()
{
return this.getJavaClass().getPostalCodeSync();
}
/**
* Identifies the postal code. Must be 9 digits in mode 2 or
* 6 alphanumeric symbols in mode 3.
*/
setPostalCode(value)
{
this.getJavaClass().setPostalCodeSync(value);
}
/**
* Identifies 3 digit country code.
*/
getCountryCode()
{
return this.getJavaClass().getCountryCodeSync();
}
/**
* Identifies 3 digit country code.
*/
setCountryCode(value)
{
this.getJavaClass().setCountryCodeSync(value);
}
/**
* Identifies 3 digit service category.
*/
getServiceCategory()
{
return this.getJavaClass().getServiceCategorySync();
}
/**
* Identifies 3 digit service category.
*/
setServiceCategory(value)
{
this.getJavaClass().setServiceCategorySync(value);
}
/**
* Identifies second message of the barcode.
*/
getSecondMessage()
{
return this.maxiCodeSecondMessage;
}
/**
* Identifies second message of the barcode.
*/
setSecondMessage(value)
{
this.maxiCodeSecondMessage = value;
this.getJavaClass().setSecondMessageSync(value.getJavaClass());
}
/**
* Constructs codetext
* @return Constructed codetext
*/
getConstructedCodetext()
{
return this.getJavaClass().getConstructedCodetextSync();
}
/**
* Initializes instance from constructed codetext.
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext)
{
this.getJavaClass().initFromStringSync(constructedCodetext);
}
/**
* Returns a value indicating whether this instance is equal to a specified <see cref="MaxiCodeStructuredCodetext"/> value.
* @param obj An <see cref="MaxiCodeStructuredCodetext"/> value to compare to this instance
* @return <b>true</b> if obj has the same value as this instance; otherwise, <b>false</b>
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* Returns the hash code for this instance.
* @return A 32-bit signed integer hash code.
*/
getHashCode()
{
return this.getJavaClass().getHashCodeSync();
}
}
/**
* Class for encoding and decoding the text embedded in the MaxiCode code for modes 2.
*
* @example
* This sample shows how to encode and decode MaxiCode codetext for mode 2.
* //Mode 2 with standart second message
* let maxiCodeCodetext = new MaxiCodeCodetextMode2();
* maxiCodeCodetext.setPostalCode("524032140");
* maxiCodeCodetext.setCountryCode(056);
* maxiCodeCodetext.setServiceCategory(999);
* let maxiCodeStandartSecondMessage = new MaxiCodeStandartSecondMessage();
* maxiCodeStandartSecondMessage.setMessage("Test message");
* maxiCodeCodetext.setSecondMessage(maxiCodeStandartSecondMessage);
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
*
* @example
* //Mode 2 with structured second message
* let maxiCodeCodetext = new MaxiCodeCodetextMode2();
* maxiCodeCodetext.setPostalCode("524032140");
* maxiCodeCodetext.setCountryCode(056);
* maxiCodeCodetext.setServiceCategory(999);
* let maxiCodeStructuredSecondMessage = new MaxiCodeStructuredSecondMessage();
* maxiCodeStructuredSecondMessage.add("634 ALPHA DRIVE");
* maxiCodeStructuredSecondMessage.add("PITTSBURGH");
* maxiCodeStructuredSecondMessage.add("PA");
* maxiCodeStructuredSecondMessage.setYear(99);
* maxiCodeCodetext.setSecondMessage(maxiCodeStructuredSecondMessage);
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
*
* @example
* //Decoding raw codetext with standart second message
* let reader = new BarCodeReader("c:\\test.png", null, DecodeType.MAXI_CODE);
* let results = reader.readBarCodes();
* for(let i = 0; i < results.length; i++)
* {
* let result = results[i];
* let resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText());
* if (resultMaxiCodeCodetext instanceof MaxiCodeCodetextMode2)
* {
* let maxiCodeStructuredCodetext = resultMaxiCodeCodetext;
* console.log("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode());
* console.log("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode());
* console.log("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory());
* if (maxiCodeStructuredCodetext.getSecondMessage() instanceof MaxiCodeStandartSecondMessage)
* {
* let secondMessage = maxiCodeStructuredCodetext.getSecondMessage();
* console.log("Message: " + secondMessage.getMessage());
* }
* }
* }
*
* @example
* //Decoding raw codetext with structured second message
* let reader = new BarCodeReader("c:\\test.png", null, DecodeType.MAXI_CODE);
* let results = reader.readBarCodes();
* for(let i = 0; i < results.length; i++)
* {
* let result = results[i];
* let resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText());
* if (resultMaxiCodeCodetext instanceof MaxiCodeCodetextMode2){
* let maxiCodeStructuredCodetext = resultMaxiCodeCodetext;
* console.log("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode());
* console.log("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode());
* console.log("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory());
* if (maxiCodeStructuredCodetext.getSecondMessage() instanceof MaxiCodeStructuredSecondMessage){
* let secondMessage = maxiCodeStructuredCodetext.getSecondMessage();
* console.log("Message:");
* let identifiers = secondMessage.getIdentifiers();
* for(let i = 0; i < identifiers.length; i++)
* {
* let identifier = identifiers[i];
* console.log(identifier);
* };
* }
* }
* }
*/
class MaxiCodeCodetextMode2 extends MaxiCodeStructuredCodetext
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwMaxiCodeCodetextMode2";
constructor()
{
try
{
let java_class_link = java.import(MaxiCodeCodetextMode2.JAVA_CLASS_NAME);
let javaClass = new java_class_link();
super(javaClass);
}
catch (ex)
{
throw new BarcodeException(ex);
}
}
static construct(javaClass)
{
let _class = new MaxiCodeCodetextMode2();
_class.setJavaClass(javaClass);
return _class;
}
/**
* Gets MaxiCode mode.
* @return MaxiCode mode
*/
getMode()
{
return this.getJavaClass().getModeSync();
}
init()
{
super.init();
}
}
/**
* Class for encoding and decoding the text embedded in the MaxiCode code for modes 3.<br>
* This sample shows how to encode and decode MaxiCode codetext for mode 3.
* @example
* //Mode 3 with standart second message
* let maxiCodeCodetext = new MaxiCodeCodetextMode3();
* maxiCodeCodetext.setPostalCode("B1050");
* maxiCodeCodetext.setCountryCode(056);
* maxiCodeCodetext.setServiceCategory(999);
* let maxiCodeStandartSecondMessage = new MaxiCodeStandartSecondMessage();
* maxiCodeStandartSecondMessage.setMessage("Test message");
* maxiCodeCodetext.setSecondMessage(maxiCodeStandartSecondMessage);
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
*
* @example
* //Mode 3 with structured second message
* let maxiCodeCodetext = new MaxiCodeCodetextMode3();
* maxiCodeCodetext.setPostalCode("B1050");
* maxiCodeCodetext.setCountryCode(056);
* maxiCodeCodetext.setServiceCategory(999);
* let maxiCodeStructuredSecondMessage = new MaxiCodeStructuredSecondMessage();
* maxiCodeStructuredSecondMessage.add("634 ALPHA DRIVE");
* maxiCodeStructuredSecondMessage.add("PITTSBURGH");
* maxiCodeStructuredSecondMessage.add("PA");
* maxiCodeStructuredSecondMessage.setYear(99);
* maxiCodeCodetext.setSecondMessage(maxiCodeStructuredSecondMessage);
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
*
* @example
* //Decoding raw codetext with standart second message
* let reader = new BarCodeReader("c:\\test.png", null, DecodeType.MAXI_CODE);
* let results = reader.readBarCodes();
* for(let i = 0; i < results.length; i++)
* {
* let result = results[i];
* let resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText());
* if (resultMaxiCodeCodetext instanceOf MaxiCodeCodetextMode3)
* {
* let maxiCodeStructuredCodetext = resultMaxiCodeCodetext;
* console.log("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode());
* console.log("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode());
* console.log("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory());
* if (maxiCodeStructuredCodetext.getSecondMessage() instanceOf MaxiCodeStandartSecondMessage)
* {
* let secondMessage = maxiCodeStructuredCodetext.getSecondMessage();
* console.log("Message: " + secondMessage.getMessage());
* }
* }
* }
*
* @example
*
* //Decoding raw codetext with structured second message
* let reader = new BarCodeReader("c:\\test.png", null, DecodeType.MAXI_CODE);
* let results = reader.readBarCodes();
* for(let i = 0; i < results.length; i++)
* {
* let result = results[i];
* let resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText());
* if (resultMaxiCodeCodetext instanceOf MaxiCodeCodetextMode3)
* {
* let maxiCodeStructuredCodetext = resultMaxiCodeCodetext;
* console.log("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode());
* console.log("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode());
* console.log("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory());
* if (maxiCodeStructuredCodetext.getSecondMessage() instanceOf MaxiCodeStructuredSecondMessage)
* {
* let secondMessage = maxiCodeStructuredCodetext.getSecondMessage();
* console.log("Message:");
* let identifiers = secondMessage.getIdentifiers();
* for(let i = 0; i < identifiers.length; i++)
* {
* let identifier = identifiers[i];
* console.log(identifier);
* }
* }
* }
* }
*/
class MaxiCodeCodetextMode3 extends MaxiCodeStructuredCodetext
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwMaxiCodeCodetextMode3";
constructor()
{
try
{
let java_class_link = java.import(MaxiCodeCodetextMode3.JAVA_CLASS_NAME);
let javaClass = new java_class_link();
super(javaClass);
}
catch (ex)
{
throw new joint.BarcodeException(ex);
}
}
static construct(javaClass)
{
let _class = new MaxiCodeCodetextMode3();
_class.setJavaClass(javaClass);
return _class;
}
/**
* Gets MaxiCode mode.
* @return MaxiCode mode
*/
getMode()
{
return this.getJavaClass().getMode();
}
init()
{
super.init();
}
}
/**
* Class for encoding and decoding structured second message for MaxiCode barcode.
*/
class MaxiCodeStructuredSecondMessage extends MaxiCodeSecondMessage
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwMaxiCodeStructuredSecondMessage";
constructor()
{
try
{
let java_class = java.import(MaxiCodeStructuredSecondMessage.JAVA_CLASS_NAME);
super(new java_class());
}
catch (ex)
{
throw new joint_.BarcodeException(ex);
}
}
static construct(javaClass)
{
let _class = new MaxiCodeStructuredSecondMessage();
_class.setJavaClass(javaClass);
return _class;
}
/**
* Gets year. Year must be 2 digit integer value.
*/
getYear()
{
return this.getJavaClass().getYearSync();
}
/**
* Sets year. Year must be 2 digit integer value.
*/
setYear(value)
{
this.getJavaClass().setYearSync(value);
}
/**
* Gets identifiers list
* @return List of identifiers
*/
getIdentifiers()
{
let identifiers_string = this.getJavaClass().getIdentifiersSync();
let delimeter = "\\/\\";
let identifiers = identifiers_string.split(delimeter);
return identifiers;
}
/**
* Adds new identifier
* @param identifier Identifier to be added
*/
add(identifier)
{
this.getJavaClass().addSync(identifier);
}
/**
* Clear identifiers list
*/
clear()
{
this.getJavaClass().clearSync();
}
/**
* Gets constructed second message
* @return Constructed second message
*/
getMessage()
{
return this.getJavaClass().getMessageSync();
}
/**
* Returns a value indicating whether this instance is equal to a specified <see cref="MaxiCodeStructuredSecondMessage"/> value.
* @param obj "obj">An <see cref="MaxiCodeStructuredSecondMessage"/> value to compare to this instance.
* @return <b>true</b> if obj has the same value as this instance; otherwise, <b>false</b>.
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* Returns the hash code for this instance.
* @return A 32-bit signed integer hash code.
*/
getHashCode()
{
return this.getJavaClass().getHashCodeSync();
}
init()
{
}
}
/**
* Base class for encoding and decoding the text embedded in the HIBC LIC code.<br>
* <br>
* This sample shows how to decode raw HIBC LIC codetext to HIBCLICComplexCodetext instance.
* @example
* let reader = new BarCodeReader("c:\\test.png", null, DecodeType.HIBC_AZTEC_LIC);
* let results = reader.readBarCodes();
* for(let i = 0; i < results.length; i++)
* {
* let result = results[i];
* let resultHIBCLICComplexCodetext = ComplexCodetextReader.tryDecodeHIBCLIC(result.getCodeText());
* print("BarCode Type: " + resultMaxiCodeCodetext.getBarcodeType());
* print("BarCode CodeText: " + resultMaxiCodeCodetext.getConstructedCodetext());
* }
*/
class HIBCLICComplexCodetext extends IComplexCodetext
{
constructor(javaClass)
{
super(javaClass);
}
/**
* <p>
* Constructs codetext
* </p>
* @return Constructed codetext
*/
getConstructedCodetext(){}
/**
* <p>
* Initializes instance from constructed codetext.
* </p>
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext){}
/**
* <p>
* Gets or sets barcode type. HIBC LIC codetext can be encoded using HIBCCode39LIC, HIBCCode128LIC, HIBCAztecLIC, HIBCDataMatrixLIC and HIBCQRLIC encode types.
* Default value: HIBCCode39LIC.
* </p>
* @return Barcode type.
*/
getBarcodeType()
{
return this.getJavaClass().getBarcodeTypeSync();
}
/**
* <p>
* Gets or sets barcode type. HIBC LIC codetext can be encoded using HIBCCode39LIC, HIBCCode128LIC, HIBCAztecLIC, HIBCDataMatrixLIC and HIBCQRLIC encode types.
* Default value: HIBCCode39LIC.
* </p>
* @return Barcode type.
*/
setBarcodeType(value)
{
this.getJavaClass().setBarcodeTypeSync(value);
}
}
/**
* <p>
* Class for encoding and decoding the text embedded in the HIBC LIC code which stores primary and secodary data.
* </p>
* This sample shows how to encode and decode HIBC LIC using HIBCLICCombinedCodetext.
*
* @example
*
* let combinedCodetext = new HIBCLICCombinedCodetext();
* combinedCodetext.setBarcodeType(EncodeTypes.HIBCQRLIC);
* combinedCodetext.setPrimaryData(new PrimaryData());
* combinedCodetext.getPrimaryData().setProductOrCatalogNumber("12345");
* combinedCodetext.getPrimaryData().setLabelerIdentificationCode("A999");
* combinedCodetext.getPrimaryData().setUnitOfMeasureID(1);
* combinedCodetext.setSecondaryAndAdditionalData(new SecondaryAndAdditionalData());
* combinedCodetext.getSecondaryAndAdditionalData().setExpiryDate(new Date());
* combinedCodetext.getSecondaryAndAdditionalData().setExpiryDateFormat(HIBCLICDateFormat.MMDDYY);
* combinedCodetext.getSecondaryAndAdditionalData().setQuantity(30);
* combinedCodetext.getSecondaryAndAdditionalData().setLotNumber("LOT123");
* combinedCodetext.getSecondaryAndAdditionalData().setSerialNumber("SERIAL123");
* combinedCodetext.getSecondaryAndAdditionalData().setDateOfManufacture(new Date());
* ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(combinedCodetext);
* let image = generator.generateBarCodeImage(BarCodeImageFormat.PNG);
* let reader = new BarCodeReader(image, null, DecodeType.HIBCQRLIC);
* reader.readBarCodes();
* let codetext = reader.getFoundBarCodes()[0].getCodeText();
* let result = ComplexCodetextReader.tryDecodeHIBCLIC(codetext) ;
* print("Product or catalog number: " + result.getPrimaryData().getProductOrCatalogNumber());
* print("Labeler identification code: " + result.getPrimaryData().getLabelerIdentificationCode());
* print("Unit of measure ID: " + result.getPrimaryData().getUnitOfMeasureID());
* print("Expiry date: " + result.getSecondaryAndAdditionalData().getExpiryDate());
* print("Quantity: " + result.getSecondaryAndAdditionalData().getQuantity());
* print("Lot number: " + result.getSecondaryAndAdditionalData().getLotNumber());
* print("Serial number: " + result.getSecondaryAndAdditionalData().getSerialNumber());
* print("Date of manufacture: " + result.getSecondaryAndAdditionalData().getDateOfManufacture());
*/
class HIBCLICCombinedCodetext extends HIBCLICComplexCodetext
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCLICCombinedCodetext";
constructor()
{
let java_class_link = java.import(HIBCLICCombinedCodetext.JAVA_CLASS_NAME);
let javaClass = new java_class_link();
super(javaClass);
}
static construct(javaClass)
{
let obj = new HIBCLICCombinedCodetext();
obj.setJavaClass(javaClass);
return obj;
}
init()
{
this.auto_PrimaryData = PrimaryData.construct(this.getJavaClass().getPrimaryDataSync());
this.auto_SecondaryAndAdditionalData = SecondaryAndAdditionalData.construct(this.getJavaClass().getSecondaryAndAdditionalDataSync());
}
/**
* <p>
* Identifies primary data.
* </p>
*/
getPrimaryData()
{
return this.auto_PrimaryData;
}
/**
* <p>
* Identifies primary data.
* </p>
*/
setPrimaryData(value)
{
this.getJavaClass().setPrimaryDataSync(value.getJavaClass());
this.auto_PrimaryData = value;
}
auto_PrimaryData;
/**
* <p>
* Identifies secondary and additional supplemental data.
* </p>
*/
getSecondaryAndAdditionalData()
{
return this.auto_SecondaryAndAdditionalData;
}
/**
* <p>
* Identifies secondary and additional supplemental data.
* </p>
*/
setSecondaryAndAdditionalData(value)
{
this.getJavaClass().setSecondaryAndAdditionalDataSync(value.getJavaClass());
this.auto_SecondaryAndAdditionalData = value;
}
auto_SecondaryAndAdditionalData;
/**
* <p>
* Constructs codetext
* </p>
*
* @return Constructed codetext
*/
getConstructedCodetext()
{
return this.getJavaClass().getConstructedCodetextSync();
}
/**
* <p>
* Initializes instance from constructed codetext.
* </p>
*
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext)
{
this.getJavaClass().initFromStringSync(constructedCodetext);
}
/**
* <p>
* Returns a value indicating whether this instance is equal to a specified {@code HIBCLICCombinedCodetext} value.
* </p>
*
* @param obj An {@code HIBCLICCombinedCodetext} value to compare to this instance.
* @return {@code <b>true</b>} if obj has the same value as this instance; otherwise, {@code <b>false</b>}.
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* <p>
* Returns the hash code for this instance.
* </p>
*
* @return A 32-bit signed integer hash code.
*/
hashCode()
{
return this.getJavaClass().hashCodeSync();
}
}
/**
* <p>
* Class for encoding and decoding the text embedded in the HIBC LIC code which stores primary data.
* </p>
* This sample shows how to encode and decode HIBC LIC using HIBCLICPrimaryCodetext.
* @example
* let complexCodetext = new HIBCLICPrimaryCodetext();
* complexCodetext.setBarcodeType(EncodeTypes.HIBCQRLIC);
* complexCodetext.setData(new PrimaryData());
* complexCodetext.getData().setProductOrCatalogNumber("12345");
* complexCodetext.getData().setLabelerIdentificationCode("A999");
* complexCodetext.getData().setUnitOfMeasureID(1);
* let generator = new ComplexBarcodeGenerator(complexCodetext);
* let image = generator.generateBarCodeImage(BarCodeImageFormat.PNG);
* let reader = new BarCodeReader(image, null, DecodeType.HIBCQRLIC);
* reader.readBarCodes();
* let codetext = reader.getFoundBarCodes()[0].getCodeText();
* let result = ComplexCodetextReader.tryDecodeHIBCLIC(codetext) ;
* print("Product or catalog number: " + result.getData().getProductOrCatalogNumber());
* print("Labeler identification code: " + result.getData().getLabelerIdentificationCode());
* print("Unit of measure ID: " + result.getData().getUnitOfMeasureID());
*/
class HIBCLICPrimaryDataCodetext extends HIBCLICComplexCodetext
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCLICPrimaryDataCodetext";
constructor()
{
let java_class_link = java.import(HIBCLICPrimaryDataCodetext.JAVA_CLASS_NAME);
let javaClass = new java_class_link();
super(javaClass);
}
static construct(java_class)
{
let obj = new HIBCLICPrimaryDataCodetext();
obj.setJavaClass(java_class);
return obj;
}
init()
{
this.data = PrimaryData.construct(this.getJavaClass().getDataSync());
}
data;
/**
* <p>
* Identifies primary data.
* </p>
*/
getData()
{
return this.data;
}
/**
* <p>
* Identifies primary data.
* </p>
*/
setData(value)
{
this.getJavaClass().setDataSync(value.getJavaClass());
this.data = value;
}
/**
* <p>
* Constructs codetext
* </p>
*
* @return Constructed codetext
*/
getConstructedCodetext()
{
return this.getJavaClass().getConstructedCodetextSync();
}
/**
* <p>
* Initializes instance from constructed codetext.
* </p>
*
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext)
{
this.getJavaClass().initFromStringSync(constructedCodetext);
}
/**
* <p>
* Returns a value indicating whether this instance is equal to a specified {@code HIBCLICPrimaryDataCodetext} value.
* </p>
*
* @param obj An {@code HIBCLICPrimaryDataCodetext} value to compare to this instance.
* @return {@code <b>true</b>} if obj has the same value as this instance; otherwise, {@code <b>false</b>}.
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* <p>
* Returns the hash code for this instance.
* </p>
*
* @return A 32-bit signed integer hash code.
*/
hashCode()
{
return this.getJavaClass().hashCodeSync();
}
}
/**
* Class for encoding and decoding the text embedded in the HIBC LIC code which stores seconday data.
* @example
* This sample shows how to encode and decode HIBC LIC using HIBCLICSecondaryAndAdditionalDataCodetext.
*
* @code
* let complexCodetext = new HIBCLICSecondaryAndAdditionalDataCodetext();
* complexCodetext.setBarcodeType(EncodeTypes.HIBCQRLIC);
* complexCodetext.setLinkCharacter('L');
* complexCodetext.setData(new SecondaryAndAdditionalData());
* complexCodetext.getData().setExpiryDate(new Date());
* complexCodetext.getData().setExpiryDateFormat(HIBCLICDateFormat.MMDDYY);
* complexCodetext.getData().setQuantity(30);
* complexCodetext.getData().setLotNumber("LOT123");
* complexCodetext.getData().setSerialNumber("SERIAL123");
* complexCodetext.getData().setDateOfManufacture(new Date());
* let generator = new ComplexBarcodeGenerator(complexCodetext);
* let image = generator.generateBarCodeImage(BarcodeImageFormat.PNG);
* let reader = new BarCodeReader(image, null, DecodeType.HIBCQRLIC);
* reader.readBarCodes();
* codetext = reader.getFoundBarCodes()[0].getCodeText();
* result = ComplexCodetextReader.tryDecodeHIBCLIC(codetext);
* print("Expiry date: " + result.getData().getExpiryDate());
* print("Quantity: " + result.getData().getQuantity());
* print("Lot number: " + result.getData().getLotNumber());
* print("Serial number: " + result.getData().getSerialNumber());
* print("Date of manufacture: " + result.getData().getDateOfManufacture());
* </code>
* </example>
*/
class HIBCLICSecondaryAndAdditionalDataCodetext extends HIBCLICComplexCodetext
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCLICSecondaryAndAdditionalDataCodetext";
data;
constructor()
{
let java_class_link = java.import(HIBCLICSecondaryAndAdditionalDataCodetext.JAVA_CLASS_NAME);
let javaClass = new java_class_link();
super(javaClass);
}
static construct(java_class)
{
let obj = new HIBCLICSecondaryAndAdditionalDataCodetext();
obj.setJavaClass(java_class);
return obj;
}
/**
* <p>
* Identifies secodary and additional supplemental data.
* </p>
*/
getData()
{
return this.data;
}
/**
* <p>
* Identifies secodary and additional supplemental data.
* </p>
*/
setData(value)
{
this.getJavaClass().setDataSync(value.getJavaClass());
this.data = value;
}
/**
* <p>
* Identifies link character.
* </p>
*/
getLinkCharacter()
{
return this.getJavaClass().getLinkCharacterSync();
}
/**
* <p>
* Identifies link character.
* </p>
*/
setLinkCharacter(value)
{
this.getJavaClass().setLinkCharacterSync(value);
}
/**
* <p>
* Constructs codetext
* </p>
*
* @return Constructed codetext
*/
getConstructedCodetext()
{
return this.getJavaClass().getConstructedCodetextSync();
}
/**
* <p>
* Initializes instance from constructed codetext.
* </p>
*
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext)
{
this.getJavaClass().initFromStringSync(constructedCodetext);
this.init();
}
/**
* <p>
* Returns a value indicating whether this instance is equal to a specified {@code HIBCLICSecondaryAndAdditionalDataCodetext} value.
* </p>
*
* @param obj An {@code HIBCLICSecondaryAndAdditionalDataCodetext} value to compare to this instance.
* @return {@code <b>true</b>} if obj has the same value as this instance; otherwise, {@code <b>false</b>}.
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* <p>
* Returns the hash code for this instance.
* </p>
*
* @return A 32-bit signed integer hash code.
*/
hashCode()
{
return this.getJavaClass().hashCodeSync();
}
init()
{
this.data = SecondaryAndAdditionalData.construct(this.getJavaClass().getDataSync());
}
}
/**
* <p>
* Class for encoding and decoding the text embedded in the HIBC PAS code.
* @example
*
* This sample shows how to encode and decode HIBC PAS using HIBCPASCodetext.
*
* let complexCodetext = new HIBCPASComplexCodetext();
* complexCodetext.setDataLocation(HIBCPASDataLocation.PATIENT);
* complexCodetext.addRecord(HIBCPASDataType.LABELER_IDENTIFICATION_CODE, "A123");
* complexCodetext.addRecord(HIBCPASDataType.MANUFACTURER_SERIAL_NUMBER, "SERIAL123");
* complexCodetext.setBarcodeType(EncodeTypes.HIBC_DATA_MATRIX_PAS);
* let generator = new ComplexBarcodeGenerator(complexCodetext);
* BarCodeReader reader = new BarCodeReader(generator.generateBarCodeImage(BarCodeImageFormat.PNG), null, DecodeType.HIBC_DATA_MATRIX_PAS);
* reader.readBarCodes();
* let codetext = reader.getFoundBarCodes()[0].getCodeText();
* let readCodetext = ComplexCodetextReader.tryDecodeHIBCPAS(codetext);
* print("Data location: " + readCodetext.getDataLocation());
* print("Data type: " + readCodetext.getRecords()[0].getDataType());
* print("Data: " + readCodetext.getRecords()[0].getData());
* print("Data type: " + readCodetext.getRecords()[1].getDataType());
* print("Data: " + readCodetext.getRecords()[1].getData());
*/
class HIBCPASCodetext extends IComplexCodetext
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCPASCodetext";
constructor()
{
let java_class_link = java.import(HIBCPASCodetext.JAVA_CLASS_NAME);
let javaClass = new java_class_link();
super(javaClass);
}
/**
* <p>
* HIBCPASRecord constructor
* </p>
*/
static construct(javaClass)
{
let obj = new HIBCPASCodetext();
obj.setJavaClass(javaClass);
return obj;
}
init()
{
}
/**
* <p>
* Gets or sets barcode type. HIBC PAS codetext can be encoded using HIBCCode39PAS, HIBCCode128PAS, HIBCAztec:PAS, HIBCDataMatrixPAS and HIBCQRPAS encode types.
* Default value: HIBCCode39PAS.
* </p>
* @return Barcode type.
*/
setBarcodeType(value)
{
this.getJavaClass().setBarcodeTypeSync(value);
}
/**
* <p>
* Identifies data location.
* </p>
*/
getDataLocation()
{
return this.getJavaClass().getDataLocationSync();
}
/**
* <p>
* Identifies data location.
* </p>
*/
setDataLocation(value)
{
this.getJavaClass().setDataLocationSync(value);
}
/**
* <p>
* Gets records list
* </p>
* @return List of records
*/
getRecords()
{
let _array = [];
let mwRecordsList = this.getJavaClass().getRecordsSync();
let listSize = mwRecordsList.sizeSync();
for (let i = 0; i < listSize; i++)
{
let mwhibcpasRecord = mwRecordsList.getSync(i);
_array.push(HIBCPASRecord.construct(mwhibcpasRecord));
}
return _array;
}
/**
* <p>
* Adds new record
* </p>
* @param dataType Type of data
* @param data Data string
*/
addRecord(dataType, data)
{
this.getJavaClass().addRecordSync(dataType, data);
}
/**
* <p>
* Adds new record
* </p>
* @param record Record to be added
*/
addHIBCPASRecord(record)
{
this.getJavaClass().addRecordSync(record.getJavaClass());
}
/**
* <p>
* Clears records list
* </p>
*/
clear()
{
this.getJavaClass().clearSync();
}
/**
* <p>
* Gets barcode type.
* </p>
* @return Barcode type.
*/
getBarcodeType()
{
return this.getJavaClass().getBarcodeTypeSync();
}
/**
* <p>
* Constructs codetext
* </p>
* @return Constructed codetext
*/
getConstructedCodetext()
{
return this.getJavaClass().getConstructedCodetextSync();
}
/**
* <p>
* Initializes instance from constructed codetext.
* </p>
* @param constructedCodetext Constructed codetext.
*/
initFromString(constructedCodetext)
{
this.getJavaClass().initFromStringSync(constructedCodetext);
this.init();
}
/**
* <p>
* Returns a value indicating whether this instance is equal to a specified {@code HIBCPASCodetext} value.
* </p>
* @return {@code <b>true</b>} if obj has the same value as this instance; otherwise, {@code <b>false</b>}.
* @param obj An {@code HIBCPASCodetext} value to compare to this instance.
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* <p>
* Returns the hash code for this instance.
* </p>
* @return A 32-bit signed integer hash code.
*/
hashCode()
{
return this.getJavaClass().hashCodeSync();
}
}
/**
* <p>
* Class for storing HIBC PAS record.
* </p>
*/
class HIBCPASRecord extends joint.BaseJavaClass
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCPASRecord";
/**
* <p>
* HIBCPASRecord constructor
* </p>
*
* @param dataType Type of data.
* @param data Data string.
*/
constructor(dataType, data)
{
let java_class_link = java.import(HIBCPASRecord.JAVA_CLASS_NAME);
let javaClass = new java_class_link(dataType, data);
super(javaClass);
}
/**
* <p>
* HIBCPASRecord constructor
* </p>
*/
static construct(javaClass)
{
let obj = new HIBCPASRecord(0,"");
obj.setJavaClass(javaClass);
return obj;
}
init()
{}
/**
* <p>
* Identifies data type.
* </p>
*/
getDataType()
{
return this.getJavaClass().getDataTypeSync();
}
/**
* <p>
* Identifies data type.
* </p>
*/
setDataType(value)
{
this.getJavaClass().setDataTypeSync(value);
}
/**
* <p>
* Identifies data.
* </p>
*/
getData()
{
return this.getJavaClass().getDataSync();
}
/**
* <p>
* Identifies data.
* </p>
*/
setData(value)
{
this.getJavaClass().setDataSync(value);
}
/**
* <p>
* Returns a value indicating whether this instance is equal to a specified {@code HIBCPASDataType} value.
* </p>
*
* @param obj An {@code HIBCPASDataType} value to compare to this instance.
* @return {@code <b>true</b>} if obj has the same value as this instance; otherwise, {@code <b>false</b>}.
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* <p>
* Returns the hash code for this instance.
* </p>
*
* @return A 32-bit signed integer hash code.
*/
hashCode()
{
return this.getJavaClass().hashCodeSync();
}
}
/**
* <p>
* Class for storing HIBC LIC primary data.
* </p>
*/
class PrimaryData extends joint.BaseJavaClass
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwPrimaryData";
constructor()
{
let java_class_link = java.import(PrimaryData.JAVA_CLASS_NAME);
let javaClass = new java_class_link();
super(javaClass);
}
static construct(java_class)
{
let obj = new PrimaryData();
obj.setJavaClass(java_class);
return obj;
}
/**
* <p>
* Identifies date of labeler identification code.<br>
* Labeler identification code must be 4 symbols alphanumeric string, with first character always being alphabetic.
* </p>
*/
getLabelerIdentificationCode()
{
return this.getJavaClass().getLabelerIdentificationCodeSync();
}
/**
* <p>
* Identifies date of labeler identification code.<br>
* Labeler identification code must be 4 symbols alphanumeric string, with first character always being alphabetic.
* </p>
*/
setLabelerIdentificationCode(value)
{
this.getJavaClass().setLabelerIdentificationCodeSync(value);
}
/**
* <p>
* Identifies product or catalog number. Product or catalog number must be alphanumeric string up to 18 sybmols length.
* </p>
*/
getProductOrCatalogNumber()
{
return this.getJavaClass().getProductOrCatalogNumberSync();
}
/**
* <p>
* Identifies product or catalog number. Product or catalog number must be alphanumeric string up to 18 sybmols length.
* </p>
*/
setProductOrCatalogNumber(value)
{
this.getJavaClass().setProductOrCatalogNumberSync(value);
}
/**
* <p>
* Identifies unit of measure ID. Unit of measure ID must be integer value from 0 to 9.
* </p>
*/
getUnitOfMeasureID()
{
return this.getJavaClass().getUnitOfMeasureIDSync();
}
/**
* <p>
* Identifies unit of measure ID. Unit of measure ID must be integer value from 0 to 9.
* </p>
*/
setUnitOfMeasureID(value)
{
this.getJavaClass().setUnitOfMeasureIDSync(value);
}
/**
* <p>
* Converts data to string format according HIBC LIC specification.
* </p>
*
* @return Formatted string.
*/
toString()
{
return this.getJavaClass().toStringSync();
}
/**
* <p>
* Instantiates primary data from string format according HIBC LIC specification.
* </p>
*
* @param primaryDataCodetext Formatted string.
*/
parseFromString(primaryDataCodetext)
{
this.getJavaClass().parseFromStringSync(primaryDataCodetext);
}
/**
* <p>
* Returns a value indicating whether this instance is equal to a specified {@code PrimaryData} value.
* </p>
*
* @param obj An {@code PrimaryData} value to compare to this instance.
* @return {@code <b>true</b>} if obj has the same value as this instance; otherwise, {@code <b>false</b>}.
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* <p>
* Returns the hash code for this instance.
* </p>
*
* @return A 32-bit signed integer hash code.
*/
hashCode()
{
return this.getJavaClass().hashCodeSync();
}
init()
{}
}
/**
* <p>
* Class for storing HIBC LIC secondary and additional data.
* </p>
*/
class SecondaryAndAdditionalData extends joint.BaseJavaClass
{
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwSecondaryAndAdditionalData";
constructor()
{
let java_class_link = java.import(SecondaryAndAdditionalData.JAVA_CLASS_NAME);
let javaClass = new java_class_link();
super(javaClass);
}
static construct(java_class)
{
let obj = new SecondaryAndAdditionalData();
obj.setJavaClass(java_class);
return obj;
}
/**
* <p>
* Identifies expiry date format.
* </p>
*/
getExpiryDateFormat()
{
return this.getJavaClass().getExpiryDateFormatSync();
}
/**
* <p>
* Identifies expiry date format.
* </p>
*/
setExpiryDateFormat(value)
{
this.getJavaClass().setExpiryDateFormatSync(value);
}
/**
* <p>
* Identifies expiry date. Will be used if ExpiryDateFormat is not set to None.
* </p>
*/
getExpiryDate()
{
return new Date(this.getJavaClass().getExpiryDateSync() * 1000);
}
/**
* <p>
* Identifies expiry date. Will be used if ExpiryDateFormat is not set to None.
* </p>
*/
setExpiryDate(value)
{
this.getJavaClass().setExpiryDateSync((value.getTime() / 1000).toString());
}
/**
* <p>
* Identifies lot or batch number. Lot/batch number must be alphanumeric string with up to 18 sybmols length. .
* </p>
*/
getLotNumber()
{
return this.getJavaClass().getLotNumberSync();
}
/**
* <p>
* Identifies lot or batch number. Lot/batch number must be alphanumeric string with up to 18 sybmols length. .
* </p>
*/
setLotNumber(value)
{
if(value == null)
value = "null";
this.getJavaClass().setLotNumberSync(value);
}
/**
* <p>
* Identifies serial number. Serial number must be alphanumeric string up to 18 sybmols length.
* </p>
*/
getSerialNumber()
{
return this.getJavaClass().getSerialNumberSync();
}
/**
* <p>
* Identifies serial number. Serial number must be alphanumeric string up to 18 sybmols length.
* </p>
*/
setSerialNumber(value)
{
if(value == null)
value = "null";
this.getJavaClass().setSerialNumberSync(value);
}
/**
* <p>
* Identifies date of manufacture.
* Date of manufacture can be set to DateTime.MinValue in order not to use this field.
* Default value: DateTime.MinValue
* </p>
*/
getDateOfManufacture()
{
return new Date(this.getJavaClass().getDateOfManufactureSync() * 1000);
}
/**
* <p>
* Identifies date of manufacture.
* Date of manufacture can be set to DateTime.MinValue in order not to use this field.
* Default value: DateTime.MinValue
* </p>
*/
setDateOfManufacture(value)
{
this.getJavaClass().setDateOfManufactureSync((value.getTime() / 1000).toString());
}
/**
* Identifies quantity, must be integer value from 0 to 500.<br>
* Quantity can be set to -1 in order not to use this field.<br>
* Default value: -1
*/
getQuantity()
{
return this.getJavaClass().getQuantitySync();
}
/**
* <p>
* Identifies quantity, must be integer value from 0 to 500.
* Quantity can be set to -1 in order not to use this field.
* Default value: -1
* </p>
*/
setQuantity(value)
{
this.getJavaClass().setQuantitySync(value);
}
/**
* <p>
* Converts data to string format according HIBC LIC specification.
* </p>
*
* @return Formatted string.
*/
toString()
{
return this.getJavaClass().toStringSync();
}
/**
* <p>
* Instantiates secondary and additional supplemental data from string format according HIBC LIC specification.
* </p>
*
* @param secondaryDataCodetext Formatted string.
*/
parseFromString(secondaryDataCodetext)
{
this.getJavaClass().parseFromStringSync(secondaryDataCodetext);
}
/**
* <p>
* Returns a value indicating whether this instance is equal to a specified {@code SecondaryAndAdditionalData} value.
* </p>
*
* @param obj An {@code SecondaryAndAdditionalData} value to compare to this instance.
* @return {@code <b>true</b>} if obj has the same value as this instance; otherwise, {@code <b>false</b>}.
*/
equals(obj)
{
return this.getJavaClass().equalsSync(obj.getJavaClass());
}
/**
* <p>
* Returns the hash code for this instance.
* </p>
*
* @return A 32-bit signed integer hash code.
*/
hashCode()
{
return this.getJavaClass().hashCodeSync();
}
init()
{}
}
/**
* 2D Mailmark Type defines size of Data Matrix barcode
* @enum
*/
Mailmark2DType =
{
/**
* Auto determine
*/
AUTO: 0,
/**
* 24 x 24 modules
*/
TYPE_7: 1,
/**
* 32 x 32 modules
*/
TYPE_9: 2,
/**
* 16 x 48 modules
*/
TYPE_29: 3
}
/**
* <p>
* Specifies the different types of date formats for HIBC LIC.
* </p>
*/
HIBCLICDateFormat =
{
/**
* <p>
* YYYYMMDD format. Will be encoded in additional supplemental data.
* </p>
*/
YYYYMMDD: 0,
/**
* <p>
* MMYY format.
* </p>
*/
MMYY: 1,
/**
* <p>
* MMDDYY format.
* </p>
*/
MMDDYY: 2,
/**
* <p>
* YYMMDD format.
* </p>
*/
YYMMDD: 3,
/**
* <p>
* YYMMDDHH format.
* </p>
*/
YYMMDDHH: 4,
/**
* <p>
* Julian date format.
* </p>
*/
YYJJJ: 5,
/**
* <p>
* Julian date format with hours.
* </p>
*/
YYJJJHH: 6,
/**
* <p>
* Do not encode expiry date.
* </p>
*/
NONE:7
}
/**
* <p>
* HIBC PAS data location types.
* </p>
*/
HIBCPASDataLocation =
{
/**
* <p>
* A - Patient
* </p>
*/
PATIENT: 0,
/**
* <p>
* B - Patient Care Record
* </p>
*/
PATIENT_CARE_RECORD: 1,
/**
* <p>
* C - Specimen Container
* </p>
*/
SPECIMEN_CONTAINER: 2,
/**
* <p>
* D - Direct Patient Image Item
* </p>
*/
DIRECT_PATIENT_IMAGE_ITEM: 3,
/**
* <p>
* E - Business Record
* </p>
*/
BUSINESS_RECORD: 4,
/**
* <p>
* F - Medical Administration Record
* </p>
*/
MEDICAL_ADMINISTRATION_RECORD: 5,
/**
* <p>
* G - Library Reference Material
* </p>
*/
LIBRARY_REFERENCE_MATERIAL: 6,
/**
* <p>
* H - Devices and Materials
* </p>
*/
DEVICES_AND_MATERIALS: 7,
/**
* <p>
* I - Identification Card
* </p>
*/
IDENTIFICATION_CARD: 8,
/**
* <p>
* J - Product Container
* </p>
*/
PRODUCT_CONTAINER: 9,
/**
* <p>
* K - Asset data type
* </p>
*/
ASSET: 10,
/**
* <p>
* L - Surgical Instrument
* </p>
*/
SURGICAL_INSTRUMENT: 11,
/**
* <p>
* Z - User Defined
* </p>
*/
USER_DEFINED: 25
}
/**
* <p>
* HIBC PAS record's data types.
* </p>
*/
HIBCPASDataType =
{
/**
* <p>
* A - Labeler Identification Code
* </p>
*/
LABELER_IDENTIFICATION_CODE: 0,
/**
* <p>
* B - Service Identification
* </p>
*/
SERVICE_IDENTIFICATION: 1,
/**
* <p>
* C - Patient Identification
* </p>
*/
PATIENT_IDENTIFICATION: 2,
/**
* <p>
* D - Specimen Identification
* </p>
*/
SPECIMEN_IDENTIFICATION: 3,
/**
* <p>
* E - Personnel Identification
* </p>
*/
PERSONNEL_IDENTIFICATION: 4,
/**
* <p>
* F - Administrable Product Identification
* </p>
*/
ADMINISTRABLE_PRODUCT_IDENTIFICATION: 5,
/**
* <p>
* G - Implantable Product Information
* </p>
*/
IMPLANTABLE_PRODUCT_INFORMATION: 6,
/**
* <p>
* H - Hospital Item Identification
* </p>
*/
HOSPITAL_ITEM_IDENTIFICATION: 7,
/**
* <p>
* I - Medical Procedure Identification
* </p>
*/
MEDICAL_PROCEDURE_IDENTIFICATION: 8,
/**
* <p>
* J - Reimbursement Category
* </p>
*/
REIMBURSEMENT_CATEGORY: 9,
/**
* <p>
* K - Blood Product Identification
* </p>
*/
BLOOD_PRODUCT_IDENTIFICATION: 10,
/**
* <p>
* L - Demographic Data
* </p>
*/
DEMOGRAPHIC_DATA: 11,
/**
* <p>
* M - DateTime in YYYDDDHHMMG format
* </p>
*/
DATE_TIME: 12,
/**
* <p>
* N - Asset Identification
* </p>
*/
ASSET_IDENTIFICATION: 13,
/**
* <p>
* O - Purchase Order Number
* </p>
*/
PURCHASE_ORDER_NUMBER: 14,
/**
* <p>
* P - Dietary Item Identification
* </p>
*/
DIETARY_ITEM_IDENTIFICATION: 15,
/**
* <p>
* Q - Manufacturer Serial Number
* </p>
*/
MANUFACTURER_SERIAL_NUMBER: 16,
/**
* <p>
* R - Library Materials Identification
* </p>
*/
LIBRARY_MATERIALS_IDENTIFICATION: 17,
/**
* <p>
* S - Business Control Number
* </p>
*/
BUSINESS_CONTROL_NUMBER: 18,
/**
* <p>
* T - Episode of Care Identification
* </p>
*/
EPISODE_OF_CARE_IDENTIFICATION: 19,
/**
* <p>
* U - Health Industry Number
* </p>
*/
HEALTH_INDUSTRY_NUMBER: 20,
/**
* <p>
* V - Patient Visit ID
* </p>
*/
PATIENT_VISIT_ID: 21,
/**
* <p>
* X - XML Document
* </p>
*/
XML_DOCUMENT: 22,
/**
* <p>
* Z - User Defined
* </p>
*/
USER_DEFINED: 25
}
/**
* <p>
* Class for Jurisdiction specific fields for USA DL
* </p>
*/
class USADriveIdJurisdSubfile extends BaseJavaClass
{
constructor(nativeObject)
{
super(nativeObject);
}
init()
{
}
/**
* <p>
* Indexing by 3-letter element id
* </p>
* @return Corresponding DataElement
* @param id 3-letter element id
*/
get(id)
{
return new DataElement(this.getJavaClass().getSync(id));
}
/**
* <p>
* Indexing by 3-letter element id
* </p>
* @return Corresponding DataElement
* @param id 3-letter element id
*/
set(id, value)
{
this.getJavaClass().set_Item(id, value.getJavaClass());
}
/**
* <p>
* Indexing by index number
* </p>
* @return Corresponding DataElement
* @param index Element index (int)
*/
get(index)
{
return new DataElement(this.getJavaClass().getSync(index));
}
/**
* <p>
* Indexing by index number
* </p>
* @return Corresponding DataElement
* @param index Element index (int)
*/
set(index, value)
{
this.getJavaClass().set_Item(index, value.getJavaClass());
}
/**
* <p>
* Searches for data element by 3-letter id
* </p>
* @return Found data element
* @param id 3-letter id
* @param isOpenOrCreate If true, it will be created if not found
*/
findDataElement(id, isOpenOrCreate)
{
return new DataElement(this.getJavaClass().findDataElementSync(id, isOpenOrCreate));
}
/**
* <p>
* Returns number of data elements
* </p>
*/
size()
{
return this.getJavaClass().sizeSync();
}
/**
* <p>
* Clears all data elements
* </p>
*/
clear()
{
this.getJavaClass().clearSync();
}
/**
* <p>
* Tries to remove element at index
* </p>
* @return true if successful, false if out of range
* @param index index number
*/
remove(index)
{
return this.getJavaClass().removeAtSync(index);
}
/**
* <p>
* Tries to remove element with 3-letter id
* </p>
* @return true if successful, false if no such id
* @param id 3-letter id
*/
remove(id)
{
return this.getJavaClass().removeAtSync(id);
}
/**
* <p>
* Inserts the specified DataElement at the given index.
* If a DataElement with the same ElementID already exists, it will be replaced.
* </p>
* @return The DataElement that was inserted or used to replace an existing entry.
* @param index The zero-based index at which the element should be inserted.
* @param node The DataElement instance to insert or replace at the target position.
*/
insert(index, node)
{
return new DataElement(this.getJavaClass().insertSync(index, node.getJavaClass()));
}
/**
* <p>
* Adds new DataElement or replaces it if ElementID already exists.
* </p>
* @return Added/replaced data element
* @param node DataElement to add
*/
addOrReplaceNode(node)
{
return new DataElement(this.getJavaClass().addOrReplaceSync(node.getJavaClass()));
}
/**
* <p>
* Adds a new DataElement with the specified identifier and value,
* or replaces the existing element if an entry with the same ElementID is already present.
* </p>
* @return The DataElement instance that was added to the collection or updated in place.
* @param id A 3-letter identifier that uniquely specifies the jurisdiction-related data element.
* @param value The text value assigned to the data element; this value will overwrite the existing one if the element already exists.
*/
addOrReplace(id, value)
{
return new DataElement(this.getJavaClass().addOrReplaceSync(id, value));
}
}
/**
* <p>
* USA DL subfile properties, offset and length are set automatically.
* </p>
*/
class SubfileProperties extends BaseJavaClass
{
static javaClassName = "com.aspose.mw.barcode.complexbarcode.MwUSADriveIdCodetext$MwSubfileProperties";
constructor(type)
{
let javaClass = java.import(SubfileProperties.javaClassName);
super(new javaClass(type));
}
static _internalCtor(nativeObject)
{
let javaClass = java.import(SubfileProperties.javaClassName);
let obj = new SubfileProperties("")
obj.setJavaClass(nativeObject);
return obj;
}
init()
{
}
/**
* <p>
* 2 byte type of subfile, like "DL"
* </p>
*/
getType()
{
return this.getJavaClass().getTypeSync();
}
/**
* <p>
* 2 byte type of subfile, like "DL"
* </p>
*/
setType(value)
{
this.getJavaClass().setTypeSync(value);
}
/**
* <p>
* 4 digit numeric value that specifies
* the number of bytes from the head or beginning of the file to where
* the data related to the particular sub-file is located.The first byte in
* the file is located at offset 0.
* </p>
*/
getOffset()
{
return this.getJavaClass().getOffsetSync();
}
/**
* <p>
* 4 digit numeric value that specifies
* the number of bytes from the head or beginning of the file to where
* the data related to the particular sub-file is located.The first byte in
* the file is located at offset 0.
* </p>
*/
setOffset(value)
{
this.getJavaClass().setOffsetSync(value);
}
/**
* <p>
* 4 These bytes contain a 4 digit numeric value that specifies
* the length of the Subfile in bytes.The segment terminator must be
* included in calculating the length of the subfile.A segment terminator
* = 1. Each subfile must begin with the two-character Subfile Type and
* these two characters must also be included in the length.
* </p>
*/
getLength()
{
return this.getJavaClass().getLengthSync();
}
/**
* <p>
* 4 These bytes contain a 4 digit numeric value that specifies
* the length of the Subfile in bytes.The segment terminator must be
* included in calculating the length of the subfile.A segment terminator
* = 1. Each subfile must begin with the two-character Subfile Type and
* these two characters must also be included in the length.
* </p>
*/
setLength(value)
{
this.getJavaClass().setLengthSync(value);
}
}
/**
* <p>
* Class for encoding and decoding the text embedded in the USA Driving License PDF417 code.
* </p>
*/
class USADriveIdCodetext extends IComplexCodetext
{
static javaClassName = "com.aspose.mw.barcode.complexbarcode.MwUSADriveIdCodetext";
constructor(usaDriveIdCodetext)
{
super(usaDriveIdCodetext != null ? usaDriveIdCodetext : new java.import(USADriveIdCodetext.javaClassName)());
}
init()
{
this.auto_JurisdictionSpecificSubfile = new USADriveIdJurisdSubfile(this.getJavaClass().getJurisdictionSpecificSubfileSync());
this.auto_OptionalElements = new OptionalFields(this.getJavaClass().getOptionalElementsSync());
this.auto_MandatoryElements = new MandatoryFields(this.getJavaClass().getMandatoryElementsSync());
}
/**
* <p>
* This number uniquely identifies
* the issuing jurisdiction and can be obtained by contacting the ISO
* Issuing Authority(AAMVA). The full 6-digit IIN should be encoded.
* </p>
*/
getIssuerIdentificationNumber()
{
return this.getJavaClass().getIssuerIdentificationNumberSync();
}
/**
* <p>
* This number uniquely identifies
* the issuing jurisdiction and can be obtained by contacting the ISO
* Issuing Authority(AAMVA). The full 6-digit IIN should be encoded.
* </p>
*/
setIssuerIdentificationNumber(value)
{
this.getJavaClass().setIssuerIdentificationNumberSync(value);
}
/**
* <p>
* AAMVA Version Number 00-99
* </p>
*/
getAAMVAVersionNumber()
{
return this.getJavaClass().getAAMVAVersionNumberSync();
}
/**
* <p>
* AAMVA Version Number 00-99
* </p>
*/
setAAMVAVersionNumber(value)
{
this.getJavaClass().setAAMVAVersionNumberSync(value);
}
/**
* <p>
* Jurisdiction Version Number 00-99
* </p>
*/
getJurisdictionVersionNumber()
{
return this.getJavaClass().getJurisdictionVersionNumberSync();
}
/**
* <p>
* Jurisdiction Version Number 00-99
* </p>
*/
setJurisdictionVersionNumber(value)
{
this.getJavaClass().setJurisdictionVersionNumberSync(value);
}
/**
* <p>
* Number 00-99 of subfiles
* </p>
*/
getNumberOfEntries()
{
return this.getJavaClass().getNumberOfEntriesSync();
}
/**
* <p>
* Number 00-99 of subfiles
* </p>
*/
setNumberOfEntries(value)
{
this.getJavaClass().setNumberOfEntriesSync(value);
}
/**
* <p>
* Contains information about following subfiles, types, offsets and lengths.
* Important: set only type, offset and length will be set automatically.
* </p>
*/
getSubfileDesignator()
{
const javaSubfileDesignatorList = this.getJavaClass().getSubfileDesignatorSync();
let subfileDesignator = [];8
for(let i = 0; i < javaSubfileDesignatorList.sizeSync(); i++)
{
subfileDesignator.push(SubfileProperties._internalCtor(javaSubfileDesignatorList.getSync(i)));
}
return subfileDesignator;
}
/**
* <p>
* Contains information about following subfiles, types, offsets and lengths.
* Important: set only type, offset and length will be set automatically.
* </p>
*/
addSubfileDesignator(value)
{
this.getJavaClass().addSubfileDesignatorSync(value.getJavaClass());
}
/**
* <p>
* Contains information about following subfiles, types, offsets and lengths.
* Important: set only type, offset and length will be set automatically.
* </p>
*/
setSubfileDesignator(value)
{
const JavaArrayList = java.import("java.util.ArrayList");
let subfileDesignatorJava = new JavaArrayList();
for(let i = 0; i < value.length; i++)
{
subfileDesignatorJava.addSync(value[i].getJavaClass());
}
this.getJavaClass().setSubfileDesignatorSync(subfileDesignatorJava);
}
/**
* <p>
* Mandatory elements (fields) of the card
* </p>
*/
getMandatoryElements()
{
return this.auto_MandatoryElements;
}
/**
* <p>
* Mandatory elements (fields) of the card
* </p>
*/
setMandatoryElements(value)
{
this.auto_MandatoryElements = value;
this.getJavaClass().setMandatoryElementsSync(value.getJavaClass());
}
/**
* <p>
* Optional elements (fields) of the card
* </p>
*/
getOptionalElements()
{
return this.auto_OptionalElements;
}
/**
* <p>
* Optional elements (fields) of the card
* </p>
*/
setOptionalElements(value)
{
this.auto_OptionalElements = value;
this.getJavaClass().setOptionalElementsSync(value.getJavaClass());
}
/**
* <p>
* Jurisdiction Specific Fields
* </p>
*/
getJurisdictionSpecificSubfile()
{
return this.auto_JurisdictionSpecificSubfile;
}
/**
* <p>
* Jurisdiction Specific Fields
* </p>
*/
setJurisdictionSpecificSubfile(value)
{
this.auto_JurisdictionSpecificSubfile = value;
this.getJavaClass().setJurisdictionSpecificSubfileSync(value.getJavaClass());
}
/**
* <p>
* Construct codetext from USA DL data
* </p>
* @return Constructed codetext
*/
getConstructedCodetext()
{
return this.getJavaClass().getConstructedCodetextSync();
}
/**
* <p>
* Initialize USA DL object from codetext
* </p>
* @param constructedCodetext Constructed codetext
*/
initFromString(constructedCodetext)
{
this.getJavaClass().initFromStringSync(constructedCodetext);
this.init();
}
/**
* <p>
* Returns barcode type of USA DL (Pdf417)
* </p>
* @return Barcode type (Pdf417)
*/
getBarcodeType()
{
return this.getJavaClass().getBarcodeTypeSync();
}
saveToXml()
{
let buf = Buffer.from(this.getJavaClass().saveToXmlSync(), "base64");
let xml = buf.toString("utf8");
if (xml.charCodeAt(0) === 0xfeff) xml = xml.slice(1);
return xml;
}
}
/**
* <p>
* Mandatory elements (fields) of the card
* </p>
*/
class MandatoryFields extends BaseJavaClass
{
constructor(nativeObject)
{
super(nativeObject);
}
// Mandatory elements in DL/ID subfiles
// Types of data / field lengths are encoded as
// (A = alpha A-Z, N = numeric 0-9, S = special, F = fixed length, V = variable length).
// Use of padding for variable length fields is optional.
/**
* <p>
* DCA, Jurisdiction-specific vehicle class / group code, DL, V6ANS
* </p>
*/
getVehicleClass()
{
return this.getJavaClass().getVehicleClassSync();
}
// Mandatory elements in DL/ID subfiles
// Types of data / field lengths are encoded as
// (A = alpha A-Z, N = numeric 0-9, S = special, F = fixed length, V = variable length).
// Use of padding for variable length fields is optional.
/**
* <p>
* DCA, Jurisdiction-specific vehicle class / group code, DL, V6ANS
* </p>
*/
setVehicleClass(value)
{
this.getJavaClass().setVehicleClassSync(value);
}
/**
* <p>
* DCB, Jurisdiction-specific restrictions codes, DL, V12ANS
* </p>
*/
getRestrictionCodes()
{
return this.getJavaClass().getRestrictionCodesSync();
}
/**
* <p>
* DCB, Jurisdiction-specific restrictions codes, DL, V12ANS
* </p>
*/
setRestrictionCodes(value)
{
this.getJavaClass().setRestrictionCodesSync(value);
}
/**
* <p>
* DCD, Jurisdiction specific endorsement codes, DL, V5ANS
* </p>
*/
getEndorsementCodes()
{
return this.getJavaClass().getEndorsementCodesSync();
}
/**
* <p>
* DCD, Jurisdiction specific endorsement codes, DL, V5ANS
* </p>
*/
setEndorsementCodes(value)
{
this.getJavaClass().setEndorsementCodesSync(value);
}
/**
* <p>
* DCS, Family name of the cardholder, DL/ID, V40ANS
* </p>
*/
getFamilyName()
{
return this.getJavaClass().getFamilyNameSync();
}
/**
* <p>
* DCS, Family name of the cardholder, DL/ID, V40ANS
* </p>
*/
setFamilyName(value)
{
this.getJavaClass().setFamilyNameSync(value);
}
/**
* <p>
* DAC, First name of the cardholder, DL/ID, V40ANS
* </p>
*/
getFirstName()
{
return this.getJavaClass().getFirstNameSync();
}
/**
* <p>
* DAC, First name of the cardholder, DL/ID, V40ANS
* </p>
*/
setFirstName(value)
{
this.getJavaClass().setFirstNameSync(value);
}
/**
* <p>
* DAD, Middle name(s) of the cardholder. In the case of multiple middle names they shall be
* separated by a comma ",". , DL/ID, V40ANS
* </p>
*/
getMiddleName()
{
return this.getJavaClass().getMiddleNameSync();
}
/**
* <p>
* DAD, Middle name(s) of the cardholder. In the case of multiple middle names they shall be
* separated by a comma ",". , DL/ID, V40ANS
* </p>
*/
setMiddleName(value)
{
this.getJavaClass().setMiddleNameSync(value);
}
/**
* <p>
* DBB, Date on which the document was issued, MMDDCCYY for U.S., CCYYMMDD for Canada, DL/ID, F8N
* </p>
*/
getDateOfBirth()
{
return new Date(this.getJavaClass().getDateOfBirthSync());
}
/**
* <p>
* DBB, Date on which the document was issued, MMDDCCYY for U.S., CCYYMMDD for Canada, DL/ID, F8N
* </p>
*/
setDateOfBirth(value)
{
this.getJavaClass().setDateOfBirthSync(value.toISOString().slice(0, 10));
}
/**
* <p>
* DBC, Gender of the cardholder. 1 = male, 2 = female, 9 = not specified, DL/ID, F1N
* </p>
*/
getSex()
{
return this.getJavaClass().getSexSync();
}
/**
* <p>
* DBC, Gender of the cardholder. 1 = male, 2 = female, 9 = not specified, DL/ID, F1N
* </p>
*/
setSex(value)
{
this.getJavaClass().setSexSync(value);
}
/**
* <p>
* DAY, Color of cardholder's eyes. (ANSI D-20 codes). DL/ID, F3A
* </p>
*/
getEyeColor()
{
return this.getJavaClass().getEyeColorSync();
}
/**
* <p>
* DAY, Color of cardholder's eyes. (ANSI D-20 codes). DL/ID, F3A
* </p>
*/
setEyeColor(value)
{
this.getJavaClass().setEyeColorSync(value);
}
/**
* <p>
* DAU, Height of cardholder.
* Inches (in): number of inches followed by " in"
* ex. 6'1'' = "073 in"
* Centimeters(cm) : number of centimeters followed by " cm"
* ex. 181 centimeters="181 cm" , DL/ID, F6ANS
* </p>
*/
getHeight()
{
return this.getJavaClass().getHeightSync();
}
/**
* <p>
* DAU, Height of cardholder.
* Inches (in): number of inches followed by " in"
* ex. 6'1'' = "073 in"
* Centimeters(cm) : number of centimeters followed by " cm"
* ex. 181 centimeters="181 cm" , DL/ID, F6ANS
* </p>
*/
setHeight(value)
{
this.getJavaClass().setHeightSync(value);
}
/**
* <p>
* DAG, Street portion of the cardholder address, DL/ID, V35ANS
* </p>
*/
getAddressStreet1()
{
return this.getJavaClass().getAddressStreet1Sync();
}
/**
* <p>
* DAG, Street portion of the cardholder address, DL/ID, V35ANS
* </p>
*/
setAddressStreet1(value)
{
this.getJavaClass().setAddressStreet1Sync(value);
}
/**
* <p>
* DAI, City portion of the cardholder address, DL/ID, V20ANS
* </p>
*/
getAddressCity()
{
return this.getJavaClass().getAddressCitySync();
}
/**
* <p>
* DAI, City portion of the cardholder address, DL/ID, V20ANS
* </p>
*/
setAddressCity(value)
{
this.getJavaClass().setAddressCitySync(value);
}
/**
* <p>
* DAJ, State portion of the cardholder address, DL/ID, F2A
* </p>
*/
getAddressState()
{
return this.getJavaClass().getAddressStateSync();
}
/**
* <p>
* DAJ, State portion of the cardholder address, DL/ID, F2A
* </p>
*/
setAddressState(value)
{
this.getJavaClass().setAddressStateSync(value);
}
/**
* <p>
* DAK, Postal code portion of the cardholder address in the U.S.and Canada.
* If the trailing portion of the postal code in the U.S. is not known,
* zeros will be used to fill the trailing set of numbers up to 9 digits, DL/ID, F11ANS
* </p>
*/
getAddressPostalCode()
{
return this.getJavaClass().getAddressPostalCodeSync();
}
/**
* <p>
* DAK, Postal code portion of the cardholder address in the U.S.and Canada.
* If the trailing portion of the postal code in the U.S. is not known,
* zeros will be used to fill the trailing set of numbers up to 9 digits, DL/ID, F11ANS
* </p>
*/
setAddressPostalCode(value)
{
this.getJavaClass().setAddressPostalCodeSync(value);
}
/**
* <p>
* DAQ, The number assigned or calculated by the issuing authority, DL/ID, V25ANS
* </p>
*/
getCustomerIDNumber()
{
return this.getJavaClass().getCustomerIDNumberSync();
}
/**
* <p>
* DAQ, The number assigned or calculated by the issuing authority, DL/ID, V25ANS
* </p>
*/
setCustomerIDNumber(value)
{
this.getJavaClass().setCustomerIDNumberSync(value);
}
/**
* <p>
* DCF, Number must uniquely identify a particular document issued to that customer
* from others that may have been issued in the past. This number may serve multiple
* purposes of document discrimination, audit information number, and/or inventory control, DL/ID, V25ANS
* </p>
*/
getDocumentDiscriminator()
{
return this.getJavaClass().getDocumentDiscriminatorSync();
}
/**
* <p>
* DCF, Number must uniquely identify a particular document issued to that customer
* from others that may have been issued in the past. This number may serve multiple
* purposes of document discrimination, audit information number, and/or inventory control, DL/ID, V25ANS
* </p>
*/
setDocumentDiscriminator(value)
{
this.getJavaClass().setDocumentDiscriminatorSync(value);
}
/**
* <p>
* DCG, Country in which DL/ID is issued. U.S. = USA, Canada = CAN, DL/ID, F3A
* </p>
*/
getCountryIdentification()
{
return this.getJavaClass().getCountryIdentificationSync();
}
/**
* <p>
* DCG, Country in which DL/ID is issued. U.S. = USA, Canada = CAN, DL/ID, F3A
* </p>
*/
setCountryIdentification(value)
{
this.getJavaClass().setCountryIdentificationSync(value);
}
/**
* <p>
* DDE, A code that indicates whether a field has been truncated(T), has not been truncated(N),
* or unknown whether truncated(U), DL/ID, F1A
* </p>
*/
getFamilyNameTruncation()
{
return this.getJavaClass().getFamilyNameTruncationSync();
}
/**
* <p>
* DDE, A code that indicates whether a field has been truncated(T), has not been truncated(N),
* or unknown whether truncated(U), DL/ID, F1A
* </p>
*/
setFamilyNameTruncation(value)
{
this.getJavaClass().setFamilyNameTruncationSync(value);
}
/**
* <p>
* DDF, A code that indicates whether a field has been truncated(T), has not been truncated(N),
* or unknown whether truncated(U), DL/ID, F1A
* </p>
*/
getFirstNameTruncation()
{
return this.getJavaClass().getFirstNameTruncationSync();
}
/**
* <p>
* DDF, A code that indicates whether a field has been truncated(T), has not been truncated(N),
* or unknown whether truncated(U), DL/ID, F1A
* </p>
*/
setFirstNameTruncation(value)
{
this.getJavaClass().setFirstNameTruncationSync(value);
}
/**
* <p>
* DDG, A code that indicates whether a field has been truncated(T), has not been truncated(N),
* or unknown whether truncated(U), DL/ID, F1A
* </p>
*/
getMiddleNameTruncation()
{
return this.getJavaClass().getMiddleNameTruncation();
}
/**
* <p>
* DDG, A code that indicates whether a field has been truncated(T), has not been truncated(N),
* or unknown whether truncated(U), DL/ID, F1A
* </p>
*/
setMiddleNameTruncation(value)
{
this.getJavaClass().setMiddleNameTruncationSync(value);
}
init()
{
}
}
/**
* <p>
* Represents a jurisdiction-specific data field used in documents,
* for example ElementID = "ZVA" with Value = "01".
* </p>
*/
class DataElement extends BaseJavaClass
{
constructor(nativeObject)
{
super(nativeObject);
}
init()
{
}
/**
* <p>
* A 3-character code that identifies the jurisdiction-specific field, e.g., "ZVA".
* </p>
*/
getElementID()
{
return this.getJavaClass().getElementIDSync();
}
/**
* <p>
* A 3-character code that identifies the jurisdiction-specific field, e.g., "ZVA".
* </p>
*/
setElementID(value)
{
this.getJavaClass().setElementIDSync(value);
}
/**
* <p>
* The text value associated with the field, typically defined by jurisdiction rules.
* </p>
*/
getValue()
{
return this.getJavaClass().getValueSync();
}
/**
* <p>
* The text value associated with the field, typically defined by jurisdiction rules.
* </p>
*/
setValue(value)
{
this.getJavaClass().setValueSync(value);
}
}
/**
* <p>
* Optional elements (fields) of the card
* </p>
*/
class OptionalFields extends BaseJavaClass
{
constructor(nativeObject)
{
super(nativeObject);
}
init()
{
}
getAddressStreet2()
{
return this.getJavaClass().getAddressStreet2Sync();
}
// Optional elements in DL/ID subfiles
// Rules are same as for mandatory elements
/**
* <p>
* DAH, Second line of street portion of the cardholder address, DL/ID, V35ANS
* </p>
*/
setAddressStreet2(value)
{
this.getJavaClass().setAddressStreet2Sync(value);
}
/**
* <p>
* DAZ, Bald, black, blonde, brown, gray, red/auburn, sandy, white, unknown. If the issuing
* jurisdiction wishes to abbreviate colors, the three-character codes provided in AAMVA D20
* must be used, DL/ID, V12A
* </p>
*/
getHairColor()
{
return this.getJavaClass().getHairColorSync();
}
/**
* <p>
* DAZ, Bald, black, blonde, brown, gray, red/auburn, sandy, white, unknown. If the issuing
* jurisdiction wishes to abbreviate colors, the three-character codes provided in AAMVA D20
* must be used, DL/ID, V12A
* </p>
*/
setHairColor(value)
{
this.getJavaClass().setHairColorSync(value);
}
/**
* <p>
* DCI, Country and municipality and/or state/province, DL/ID, V33A
* </p>
*/
getPlaceOfBirth()
{
return this.getJavaClass().getPlaceOfBirthSync();
}
/**
* <p>
* DCI, Country and municipality and/or state/province, DL/ID, V33A
* </p>
*/
setPlaceOfBirth(value)
{
this.getJavaClass().setPlaceOfBirthSync(value);
}
/**
* <p>
* DCJ, A string of letters and/or numbers that identifies when, where, and by whom
* a driver license/ID card was made. If audit information is not used on the card or the MRT,
* it must be included in the driver record, DL/ID, V25ANS
* </p>
*/
getAuditInformation()
{
return this.getJavaClass().getAuditInformationSync();
}
/**
* <p>
* DCJ, A string of letters and/or numbers that identifies when, where, and by whom
* a driver license/ID card was made. If audit information is not used on the card or the MRT,
* it must be included in the driver record, DL/ID, V25ANS
* </p>
*/
setAuditInformation(value)
{
this.getJavaClass().setAuditInformationSync(value);
}
/**
* <p>
* DCK, A string of letters and/or numbers that is affixed to the raw materials(card stock, laminate, etc.)
* used in producing driver licenses and ID cards. (DHS recommended field), DL/ID, V25ANS
* </p>
*/
getInventoryControlNumber()
{
return this.getJavaClass().getInventoryControlNumberSync();
}
/**
* <p>
* DCK, A string of letters and/or numbers that is affixed to the raw materials(card stock, laminate, etc.)
* used in producing driver licenses and ID cards. (DHS recommended field), DL/ID, V25ANS
* </p>
*/
setInventoryControlNumber(value)
{
this.getJavaClass().setInventoryControlNumberSync(value);
}
/**
* <p>
* DBN, Other family name by which cardholder is known, DL/ID, V10ANS
* </p>
*/
getAliasAKAFamilyName()
{
return this.getJavaClass().getAliasAKAFamilyNameSync();
}
/**
* <p>
* DBN, Other family name by which cardholder is known, DL/ID, V10ANS
* </p>
*/
setAliasAKAFamilyName(value)
{
this.getJavaClass().setAliasAKAFamilyNameSync(value);
}
/**
* <p>
* DBG, Other given name by which cardholder is known, DL/ID, V15ANS
* </p>
*/
getAliasAKAGivenName()
{
return this.getJavaClass().getAliasAKAGivenNameSync();
}
/**
* <p>
* DBG, Other given name by which cardholder is known, DL/ID, V15ANS
* </p>
*/
setAliasAKAGivenName(value)
{
this.getJavaClass().setAliasAKAGivenNameSync(value);
}
/**
* <p>
* DBS, Other suffix by which cardholder is known, DL/ID, V5ANS
* </p>
*/
getAliasAKASuffixName()
{
return this.getJavaClass().getAliasAKASuffixNameSync();
}
/**
* <p>
* DBS, Other suffix by which cardholder is known, DL/ID, V5ANS
* </p>
*/
setAliasAKASuffixName(value)
{
this.getJavaClass().setAliasAKASuffixNameSync(value);
}
/**
* <p>
* DCU, Name Suffix (If jurisdiction participates in systems requiring name suffix (PDPS, CDLIS, etc.),
* the suffix must be collected and displayed on the DL/ID and in the MRT).
* JR(Junior), SR(Senior), 1ST or I(First), up to 9TH or IX (Ninth), DL/ID, V5ANS
* </p>
*/
getNameSuffix()
{
return this.getJavaClass().getNameSuffixSync();
}
/**
* <p>
* DCU, Name Suffix (If jurisdiction participates in systems requiring name suffix (PDPS, CDLIS, etc.),
* the suffix must be collected and displayed on the DL/ID and in the MRT).
* JR(Junior), SR(Senior), 1ST or I(First), up to 9TH or IX (Ninth), DL/ID, V5ANS
* </p>
*/
setNameSuffix(value)
{
this.getJavaClass().setNameSuffixSync(value);
}
/**
* <p>
* DCE, Indicates the approximate weight range of the cardholder: 0 = up to 31 kg(up to 70 lbs),
* 1 = 32 – 45 kg(71 – 100 lbs), 2 = 46 - 59 kg(101 – 130 lbs), 3 = 60 - 70 kg(131 – 160 lbs),
* 4 = 71 - 86 kg(161 – 190 lbs), 5 = 87 - 100 kg(191 – 220 lbs), 6 = 101 - 113 kg(221 – 250 lbs),
* 7 = 114 - 127 kg(251 – 280 lbs), 8 = 128 – 145 kg(281 – 320 lbs), 9 = 146+ kg(321+ lbs), DL/ID, F1N
* </p>
*/
getWeightRange()
{
return this.getJavaClass().getWeightRangeSync();
}
/**
* <p>
* DCE, Indicates the approximate weight range of the cardholder: 0 = up to 31 kg(up to 70 lbs),
* 1 = 32 – 45 kg(71 – 100 lbs), 2 = 46 - 59 kg(101 – 130 lbs), 3 = 60 - 70 kg(131 – 160 lbs),
* 4 = 71 - 86 kg(161 – 190 lbs), 5 = 87 - 100 kg(191 – 220 lbs), 6 = 101 - 113 kg(221 – 250 lbs),
* 7 = 114 - 127 kg(251 – 280 lbs), 8 = 128 – 145 kg(281 – 320 lbs), 9 = 146+ kg(321+ lbs), DL/ID, F1N
* </p>
*/
setWeightRange(value)
{
this.getJavaClass().setWeightRangeSync(value);
}
/**
* <p>
* DCL, Codes for race or ethnicity of the cardholder, as defined in AAMVA D20, DL/ID, V3A
* </p>
*/
getRaceEthnicity()
{
return this.getJavaClass().getRaceEthnicitySync();
}
/**
* <p>
* DCL, Codes for race or ethnicity of the cardholder, as defined in AAMVA D20, DL/ID, V3A
* </p>
*/
setRaceEthnicity(value)
{
this.getJavaClass().setRaceEthnicitySync(value);
}
/**
* <p>
* DCM, Standard vehicle classification code(s) for cardholder. This data element is a placeholder for
* future efforts to standardize vehicle classifications, DL, F4AN
* </p>
*/
getStandardVehClassification()
{
return this.getJavaClass().getStandardVehClassificationSync();
}
/**
* <p>
* DCM, Standard vehicle classification code(s) for cardholder. This data element is a placeholder for
* future efforts to standardize vehicle classifications, DL, F4AN
* </p>
*/
setStandardVehClassification(value)
{
this.getJavaClass().setStandardVehClassificationSync(value);
}
/**
* <p>
* DCN, Standard endorsement code(s) for cardholder. See codes in D20.This data element is a placeholder
* for future efforts to standardize endorsement codes, DL, F5AN
* </p>
*/
getStandardEndorsementCode()
{
return this.getJavaClass().getStandardEndorsementCodeSync();
}
/**
* <p>
* DCN, Standard endorsement code(s) for cardholder. See codes in D20.This data element is a placeholder
* for future efforts to standardize endorsement codes, DL, F5AN
* </p>
*/
setStandardEndorsementCode(value)
{
this.getJavaClass().setStandardEndorsementCodeSync(value);
}
/**
* <p>
* DCO, Standard restriction code(s) for cardholder. See codes in D20.This data element is a placeholder
* for future efforts to standardize restriction codes, DL, F12AN
* </p>
*/
getStandardRestrictionCode()
{
return this.getJavaClass().getStandardRestrictionCodeSync();
}
/**
* <p>
* DCO, Standard restriction code(s) for cardholder. See codes in D20.This data element is a placeholder
* for future efforts to standardize restriction codes, DL, F12AN
* </p>
*/
setStandardRestrictionCode(value)
{
this.getJavaClass().setStandardRestrictionCodeSync(value);
}
/**
* <p>
* DCP, Text that explains the jurisdiction-specific code(s) for classifications of vehicles
* cardholder is authorized to drive, DL, V50ANS
* </p>
*/
getVehClassDescription()
{
return this.getJavaClass().getVehClassDescriptionSync();
}
/**
* <p>
* DCP, Text that explains the jurisdiction-specific code(s) for classifications of vehicles
* cardholder is authorized to drive, DL, V50ANS
* </p>
*/
setVehClassDescription(value)
{
this.getJavaClass().setVehClassDescriptionSync(value);
}
/**
* <p>
* DCQ, Text that explains the jurisdiction-specific code(s) that indicates additional driving
* privileges granted to the cardholder beyond the vehicle class, DL, V50ANS
* </p>
*/
getEndorsementCodeDescription()
{
return this.getJavaClass().getEndorsementCodeDescriptionSync();
}
/**
* <p>
* DCQ, Text that explains the jurisdiction-specific code(s) that indicates additional driving
* privileges granted to the cardholder beyond the vehicle class, DL, V50ANS
* </p>
*/
setEndorsementCodeDescription(value)
{
this.getJavaClass().setEndorsementCodeDescriptionSync(value);
}
/**
* <p>
* DCR, Text describing the jurisdiction-specific
* restriction code(s) that curtail driving privileges, DL, V50ANS
* </p>
*/
getRestrictionCodeDescription()
{
return this.getJavaClass().getRestrictionCodeDescriptionSync();
}
/**
* <p>
* DCR, Text describing the jurisdiction-specific
* restriction code(s) that curtail driving privileges, DL, V50ANS
* </p>
*/
setRestrictionCodeDescription(value)
{
this.getJavaClass().setRestrictionCodeDescriptionSync(value);
}
/**
* <p>
* DDA, DHS required field that indicates compliance:
* “F” = compliant; and, “N” = non-compliant, DL/ID, F1A
* </p>
*/
getComplianceType()
{
return this.getJavaClass().getComplianceTypeSync();
}
/**
* <p>
* DDA, DHS required field that indicates compliance:
* “F” = compliant; and, “N” = non-compliant, DL/ID, F1A
* </p>
*/
setComplianceType(value)
{
this.getJavaClass().setComplianceTypeSync(value);
}
/**
* <p>
* DDB, DHS required field that indicates date of the most recent version change or modification
* to the visible format of the DL/ID. (MMDDCCYY for U.S., CCYYMMDD for Canada), DL/ID, F8N
* </p>
*/
getCardRevisionDate()
{
return new Date(this.getJavaClass().getCardRevisionDateSync());
}
/**
* <p>
* DDB, DHS required field that indicates date of the most recent version change or modification
* to the visible format of the DL/ID. (MMDDCCYY for U.S., CCYYMMDD for Canada), DL/ID, F8N
* </p>
*/
setCardRevisionDate(value)
{
this.getJavaClass().setCardRevisionDate(value);
}
/**
* <p>
* DDC, Date on which the hazardous material endorsement granted by the document
* is no longer valid. (MMDDCCYY for U.S., CCYYMMDD for Canada), DL, F8N
* </p>
*/
getHAZMATEndorsementExpDate()
{
return this.getJavaClass().getHAZMATEndorsementExpDate();
}
/**
* <p>
* DDD, DHS required field that indicates that the cardholder has
* temporary lawful status = “1”, DL/ID, F1N
* </p>
*/
getLimitedDurationDocIndicator()
{
return this.getJavaClass().getLimitedDurationDocIndicatorSync();
}
/**
* <p>
* DDD, DHS required field that indicates that the cardholder has
* temporary lawful status = “1”, DL/ID, F1N
* </p>
*/
setLimitedDurationDocIndicator(value)
{
this.getJavaClass().setLimitedDurationDocIndicatorSync(value);
}
/**
* <p>
* DAW, Cardholder weight in pounds, Ex. 185 lb = “185”, DL/ID, F3N
* </p>
*/
getWeightPounds()
{
return this.getJavaClass().getWeightPoundsSync();
}
/**
* <p>
* DAW, Cardholder weight in pounds, Ex. 185 lb = “185”, DL/ID, F3N
* </p>
*/
setWeightPounds(value)
{
this.getJavaClass().setWeightPoundsSync(value);
}
/**
* <p>
* DAX, Cardholder weight in kilograms, Ex. 84 kg = “084”, DL/ID, F3N
* </p>
*/
getWeightKilograms()
{
return this.getJavaClass().getWeightKilogramsSync();
}
/**
* <p>
* DAX, Cardholder weight in kilograms, Ex. 84 kg = “084”, DL/ID, F3N
* </p>
*/
setWeightKilograms(value)
{
this.getJavaClass().setWeightKilogramsSync(value);
}
/**
* <p>
* DDI, Date on which the cardholder turns 19 years old. (MMDDCCYY for U.S., CCYYMMDD for Canada), DL/ID, F8N
* </p>
*/
setUnder18Until(value)
{
this.getJavaClass().setUnder18UntilSync(value);
}
/**
* <p>
* DDH, Date on which the cardholder turns 18 years old. (MMDDCCYY for U.S., CCYYMMDD for Canada), DL/ID, F8N
* </p>
*/
getUnder18Until()
{
return this.getJavaClass().getUnder18UntilSync();
}
/**
* <p>
* DDI, Date on which the cardholder turns 19 years old. (MMDDCCYY for U.S., CCYYMMDD for Canada), DL/ID, F8N
* </p>
*/
setUnder19Until(value)
{
this.getJavaClass().setUnder19UntilSync(value);
}
/**
* <p>
* DDJ, Date on which the cardholder turns 21 years old. (MMDDCCYY for U.S., CCYYMMDD for Canada), DL/ID, F8N
* </p>
*/
getUnder21Until()
{
return this.getJavaClass().getUnder21UntilSync();
}
/**
* <p>
* DDJ, Date on which the cardholder turns 21 years old. (MMDDCCYY for U.S., CCYYMMDD for Canada), DL/ID, F8N
* </p>
*/
setUnder21Until(value)
{
this.getJavaClass().setUnder21UntilSync(value);
}
/**
* <p>
* DDK, Field that indicates that the cardholder is an organ donor = “1”, DL/ID, F1N
* </p>
*/
getOrganDonorIndicator()
{
return this.getJavaClass().getOrganDonorIndicatorSync();
}
/**
* <p>
* DDK, Field that indicates that the cardholder is an organ donor = “1”, DL/ID, F1N
* </p>
*/
setOrganDonorIndicator(value)
{
this.getJavaClass().setOrganDonorIndicatorSync(value);
}
/**
* <p>
* DDL, Field that indicates that the cardholder is a veteran = “1”, DL/ID, F1N
* </p>
*/
getVeteranIndicator()
{
return this.getJavaClass().getVeteranIndicatorSync();
}
/**
* <p>
* DDL, Field that indicates that the cardholder is a veteran = “1”, DL/ID, F1N
* </p>
*/
setVeteranIndicator(value)
{
this.getJavaClass().setVeteranIndicatorSync(value);
}
}
/**
* <p>
* Enum for Eye Color in the US Driver's License
* </p>
*/
USADriveIdEyeColor =
{
/**
* <p>
* Not filled - equal to NONE
* </p>
*/
NO_INFO: 0,
/**
* <p>
* BLK - Black or very dark brown.
* </p>
*/
BLACK: 1,
/**
* <p>
* BLU - Blue color.
* </p>
*/
BLUE: 2,
/**
* <p>
* BRO - Brown, including amber.
* </p>
*/
BROWN: 3,
/**
* <p>
* DIC - Dichromatic or multicolor, of one or both eyes.
* </p>
*/
MULTI_COLOR: 4,
/**
* <p>
* GRY - Gray color.
* </p>
*/
GRAY: 5,
/**
* <p>
* GRN - Green color.
* </p>
*/
GREEN: 6,
/**
* <p>
* HAZ - Hazel, a mixture of colors, most commonly green and brown.
* </p>
*/
HAZEL: 7,
/**
* <p>
* MAR - Maroon color.
* </p>
*/
MAROON: 8,
/**
* <p>
* PNK - Pink or albino
* </p>
*/
PINK: 9,
/**
* <p>
* UNK - Unknown / Other
* </p>
*/
UNKNOWN: 10
}
/**
* <p>
* Enum for Country Identification in the US Driver's License
* </p>
*/
USADriveIdCountry =
{
/**
* <p>
* Not filled - equal to NONE
* </p>
*/
NONE: 0,
/**
* <p>
* Country = U.S.
* </p>
*/
US: 1,
/**
* <p>
* Country = Canada
* </p>
*/
CANADA: 2
}
/**
* <p>
* Enum for Hair Color in the US Driver's License
* </p>
*/
USADriveIdHairColor =
{
/**
* <p>
* Not filled - equal to NONE
* </p>
*/
NO_INFO: 0,
/**
* <p>
* BAL - Bald.
* </p>
*/
BALD: 1,
/**
* <p>
* BLK - Black color
* </p>
*/
BLACK: 2,
/**
* <p>
* BLN - Blonde color
* </p>
*/
BLOND: 3,
/**
* <p>
* BRO - Brown color
* </p>
*/
BROWN: 4,
/**
* <p>
* GRY - Gray color
* </p>
*/
GRAY: 5,
/**
* <p>
* RED - Red / Auburn
* </p>
*/
RED: 6,
/**
* <p>
* SDY - Sandy color
* </p>
*/
SANDY: 7,
/**
* <p>
* WHI - White color
* </p>
*/
WHITE: 8,
/**
* <p>
* UNK - Unknown / Other
* </p>
*/
UNKNOWN: 9
}
/**
* <p>
* Enum for Sex field in the US Driver's License
* </p>
*/
USADriveIdSex =
{
/**
* <p>
* Not filled - equal to NONE
* </p>
*/
NONE: 0,
/**
* <p>
* Male — indicates that the holder's sex is defined as male.
* </p>
*/
MALE: 1,
/**
* <p>
* Female — indicates that the holder's sex is defined as female.
* </p>
*/
FEMALE: 2,
/**
* <p>
* Not specified
* </p>
*/
NOT_SPECIFIED: 9
}
module.exports = {
SwissQRCodetext,
ComplexBarcodeGenerator,
ComplexCodetextReader,
AlternativeScheme,
Address,
AddressType,
SwissQRBill,
Mailmark2DCodetext,
MailmarkCodetext,
Mailmark2DType,
QrBillStandardVersion,
MaxiCodeStandardCodetext,
MaxiCodeSecondMessage,
MaxiCodeStructuredSecondMessage,
MaxiCodeCodetextMode3,
MaxiCodeCodetextMode2,
MaxiCodeCodetext,
HIBCLICCombinedCodetext,
HIBCLICComplexCodetext,
HIBCLICPrimaryDataCodetext,
HIBCLICSecondaryAndAdditionalDataCodetext,
HIBCPASCodetext,
HIBCPASRecord,
PrimaryData,
SecondaryAndAdditionalData,
HIBCLICDateFormat,
HIBCPASDataType,
MaxiCodeStandartSecondMessage,
USADriveIdCodetext,
MandatoryFields,
DataElement,
OptionalFields,
USADriveIdHairColor,
USADriveIdCountry,
USADriveIdEyeColor,
USADriveIdSex,
SubfileProperties
};