HIBCPASCodetext
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.barcode.complexbarcode.IComplexCodetext
public class HIBCPASCodetext implements IComplexCodetext
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. HIBCPASComplexCodetext 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); ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(complexCodetext); BarCodeReader reader = new BarCodeReader(generator.generateBarCodeImage(), DecodeType.HIBC_DATA_MATRIX_PAS); reader.readBarCodes(); String codetext = reader.getFoundBarCodes()[0].getCodeText(); HIBCPASComplexCodetext readCodetext = ComplexCodetextReader.tryDecodeHIBCPAS(codetext); System.out.println("Data location: {0}", readCodetext.getDataLocation()); System.out.print("Data type: {0}. ", readCodetext.getRecords()[0].getDataType()); System.out.println("Data: {0}", readCodetext.getRecords()[0].getData()); System.out.print("Data type: {0}. ", readCodetext.getRecords()[1].getDataType()); System.out.println("Data: {0}", readCodetext.getRecords()[1].getData()); } }
Constructors
Constructor | Description |
---|---|
HIBCPASCodetext() |
Methods
Method | Description |
---|---|
addRecord(HIBCPASRecord record) | Adds new record |
addRecord(int dataType, String data) | Adds new record |
clear() | Clears records list |
equals(Object obj) | Returns a value indicating whether this instance is equal to a specified HIBCPASCodetext value. |
getBarcodeType() | Gets barcode type. |
getClass() | |
getConstructedCodetext() | Constructs codetext |
getDataLocation() | Identifies data location. |
getRecords() | Gets records list |
hashCode() | Returns the hash code for this instance. |
initFromString(String constructedCodetext) | Initializes instance from constructed codetext. |
notify() | |
notifyAll() | |
setBarcodeType(BaseEncodeType value) | Gets or sets barcode type. |
setDataLocation(int value) | Identifies data location. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
HIBCPASCodetext()
public HIBCPASCodetext()
addRecord(HIBCPASRecord record)
public void addRecord(HIBCPASRecord record)
Adds new record
Parameters:
Parameter | Type | Description |
---|---|---|
record | HIBCPASRecord | Record to be added |
addRecord(int dataType, String data)
public void addRecord(int dataType, String data)
Adds new record
Parameters:
Parameter | Type | Description |
---|---|---|
dataType | int | Type of data |
data | java.lang.String | Data string |
clear()
public void clear()
Clears records list
equals(Object obj)
public boolean equals(Object obj)
Returns a value indicating whether this instance is equal to a specified HIBCPASCodetext value.
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object | An HIBCPASCodetext value to compare to this instance. |
Returns: boolean - true if obj has the same value as this instance; otherwise, false .
getBarcodeType()
public BaseEncodeType getBarcodeType()
Gets barcode type.
Returns: BaseEncodeType - Barcode type.
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getConstructedCodetext()
public String getConstructedCodetext()
Constructs codetext
Returns: java.lang.String - Constructed codetext
getDataLocation()
public int getDataLocation()
Identifies data location.
Returns: int
getRecords()
public System.Collections.Generic.List<HIBCPASRecord> getRecords()
Gets records list
Returns: com.aspose.ms.System.Collections.Generic.List<com.aspose.barcode.complexbarcode.HIBCPASRecord> - List of records
hashCode()
public int hashCode()
Returns the hash code for this instance.
Returns: int - A 32-bit signed integer hash code.
initFromString(String constructedCodetext)
public void initFromString(String constructedCodetext)
Initializes instance from constructed codetext.
Parameters:
Parameter | Type | Description |
---|---|---|
constructedCodetext | java.lang.String | Constructed codetext. |
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setBarcodeType(BaseEncodeType value)
public void setBarcodeType(BaseEncodeType value)
Gets or sets barcode type. HIBC PAS codetext can be encoded using HIBCCode39PAS, HIBCCode128PAS, HIBCAztec:PAS, HIBCDataMatrixPAS and HIBCQRPAS encode types. Default value: HIBCCode39PAS.
Parameters:
Parameter | Type | Description |
---|---|---|
value | BaseEncodeType |
setDataLocation(int value)
public void setDataLocation(int value)
Identifies data location.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |