Class HIBCLICCombinedCodetext

java.lang.Object
com.aspose.barcode.complexbarcode.HIBCLICComplexCodetext
com.aspose.barcode.complexbarcode.HIBCLICCombinedCodetext
All Implemented Interfaces:
IComplexCodetext

public class HIBCLICCombinedCodetext extends HIBCLICComplexCodetext

Class for encoding and decoding the text embedded in the HIBC LIC code which stores primary and secodary data.


 This sample shows how to encode and decode HIBC LIC using HIBCLICCombinedCodetext.
 

 HIBCLICCombinedCodetext 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);
 BufferedImage image = generator.generateBarCodeImage();
 BarCodeReader reader = new BarCodeReader(image, DecodeType.HIBCQRLIC);
 reader.readBarCodes();
 String codetext = reader.getFoundBarCodes()[0].getCodeText();
 HIBCLICCombinedCodetext result = (HIBCLICCombinedCodetext)ComplexCodetextReader.tryDecodeHIBCLIC(codetext);
 System.out.println("Product or catalog number: " + result.getPrimaryData().getProductOrCatalogNumber());
 System.out.println("Labeler identification code: " + result.getPrimaryData().getLabelerIdentificationCode());
 System.out.println("Unit of measure ID: " + result.getPrimaryData().getUnitOfMeasureID());
 System.out.println("Expiry date: " + result.getSecondaryAndAdditionalData().getExpiryDate());
 System.out.println("Quantity: " + result.getSecondaryAndAdditionalData().getQuantity());
 System.out.println("Lot number: " + result.getSecondaryAndAdditionalData().getLotNumber());
 System.out.println("Serial number: " + result.getSecondaryAndAdditionalData().getSerialNumber());
 System.out.println("Date of manufacture: " + result.getSecondaryAndAdditionalData().getDateOfManufacture());
 

  • Constructor Details

    • HIBCLICCombinedCodetext

      public HIBCLICCombinedCodetext()
  • Method Details

    • getPrimaryData

      public PrimaryData getPrimaryData()

      Identifies primary data.

    • setPrimaryData

      public void setPrimaryData(PrimaryData value)

      Identifies primary data.

    • getSecondaryAndAdditionalData

      public SecondaryAndAdditionalData getSecondaryAndAdditionalData()

      Identifies secondary and additional supplemental data.

    • setSecondaryAndAdditionalData

      public void setSecondaryAndAdditionalData(SecondaryAndAdditionalData value)

      Identifies secondary and additional supplemental data.

    • getConstructedCodetext

      public String getConstructedCodetext()

      Constructs codetext

      Specified by:
      getConstructedCodetext in interface IComplexCodetext
      Specified by:
      getConstructedCodetext in class HIBCLICComplexCodetext
      Returns:
      Constructed codetext
    • initFromString

      public void initFromString(String constructedCodetext)

      Initializes instance from constructed codetext.

      Specified by:
      initFromString in interface IComplexCodetext
      Specified by:
      initFromString in class HIBCLICComplexCodetext
      Parameters:
      constructedCodetext - Constructed codetext.
    • equals

      public boolean equals(Object obj)

      Returns a value indicating whether this instance is equal to a specified HIBCLICCombinedCodetext value.

      Overrides:
      equals in class Object
      Parameters:
      obj - An HIBCLICCombinedCodetext value to compare to this instance.
      Returns:
      <b>true</b> if obj has the same value as this instance; otherwise, <b>false</b>.
    • hashCode

      public int hashCode()

      Returns the hash code for this instance.

      Overrides:
      hashCode in class Object
      Returns:
      A 32-bit signed integer hash code.