net.sf.basedb.util.fileset
Class SingleFileValidationAction
java.lang.Object
net.sf.basedb.util.fileset.SingleFileValidationAction
- All Implemented Interfaces:
- Action, ValidationAction
- Direct Known Subclasses:
- CdfValidationAction, CelValidationAction, GtfValidationAction
public abstract class SingleFileValidationAction
- extends Object
- implements ValidationAction
Base class for validators that works on single files
of a known data file type. The external if of the
file type should be specified in the constructor.
- Since:
- 3.0
- Author:
- Nicklas
- Last modified
- $Date: 2011-05-06 14:09:13 +0200 (Fri, 06 May 2011) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fileTypeId
private final String fileTypeId
acceptedFile
private FileSetMember acceptedFile
SingleFileValidationAction
protected SingleFileValidationAction(String fileTypeId)
- Create a new instance.
- Parameters:
fileTypeId
- The external if of the DataFileType
that this validator supports
acceptFile
public Accept acceptFile(FileSetMember member)
- If the file has a file type matching the id given in the constructor
it is accepted for immediate validation.
- Specified by:
acceptFile
in interface ValidationAction
- Parameters:
member
- A member of the current file set
- Returns:
Accept.VALIDATE_IMMEDIATELY
or null
getAcceptedFile
protected FileSetMember getAcceptedFile()
- Get the file that was last accepted by the
acceptFile(FileSetMember)
method.
- Returns:
- A file set member object, or null if the last file was not accepted