sourceafis.simple
Class Person

java.lang.Object
  extended by sourceafis.simple.Person
All Implemented Interfaces:
Serializable, Cloneable

public class Person
extends Object
implements Cloneable, Serializable

Collection of Fingerprints belonging to one person. This class is primarily a way to group multiple Fingerprints belonging to one person. This is very convenient feature when there are multiple fingerprints per person, because it is possible to match two Persons directly instead of iterating over their Fingerprints.

Id property is provided as a simple means to bind Person objects to application-specific information. If you need more flexibility, inherit from Person class and add application-specific fields as necessary.

This class is designed to be easy to serialize in order to be stored in binary format (BLOB) in application database, binary or XML files, or sent over network. You can either serialize the whole Person or serialize individual Fingerprints.

See Also:
Fingerprint

Constructor Summary
Person()
          Creates an empty Person object.
Person(Fingerprint... fingerprints)
          Creates new Person object and initializes it with a list of Fingerprints.
 
Method Summary
 Person clone()
          Creates deep copy of the Person.
 List<Fingerprint> getFingerprints()
          Gets list of Fingerprints belonging to the Person.
 int getId()
          Gets application-defined ID for the Person.
 void setFingerprints(List<Fingerprint> fingerprints)
          Sets list of Fingerprints belonging to the Person.
 void setId(int id)
          Sets application-defined ID for the Person.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Person

public Person()
Creates an empty Person object.


Person

public Person(Fingerprint... fingerprints)
Creates new Person object and initializes it with a list of Fingerprints.

Parameters:
fingerprints - Fingerprint objects to add to the new Person
Method Detail

getId

public int getId()
Gets application-defined ID for the Person. See setId for explanation. This method just returns previously set ID.

Returns:
ID that was previously set via setId
See Also:
setId

setId

public void setId(int id)
Sets application-defined ID for the Person. SourceAFIS doesn't use this ID. It is provided for applications as an easy means to link Person objects back to application-specific data. Applications can store any integer ID in this field, for example database table key or an array index.

Applications that need to attach more detailed information to the person should inherit from Person class and add fields as necessary.

Parameters:
id - arbitrary application-defined ID
See Also:
getId

getFingerprints

public List<Fingerprint> getFingerprints()
Gets list of Fingerprints belonging to the Person. This collection is initially empty. Add Fingerprint objects to the returned collection.

See Also:
setFingerprints, Fingerprint

setFingerprints

public void setFingerprints(List<Fingerprint> fingerprints)
Sets list of Fingerprints belonging to the Person. You can assign the whole collection using this method. Individual Fingerprints can be added to the collection returned from getFingerprints.

Parameters:
fingerprints - new list of Fingerprints for this Person
See Also:
getFingerprints, Fingerprint

clone

public Person clone()
Creates deep copy of the Person. This method clones all Fingerprint objects contained in this Person.

Overrides:
clone in class Object
Returns:
deep copy of the Person