cafe.fingerprintauthentication
Class FingerprintCache

java.lang.Object
  extended by cafe.fingerprintauthentication.FingerprintCache

public class FingerprintCache
extends java.lang.Object

This class implements the cache part of the FingerprintAuthentication component. It's purpose is to store the FingeprintDataCache objects.

Since:
1.0 Parts made by Veli-Pekka Kestilä(vpk) Copyright(C) Veli-Pekka Kestilä And are lisenced under LGPL accordin the agreement between copyright holder and Unversity of Helsinki. Parts made by others Copyright(C) University of Helsinki Following notice currently only concerns parts written by Veli-Pekka Kestilä. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Version:
1.0
Author:
vpk

Constructor Summary
FingerprintCache()
           
 
Method Summary
 boolean deleteFingerprint(int id)
          This method deletes the fingerprint marked by id from cache.
 FingerprintCacheData getNextFingerprint()
          This method is used to get fingerprints from the cache for comparison.
 void insertFingerprint(int id, com.griaule.grfingerjava.Template data)
          This method is for inserting single fingerprint.
 void loadCache(FingerprintCacheData[] data)
          This method (re)loads fingerprints in the cache.
 void resetIterator()
          This method resets cacheiterator back into the beginning when we start to look for a fingerprint.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FingerprintCache

public FingerprintCache()
Method Detail

insertFingerprint

public void insertFingerprint(int id,
                              com.griaule.grfingerjava.Template data)
This method is for inserting single fingerprint. It gets id for the fingerprint and Template object. We will use this to make new FingerprintCacheData object. Which is then inserted into cache. If cache isn't initialized yet we will create a new cache object.

Parameters:
id -
data -

deleteFingerprint

public boolean deleteFingerprint(int id)
This method deletes the fingerprint marked by id from cache.

Parameters:
id -

loadCache

public void loadCache(FingerprintCacheData[] data)
This method (re)loads fingerprints in the cache. If cache isn't empty it's emptied or if it's not initialized it's created. Vector is also sized according to how many fingerprints we are adding and also the initial size is added to the Vector size so that it will accomodate new fingerprints if needed.

Parameters:
data -

getNextFingerprint

public FingerprintCacheData getNextFingerprint()
This method is used to get fingerprints from the cache for comparison.

Returns:
FingerprintCacheData or null if we have gone trough all prints.

resetIterator

public void resetIterator()
This method resets cacheiterator back into the beginning when we start to look for a fingerprint.