Aspose.Barcode for Python via Java Generation and Recognition API docs

Class for encoding and decoding the text embedded in the HIBC PAS code. More...

Inherits IComplexCodetext.

Public Member Functions

None __init__ (self)
 
None addHIBCPASRecord (self, HIBCPASRecord record)
 Adds new record. More...
 
None addRecord (self, HIBCPASDataType dataType, str data)
 Adds new record. More...
 
None clear (self)
 Clears records list. More...
 
bool equals (self, HIBCPASCodetext obj)
 Returns a value indicating whether this instance is equal to a specified HIBCPASCodetext value. More...
 
int getBarcodeType (self)
 Gets barcode type. More...
 
str getConstructedCodetext (self)
 Constructs codetext. More...
 
HIBCPASDataLocation getDataLocation (self)
 Identifies data location. More...
 
List[HIBCPASRecordgetRecords (self)
 Gets records list. More...
 
int hashCode (self)
 Returns the hash code for this instance. More...
 
def init (self)
 
None initFromString (self, str constructedCodetext)
 Initializes instance from constructed codetext. More...
 
None setBarcodeType (self, Generation.EncodeTypes value)
 Sets barcode type. More...
 
None setDataLocation (self, HIBCPASDataLocation value)
 Identifies data location. More...
 
- Public Member Functions inherited from IComplexCodetext
def __init__ (self, javaClass)
 
- Public Member Functions inherited from BaseJavaClass
def getJavaClass (self)
 
str getJavaClassName (self)
 
bool isNull (self)
 
None printJavaClassName (self)
 
None setJavaClass (self, javaClass)
 

Static Public Member Functions

HIBCPASCodetext construct (javaClass)
 

Static Public Attributes

string JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCPASCodetext"
 

Additional Inherited Members

- Public Attributes inherited from BaseJavaClass
 javaClass
 
 javaClassName
 

Detailed Description

Class for encoding and decoding the text embedded in the HIBC PAS code.

This sample shows how to encode and decode HIBC PAS using HIBCPASCodetext.

complexCodetext = ComplexBarcode.HIBCPASCodetext()
complexCodetext.setDataLocation(ComplexBarcode.HIBCPASDataLocation.PATIENT)
complexCodetext.addRecord(ComplexBarcode.HIBCPASDataType.LABELER_IDENTIFICATION_CODE, "A123")
complexCodetext.addRecord(ComplexBarcode.HIBCPASDataType.MANUFACTURER_SERIAL_NUMBER, "SERIAL123")
complexCodetext.setBarcodeType(EncodeTypes.HIBC_DATA_MATRIX_PAS)
generator = ComplexBarcodeGenerator(complexCodetext)
reader = Recognition.BarCodeReader(generator.generateBarCodeImage(), None, DecodeType.HIBC_DATA_MATRIX_PAS)
reader.readBarCodes()
codetext = reader.getFoundBarCodes()[0].getCodeText()
if codetext is not None:
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())

Constructor & Destructor Documentation

◆ __init__()

None __init__ (   self)

Member Function Documentation

◆ addHIBCPASRecord()

None addHIBCPASRecord (   self,
HIBCPASRecord  record 
)

Adds new record.

◆ addRecord()

None addRecord (   self,
HIBCPASDataType  dataType,
str  data 
)

Adds new record.

Parameters
dataType:Type of data
data:Data string

◆ clear()

None clear (   self)

Clears records list.

◆ construct()

HIBCPASCodetext construct (   javaClass)
static

◆ equals()

bool equals (   self,
HIBCPASCodetext  obj 
)

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

Parameters
obj:An HIBCPASCodetext value to compare to this instance.
Returns
:True if obj has the same value as this instance; otherwise, False.

◆ getBarcodeType()

int getBarcodeType (   self)

Gets barcode type.

Returns
:Barcode type.

Reimplemented from IComplexCodetext.

◆ getConstructedCodetext()

str getConstructedCodetext (   self)

Constructs codetext.

Returns
:Constructed codetext.

Reimplemented from IComplexCodetext.

◆ getDataLocation()

HIBCPASDataLocation getDataLocation (   self)

Identifies data location.

◆ getRecords()

List[HIBCPASRecord] getRecords (   self)

Gets records list.

Returns
:List of records

◆ hashCode()

int hashCode (   self)

Returns the hash code for this instance.

Returns
:A 32-bit signed integer hash code.

◆ init()

def init (   self)

Reimplemented from BaseJavaClass.

◆ initFromString()

None initFromString (   self,
str  constructedCodetext 
)

Initializes instance from constructed codetext.

Parameters
constructedCodetext:Constructed codetext.

Reimplemented from IComplexCodetext.

◆ setBarcodeType()

None setBarcodeType (   self,
Generation.EncodeTypes  value 
)

Sets barcode type.

HIBC PAS codetext can be encoded using HIBCCode39PAS, HIBCCode128PAS, HIBCAztec:PAS, HIBCDataMatrixPAS and HIBCQRPAS encode types. Default value: HIBCCode39PAS.

Returns
:Barcode type.

◆ setDataLocation()

None setDataLocation (   self,
HIBCPASDataLocation  value 
)

Identifies data location.

Member Data Documentation

◆ JAVA_CLASS_NAME

string JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwHIBCPASCodetext"
static