Package com.appliedrec.verid.core2
Class FaceTemplate
- java.lang.Object
-
- com.appliedrec.verid.core2.FaceTemplate
-
- All Implemented Interfaces:
android.os.Parcelable
,IRecognizable
public class FaceTemplate extends java.lang.Object implements android.os.Parcelable, IRecognizable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FaceTemplate.UnsupportedVersionError
static class
FaceTemplate.Version
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<FaceTemplate>
CREATOR
-
Constructor Summary
Constructors Constructor Description FaceTemplate(byte[] data, int version, byte[] hash, java.lang.String userId, byte[] iv)
FaceTemplate(byte[] data, int version, java.lang.String userId)
FaceTemplate(byte[] data, int version, java.lang.String userId, byte[] iv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.byte[]
getData()
VerIDFaceTemplateVersion
getFaceTemplateVersion()
byte[]
getHash()
byte[]
getIv()
byte[]
getRecognitionData()
RecognizableType
getType()
java.lang.String
getUserId()
int
getVersion()
boolean
isCompatibleWithVersion(int version)
boolean
isEncrypted()
boolean
isEqualTo(FaceTemplate otherTemplate)
void
setHash(byte[] hash)
void
setIv(byte[] iv)
void
setRecognitionData(byte[] data)
void
setUserId(java.lang.String userId)
void
setVersion(int version)
java.lang.String
toJSON()
java.lang.String
toString()
void
writeToParcel(android.os.Parcel dest, int flags)
Flatten this object in to a Parcel.
-
-
-
Field Detail
-
CREATOR
public static final android.os.Parcelable.Creator<FaceTemplate> CREATOR
-
-
Constructor Detail
-
FaceTemplate
public FaceTemplate(byte[] data, int version, java.lang.String userId) throws VerIDCoreException
- Throws:
VerIDCoreException
-
FaceTemplate
public FaceTemplate(byte[] data, int version, java.lang.String userId, @Nullable byte[] iv) throws VerIDCoreException
- Throws:
VerIDCoreException
-
FaceTemplate
public FaceTemplate(byte[] data, int version, byte[] hash, java.lang.String userId, @Nullable byte[] iv)
-
-
Method Detail
-
describeContents
public int describeContents()
Description copied from interface:android.os.Parcelable
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output ofParcelable.writeToParcel(Parcel, int)
, the return value of this method must include theParcelable.CONTENTS_FILE_DESCRIPTOR
bit.- Specified by:
describeContents
in interfaceandroid.os.Parcelable
- Returns:
- a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)
Description copied from interface:android.os.Parcelable
Flatten this object in to a Parcel.- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
- Parameters:
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written. May be 0 orParcelable.PARCELABLE_WRITE_RETURN_VALUE
.
-
getData
public byte[] getData()
-
getRecognitionData
public byte[] getRecognitionData()
- Specified by:
getRecognitionData
in interfaceIRecognizable
- Returns:
- Face recognition data
-
setRecognitionData
public void setRecognitionData(byte[] data)
-
getVersion
public int getVersion()
- Specified by:
getVersion
in interfaceIRecognizable
- Returns:
- Version used to determine compatibility
-
setVersion
public void setVersion(int version)
-
getType
public RecognizableType getType()
- Specified by:
getType
in interfaceIRecognizable
- Returns:
- Type of recognizable data this object contains
-
isEqualTo
public boolean isEqualTo(FaceTemplate otherTemplate)
-
toJSON
@NonNull public java.lang.String toJSON() throws org.json.JSONException
- Throws:
org.json.JSONException
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getHash
public byte[] getHash()
-
getUserId
public java.lang.String getUserId()
-
setHash
public void setHash(@NonNull byte[] hash)
-
setUserId
public void setUserId(java.lang.String userId)
-
getIv
public byte[] getIv()
-
setIv
public void setIv(@NonNull byte[] iv)
-
isEncrypted
public boolean isEncrypted()
-
isCompatibleWithVersion
public boolean isCompatibleWithVersion(int version)
-
getFaceTemplateVersion
public VerIDFaceTemplateVersion getFaceTemplateVersion()
-
-