1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package gov.nasa.pds.tools.label.validate;
17
18 import gov.nasa.pds.tools.label.ObjectStatement;
19 import gov.nasa.pds.tools.label.parser.InvalidDescriptionException;
20 import gov.nasa.pds.tools.label.parser.InvalidObjectException;
21 import gov.nasa.pds.tools.object.io.DataObjectInputStream;
22
23 /***
24 * @author pramirez
25 * @version $Revision: 2606 $
26 *
27 */
28 public interface DataObjectValidator {
29 /***
30 * Validates the bytes in the object against the decription in the {@link ObjectStatement}
31 * @param input bytes of the data object
32 * @param object The description of the object consists of a set of attribute statements
33 * @throws InvalidObjectException if there is a problem with the bytes in accordance with the description
34 * @throws InvalidDescriptionException if the description is insuffcient for the validation to take place
35 */
36 public void validate(DataObjectInputStream input, ObjectStatement object) throws InvalidObjectException, InvalidDescriptionException;
37
38 }