Interface EvidenceRecordValidatorFactory
- All Superinterfaces:
DocumentValidatorFactory
- All Known Implementing Classes:
XMLEvidenceRecordValidatorFactory
This interface defines the factory to create a
EvidenceRecordValidator
for
a given DSSDocument
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(DSSDocument document) This method instantiates aEvidenceRecordValidator
with the given documentstatic EvidenceRecordValidator
fromDocument
(DSSDocument document) Creates anEvidenceRecordValidator
by loading a corresponding implementation, acrossEvidenceRecordValidatorFactory
instances found by ServiceLoader.boolean
isSupported
(DSSDocument document) This method tests if the current implementation ofEvidenceRecordValidator
supports the given documentstatic boolean
isSupportedDocument
(DSSDocument document) Verifies if thedocument
is supported by one of the implementations, acrossEvidenceRecordValidatorFactory
instances found by ServiceLoader.
-
Method Details
-
isSupported
This method tests if the current implementation ofEvidenceRecordValidator
supports the given document- Specified by:
isSupported
in interfaceDocumentValidatorFactory
- Parameters:
document
- the document to be tested- Returns:
- true, if the
EvidenceRecordValidator
supports the given document
-
create
This method instantiates aEvidenceRecordValidator
with the given document- Specified by:
create
in interfaceDocumentValidatorFactory
- Parameters:
document
- the document to be used for theEvidenceRecordValidator
creation- Returns:
- an instance of
EvidenceRecordValidator
with the document
-
isSupportedDocument
Verifies if thedocument
is supported by one of the implementations, acrossEvidenceRecordValidatorFactory
instances found by ServiceLoader.- Parameters:
document
-DSSDocument
to verify- Returns:
- TRUE if the evidence record is supported by one of the found implementations, FALSE otherwise
-
fromDocument
static EvidenceRecordValidator fromDocument(DSSDocument document) throws UnsupportedOperationException Creates anEvidenceRecordValidator
by loading a corresponding implementation, acrossEvidenceRecordValidatorFactory
instances found by ServiceLoader.- Parameters:
document
-DSSDocument
to load validator for- Returns:
EvidenceRecordValidator
if corresponding implementation found- Throws:
UnsupportedOperationException
- is the document format is not supported or implementation is not found
-