Package 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
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 (fr, 06 maj 2011) $
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
SingleFileValidationAction
(String fileTypeId) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionacceptFile
(FileSetMember member) If the file has a file type matching the id given in the constructor it is accepted for immediate validation.protected FileSetMember
Get the file that was last accepted by theacceptFile(FileSetMember)
method.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.basedb.util.fileset.ValidationAction
resetMetadata, validateAndExtractMetadata
-
Field Details
-
fileTypeId
-
acceptedFile
-
-
Constructor Details
-
SingleFileValidationAction
Create a new instance.- Parameters:
fileTypeId
- The external if of theDataFileType
that this validator supports
-
-
Method Details
-
acceptFile
If the file has a file type matching the id given in the constructor it is accepted for immediate validation.- Specified by:
acceptFile
in interfaceValidationAction
- Parameters:
member
- A member of the current file set- Returns:
Accept.VALIDATE_IMMEDIATELY
or null
-
getAcceptedFile
Get the file that was last accepted by theacceptFile(FileSetMember)
method.- Returns:
- A file set member object, or null if the last file was not accepted
-