gov.nasa.pds.tools.label
Class LabelValidator
java.lang.Object
gov.nasa.pds.tools.label.LabelValidator
public class LabelValidator
- extends Object
This class is responsible for providing utility functions for validating PDS
XML Labels.
- Author:
- pramirez
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCHEMA_CHECK
public static final String SCHEMA_CHECK
- See Also:
- Constant Field Values
SCHEMATRON_CHECK
public static final String SCHEMATRON_CHECK
- See Also:
- Constant Field Values
FILE_REF_CHECK
public static final String FILE_REF_CHECK
- See Also:
- Constant Field Values
externalValidators
public List<ExternalValidator> externalValidators
documentValidators
public List<DocumentValidator> documentValidators
LabelValidator
public LabelValidator()
setSchema
public void setSchema(String[] schemaFiles)
throws SAXException
- Throws:
SAXException
setSchematronFiles
public void setSchematronFiles(String[] schematronFiles)
setCatalogs
public void setCatalogs(String[] catalogFiles)
validate
public void validate(ExceptionContainer container,
File labelFile)
throws SAXException,
IOException,
ParserConfigurationException,
TransformerException
- Currently this method only validates the label against schema constraints
- Parameters:
container
- to store output messages inlabelFile
- to validate
- Throws:
SAXException
IOException
ParserConfigurationException
TransformerException
validate
public void validate(File labelFile)
throws SAXException,
IOException,
ParserConfigurationException,
TransformerException
- Throws:
SAXException
IOException
ParserConfigurationException
TransformerException
getModelVersion
public String getModelVersion()
setModelVersion
public void setModelVersion(String modelVersion)
throws ValidatorException
- Throws:
ValidatorException
performsSchemaValidation
public Boolean performsSchemaValidation()
setSchemaCheck
public void setSchemaCheck(Boolean value)
performsSchematronValidation
public Boolean performsSchematronValidation()
setSchematronCheck
public void setSchematronCheck(Boolean value)
getConfiguration
public Boolean getConfiguration(String key)
setConfiguration
public void setConfiguration(String key,
Boolean value)
addValidator
public void addValidator(ExternalValidator validator)
addValidator
public void addValidator(DocumentValidator validator)
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2010-2013 Planetary Data System. All Rights Reserved.