Class BiometricsProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.biometrics.BiometricsProperties
- All Implemented Interfaces:
BiometricsInterface,JposBaseInterface
Class containing the biometrics specific properties, their default values and default implementations of
BiometricsInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Biometrics.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelper class for Biometric Information Record (BIR) interpretation. -
Field Summary
FieldsModifier and TypeFieldDescriptionUPOS property Algorithm.intDefault value of Algorithm property.UPOS property AlgorithmList.byte[]UPOS property BIR.booleanUPOS property CapPrematchData.booleanUPOS property CapRawSensorData.booleanUPOS property CapRealTimeData.intUPOS property CapSensorColor.intUPOS property CapSensorOrientation.UPOS property CapSensorType.intDefault value of CapSensorType property.booleanUPOS property CapTemplateAdaptation.byte[]UPOS property RawSensorData.booleanUPOS property RealTimeDataEnabled.UPOS property SensorBPP.intUPOS property SensorColor.UPOS property SensorHeight.UPOS property SensorOrientation.intDefault value of SensorOrientation property.UPOS property SensorType.Default value of SensorType property.UPOS property SensorWidth.Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
AllowAlwaysSetProperties, AllowDeprecatedMethods, AsyncInputActive, AsyncMode, AutoDisable, CapStatisticsReporting, CapUpdateStatistics, CheckHealthText, Claimed, Claiming, ClaimWaiters, CurrentCommands, CurrentUnitID, DataCount, DataEventEnabled, DataEventList, Device, DeviceEnabled, DeviceServiceDescription, DeviceServiceVersion, DevProps, ErrorString, ErrorUnits, EventCB, EventList, EventSource, EventString, EventUnitID, EventUnits, ExclusiveAllowed, ExclusiveNo, ExclusiveUse, ExclusiveYes, FirstEnableHappened, FlagWhenIdle, FlagWhenIdleStatusValue, FreezeEvents, Index, LogicalName, MaximumConfirmationEventWaitingTime, OutputID, PowerNotify, PowerState, SerializedRequestRunner, SerializedRequests, State, StrictFIFOEventHandling, SuspendedCommands, SuspendedConcurrentCommands, UnitsOnline, UsesSubsystemUnits -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidalgorithm(int newAlgorithm)Final part of setting Algorithm.voidbeginEnrollCapture(byte[] referenceBIR, byte[] payload)Final part of BeginEnrollCapture method.voidFinal part of BeginVerifyCapture method.booleancheckBIRPurpose(byte[] bir, Boolean verify)Checks if a BIR is valid for a given purpose.voidcheckFARorFRRLimit(int limit, String name)Checks whether a FAR or FRR limit is valid.voidFinal part of EndCapture method.voididentify(int maxFARRequested, int maxFRRRequested, boolean fARPrecedence, byte[][] referenceBIRPopulation, int[][] candidateRanking, int timeout)Final part of Identify method.voididentifyMatch(int maxFARRequested, int maxFRRRequested, boolean fARPrecedence, byte[] sampleBIR, byte[][] referenceBIRPopulation, int[][] candidateRanking)Final part of IdentifyMatch method.voidInitialize properties that must be initialized whenever the device will be claimed.booleanInitialize properties that must be initialized whenever the device will be enabled the first time-voidInitialization of properties that must be initialized during open.booleanisDataEmpty(byte[] data, boolean isBIR)Checks whether a given BIR or payload is empty.voidprocessPrematchData(byte[] sampleBIR, byte[] prematchDataBIR, byte[][] processedBIR)Final part of ProcessPrematchData method.voidrealTimeDataEnabled(boolean newRealTimeDataEnabled)Final part of setting RealTimeDataEnabled.voidsensorColor(int newSensorColor)Final part of setting SensorColor.voidsensorOrientation(int newSensorOrientation)Final part of setting SensorOrientation.voidsensorType(int newSensorType)Final part of setting SensorType.voidverify(int maxFARRequested, int maxFRRRequested, boolean fARPrecedence, byte[] referenceBIR, byte[][] adaptedBIR, boolean[] result, int[] fARAchieved, int[] fRRAchieved, byte[][] payload, int timeout)Final part of Verify method.voidverifyMatch(int maxFARRequested, int maxFRRRequested, boolean fARPrecedence, byte[] sampleBIR, byte[] referenceBIR, byte[][] adaptedBIR, boolean[] result, int[] fARAchieved, int[] fRRAchieved, byte[][] payload)Final part of VerifyMatch method.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkHealth, checkProperties, claim, clearDataProperties, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnEnable, newJposOutputRequest, open, powerNotify, release, releaseWaiter, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, signalWaiter, unitDataCount, updateFirmware, updateFirmware, updateStatistics, waitWaiterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.gmxhome.conrad.jpos.jpos_base.JposBaseInterface
asyncMode, autoDisable, checkHealth, claim, clearInput, clearOutput, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, handlePowerStateOnEnable, newJposOutputRequest, open, powerNotify, release, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Field Details
-
CapPrematchData
public boolean CapPrematchDataUPOS property CapPrematchData. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapRawSensorData
public boolean CapRawSensorDataUPOS property CapRawSensorData. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapRealTimeData
public boolean CapRealTimeDataUPOS property CapRealTimeData. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapSensorColor
public int CapSensorColorUPOS property CapSensorColor. Default: CSC_MONO. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapSensorOrientation
public int CapSensorOrientationUPOS property CapSensorOrientation. Default: CSO_NORMAL. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapSensorTypeDef
public int CapSensorTypeDefDefault value of CapSensorType property. Default: CST_PASSWORD. Should be updated before calling initOnEnable the first time. -
CapSensorType
UPOS property CapSensorType. Default: null. Must be overwritten by objects derived from JposDevice at least when the device is enabled the first time. -
CapTemplateAdaptation
public boolean CapTemplateAdaptationUPOS property CapTemplateAdaptation. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
AlgorithmDef
public int AlgorithmDefDefault value of Algorithm property. Default: 0. Should be updated before calling initOnClaim the first time. -
Algorithm
UPOS property Algorithm. Default: null. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
AlgorithmList
UPOS property AlgorithmList. Default: "". Should be overwritten by objects derived from JposDevice within the changeDefaults method. -
BIR
public byte[] BIRUPOS property BIR. Default: null. -
RawSensorData
public byte[] RawSensorDataUPOS property RawSensorData. Default: null. -
RealTimeDataEnabled
public boolean RealTimeDataEnabledUPOS property RealTimeDataEnabled. Set to false in initOnOpen method.. -
SensorBPP
UPOS property SensorBPP. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
SensorColor
public int SensorColorUPOS property SensorColor. Default: SC_MONO. Can be overwritten by objects derived from JposDevice within the changeDefaults method, must be overwritten if CapSensorColor does not contain CSC_MONO. -
SensorHeight
UPOS property SensorHeight. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
SensorOrientationDef
public int SensorOrientationDefDefault value of SensorOrientation property. Default: SC_MONO. Should be updated before calling initOnClaim the first time. Must be overwritten if CapSensorOrientation does not contain CSO_NORMAL. -
SensorOrientation
UPOS property SensorOrientation. -
SensorTypeDef
Default value of SensorType property. Default: null. Must be overwritten before any call to method initOnClaim. -
SensorType
UPOS property SensorType. Default: null. Must be overwritten by objects derived from JposDevice at least when the device is enabled the first time. -
SensorWidth
UPOS property SensorWidth. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
-
-
Constructor Details
-
BiometricsProperties
protected BiometricsProperties(int dev)Constructor.- Parameters:
dev- Device index
-
-
Method Details
-
initOnOpen
public void initOnOpen()Description copied from class:JposCommonPropertiesInitialization of properties that must be initialized during open.- Overrides:
initOnOpenin classJposCommonProperties
-
initOnClaim
public void initOnClaim()Description copied from class:JposCommonPropertiesInitialize properties that must be initialized whenever the device will be claimed.- Overrides:
initOnClaimin classJposCommonProperties
-
initOnFirstEnable
public boolean initOnFirstEnable()Description copied from class:JposCommonPropertiesInitialize properties that must be initialized whenever the device will be enabled the first time-- Overrides:
initOnFirstEnablein classJposCommonProperties- Returns:
- Returns true in case of first enable.
-
algorithm
public void algorithm(int newAlgorithm) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of setting Algorithm. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is claimed,
- Device is not enabled,
- newAlgorithm is between 0 and the number of algorithms specified in AlgorithmList.
- Specified by:
algorithmin interfaceBiometricsInterface- Parameters:
newAlgorithm- New value for Algorithm property.- Throws:
jpos.JposException- If an error occurs.
-
realTimeDataEnabled
public void realTimeDataEnabled(boolean newRealTimeDataEnabled) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of setting RealTimeDataEnabled. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is open,
- CapRealTimeData is true or newRealTimeData is false,
- internal property AllowAlwaysSetProperties is true or newRealTimeDataEnabled equals the previous value of RealTimeDataEnabled.
- Specified by:
realTimeDataEnabledin interfaceBiometricsInterface- Parameters:
newRealTimeDataEnabled- New value for RealTimeDataEnabled property.- Throws:
jpos.JposException- If an error occurs.
-
sensorColor
public void sensorColor(int newSensorColor) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of setting SensorColor. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is open,
- newSensorColor is one of SC_MONO, SC_GRAYSCALE, SC_16, SC_256 or SC_FULL,
- the corresponding bit in CapSensorColor is set,
- internal property AllowAlwaysSetProperties is true or newSensorColor equals the previous value of SensorColor.
- Specified by:
sensorColorin interfaceBiometricsInterface- Parameters:
newSensorColor- New value for SensorColor property.- Throws:
jpos.JposException- If an error occurs.
-
sensorOrientation
public void sensorOrientation(int newSensorOrientation) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of setting SensorOrientation. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is claimed,
- Device is not enabled,
- newSensorOrientation is one of SO_NORMAL, SO_RIGHT, SO_INVERTED or SO_LEFT,
- the corresponding bit in CapSensorOrientation is set.
- Specified by:
sensorOrientationin interfaceBiometricsInterface- Parameters:
newSensorOrientation- New value for SensorOrientation property.- Throws:
jpos.JposException- If an error occurs.
-
sensorType
public void sensorType(int newSensorType) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of setting SensorType. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- newSensorType is one of ST_FACIAL_FEATURES, ST_VOICE, ST_FINGERPRINT, ST_IRIS, ST_RETINA, ST_HAND_GEOMETRY, ST_SIGNATURE_DYNAMICS, ST_KEYSTROKE_DYNAMICS, ST_LIP_MOVEMENT, ST_THERMAL_FACE_IMAGE, ST_THERMAL_HAND_IMAGE, ST_GAIT or ST_PASSWORD,
- the corresponding bit in CapSensorType is set.
- Specified by:
sensorTypein interfaceBiometricsInterface- Parameters:
newSensorType- New value for SensorType property.- Throws:
jpos.JposException- If an error occurs.
-
beginEnrollCapture
public void beginEnrollCapture(byte[] referenceBIR, byte[] payload) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of BeginEnrollCapture method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- referenceBIR and payload are not null (null arguments will be passed as byte[0]),
- CapTemplateAdaptation or isEmpty(referenceBIR, true) is true.
- Specified by:
beginEnrollCapturein interfaceBiometricsInterface- Parameters:
referenceBIR- Optional BIR to be adapted (updated).payload- Data that will be stored by the BSP.- Throws:
jpos.JposException- If an error occurs.
-
beginVerifyCapture
public void beginVerifyCapture() throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of BeginVerifyCapture method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
beginVerifyCapturein interfaceBiometricsInterface- Throws:
jpos.JposException- If an error occurs.
-
endCapture
public void endCapture() throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of EndCapture method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
endCapturein interfaceBiometricsInterface- Throws:
jpos.JposException- If an error occurs.
-
identify
public void identify(int maxFARRequested, int maxFRRRequested, boolean fARPrecedence, byte[][] referenceBIRPopulation, int[][] candidateRanking, int timeout) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of Identify method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- maxFARRequested and maxFRRRequested have been checked with checkFARorFRRLimit,
- timeout is positive or FOREVER,
- referenceBIRPopulation has a length > 0,
- each referenceBIR in referenceBIRPopulation is valid (checkBIRPurpose(referenceBIR, null) is true),
- candidateRanking is a valid reference (non-null int[1][]).
- Specified by:
identifyin interfaceBiometricsInterface- Parameters:
maxFARRequested- The requested FAR criterion for successful verification.maxFRRRequested- The requested FRR criterion for successful verification.fARPrecedence- If both criteria are provided, this parameter indicates which takes precedence.referenceBIRPopulation- An array of BIRs against which the Identify match is performed.candidateRanking- Array reference of BIR indices from the referenceBIRPopulation listed in rank order.timeout- Timeout for successful biometric capture.- Throws:
jpos.JposException- If an error occurs.
-
identifyMatch
public void identifyMatch(int maxFARRequested, int maxFRRRequested, boolean fARPrecedence, byte[] sampleBIR, byte[][] referenceBIRPopulation, int[][] candidateRanking) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of IdentifyMatch method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- maxFARRequested and maxFRRRequested have been checked with checkFARorFRRLimit,
- sampleBIR is not empty (isDataEmpty(sampleBIR, true) is false),
- referenceBIRPopulation has a length > 0,
- each referenceBIR in referenceBIRPopulation is valid (checkBIRPurpose(referenceBIR, null) is true),
- candidateRanking is a valid reference (non-null int[1][]).
- Specified by:
identifyMatchin interfaceBiometricsInterface- Parameters:
maxFARRequested- The requested FAR criterion for successful verification.maxFRRRequested- The requested FRR criterion for successful verification.fARPrecedence- If both criteria are provided, this parameter indicates which takes precedence.sampleBIR- The BIR to be identified.referenceBIRPopulation- An array of BIRs against which the Identify match is performed.candidateRanking- Array reference of BIR indices from the referenceBIRPopulation listed in rank order.- Throws:
jpos.JposException- If an error occurs.
-
processPrematchData
public void processPrematchData(byte[] sampleBIR, byte[] prematchDataBIR, byte[][] processedBIR) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of ProcessPrematchData method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- sampleBIR and prematchDataBIR are not empty (isEmpty(sampleBIR, true) and isEmpty(prematchDataBIR, true) are false),
- processedBIR is a valid reference (non-null byte[1][]),
- CapPrematchData is true.
- Specified by:
processPrematchDatain interfaceBiometricsInterface- Parameters:
sampleBIR- BIR to be processed.prematchDataBIR- BIR containing prematch data.processedBIR- Reference for the new constructed BIR.- Throws:
jpos.JposException- If an error occurs.
-
verify
public void verify(int maxFARRequested, int maxFRRRequested, boolean fARPrecedence, byte[] referenceBIR, byte[][] adaptedBIR, boolean[] result, int[] fARAchieved, int[] fRRAchieved, byte[][] payload, int timeout) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of Verify method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- maxFARRequested and maxFRRRequested have been checked with checkFARorFRRLimit,
- timeout is positive or FOREVER,
- referenceBIR is valid (checkBIRPurpose(referenceBIR, null) is true),
- adaptedBIR is a valid reference (non-null byte[1][]),
- result is a valid reference (non-null boolean[1]),
- fARAchieved and fRRAchieved are a valid references (non-null int[1]),
- payload is a valid reference (non-null byte[1][]),
- adaptedBIR is a valid reference (non-null byte[1][]),
- candidateRanking is a valid reference (non-null int[1][]).
- Specified by:
verifyin interfaceBiometricsInterface- Parameters:
maxFARRequested- The requested FAR criterion for successful verification.maxFRRRequested- The requested FRR criterion for successful verification.fARPrecedence- If both criteria are provided, this parameter indicates which takes precedence.referenceBIR- The BIR to be verified against.adaptedBIR- Reference of the adapted BIR.result- Reference of the result.fARAchieved- Reference to FAR Value indicating the closeness of the match.fRRAchieved- Reference to FRR Value indicating the closeness of the match.payload- Reference to optional payload.timeout- Timeout for successful verification.- Throws:
jpos.JposException- If an error occurs.
-
verifyMatch
public void verifyMatch(int maxFARRequested, int maxFRRRequested, boolean fARPrecedence, byte[] sampleBIR, byte[] referenceBIR, byte[][] adaptedBIR, boolean[] result, int[] fARAchieved, int[] fRRAchieved, byte[][] payload) throws jpos.JposExceptionDescription copied from interface:BiometricsInterfaceFinal part of VerifyMatch method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- maxFARRequested and maxFRRRequested have been checked with checkFARorFRRLimit,
- timeout is positive or FOREVER,
- sampleBIR is not empty (isDataEmpty(sampleBIR, true) is false),
- referenceBIR is valid (checkBIRPurpose(referenceBIR, null) is true),
- adaptedBIR is a valid reference (non-null byte[1][]),
- result is a valid reference (non-null boolean[1]),
- fARAchieved and fRRAchieved are a valid references (non-null int[1]),
- payload is a valid reference (non-null byte[1][]),
- adaptedBIR is a valid reference (non-null byte[1][]),
- candidateRanking is a valid reference (non-null int[1][]).
- Specified by:
verifyMatchin interfaceBiometricsInterface- Parameters:
maxFARRequested- The requested FAR criterion for successful verification.maxFRRRequested- The requested FRR criterion for successful verification.fARPrecedence- If both criteria are provided, this parameter indicates which takes precedence.sampleBIR- The BIR to be identified.referenceBIR- The BIR to be verified against.adaptedBIR- Reference of the adapted BIR.result- Reference of the result.fARAchieved- Reference to FAR Value indicating the closeness of the match.fRRAchieved- Reference to FRR Value indicating the closeness of the match.payload- Reference to optional payload.- Throws:
jpos.JposException- If an error occurs.
-
checkFARorFRRLimit
Description copied from interface:BiometricsInterfaceChecks whether a FAR or FRR limit is valid. Negative FAR or FRR limits are invalid. Depending on the interpretation of FAR and FRR values as specified in the UPOS specification (percentage values) or as used in the BioAPI reference implementation (probability in units of 1/Integer.MAX_VALUE), it can be necessary to override this method within the implementation class. The default implementation is interpretation as specified in UPOS specification, throwing a JposException if limit is less than zero or greater than 100 (percentage values).- Specified by:
checkFARorFRRLimitin interfaceBiometricsInterface- Parameters:
limit- FAR or FRR limit to be checked.name- limit name (maxFARRequested or maxFRRRequested).- Throws:
jpos.JposException- If limit is out of range, at least if negative.
-
checkBIRPurpose
Description copied from interface:BiometricsInterfaceChecks if a BIR is valid for a given purpose.- Specified by:
checkBIRPurposein interfaceBiometricsInterface- Parameters:
bir- The BIR to be checked.verify- Must be set to true to check for validity for verification, to false for validity check for identification or to null for validity check for use as reference BIR.- Returns:
- true if the BIR is valid for the specified purpose, false otherwise.
-
isDataEmpty
public boolean isDataEmpty(byte[] data, boolean isBIR)Description copied from interface:BiometricsInterfaceChecks whether a given BIR or payload is empty. In the default implementation, empty means the given data is null or all bytes of data are zero. In addition, if isBIR is true, data is also empty if data.length is not greater than the BIR header length (16) or the Length field of the BIR is equal to the header length.- Specified by:
isDataEmptyin interfaceBiometricsInterface- Parameters:
data- The BIR or payload to be checked.isBIR- True in case of a BIR, false for payload value.- Returns:
- true if data is empty, false otherwise.
-