Package ome.specification
Class OmeValidator
java.lang.Object
ome.specification.OmeValidator
Provides methods to validate OME instance documents against
- Since:
- Beta4.4
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisValidFile(File file, File schema) Validate the specified filebooleanisValidFile(File file, StreamSource[] schemaStreamArray) Validate the specified fileParses the specified file and returns the document.Parses the specified file and returns the document.parseFileWithStreamArray(File file, StreamSource[] schemaStreamArray) Parses the specified file and returns the document.parseFileWithStreamArrayToSdtErr(File file, StreamSource[] schemaStreamArray) Parses the specified file and returns the document.voidvalidateFile(File file, File schema) voidvalidateFile(File file, StreamSource[] schemaStreamArray) Validate the specified file Any validation errors thrown as an exception.voidvalidateFileToStdError(File file, StreamSource[] schemaStreamArray) Validate the specified file Any validation errors are sent to StdErr, not thrown as an exception.
-
Field Details
-
JAXP_SCHEMA_LANGUAGE
Path the schema language.- See Also:
-
W3C_XML_SCHEMA
W3C.- See Also:
-
JAXP_SCHEMA_SOURCE
The source.- See Also:
-
-
Constructor Details
-
OmeValidator
public OmeValidator()
-
-
Method Details
-
isValidFile
Validate the specified file- Parameters:
file- The file to parse.schema- The schema used to validate the specified file.- Returns:
- true if no errors
-
isValidFile
Validate the specified file- Parameters:
file- The file to parse.schemaStreamArray- The schema as array of stream sources used to validate the specified file.- Returns:
- true if no errors
-
validateFile
Validate the specified file Any validation errors thrown as an exception.- Parameters:
file- The file to parse.schemaStreamArray- The schema as array of stream sources used to validate the specified file.- Throws:
Exception- Thrown if an error occurred.
-
validateFile
- Throws:
Exception
-
validateFileToStdError
Validate the specified file Any validation errors are sent to StdErr, not thrown as an exception.- Parameters:
file- The file to parse.schemaStreamArray- The schema as array of stream sources used to validate the specified file.- Throws:
Exception- Thrown if other (NON-VALIDATION) errors occurred.
-
parseFile
Parses the specified file and returns the document.- Parameters:
file- The file to parse.- Returns:
- Document
- Throws:
Exception- Thrown if an error occurred.
-
parseFile
Parses the specified file and returns the document.- Parameters:
file- The file to parse.schema- The schema used to validate the specified file.- Returns:
- Document
- Throws:
Exception- Thrown if an error occurred.
-
parseFileWithStreamArray
public Document parseFileWithStreamArray(File file, StreamSource[] schemaStreamArray) throws Exception Parses the specified file and returns the document. Any validation errors are thrown as an exception.- Parameters:
file- The file to parse.schemaStreamArray- The schema as array of stream sources used to validate the specified file.- Returns:
- Document
- Throws:
Exception- Thrown if an error occurred.
-
parseFileWithStreamArrayToSdtErr
public Document parseFileWithStreamArrayToSdtErr(File file, StreamSource[] schemaStreamArray) throws Exception Parses the specified file and returns the document. Any validation errors are sent to StdErr, not thrown as an exception.- Parameters:
file- The file to parse.schemaStreamArray- The schema as array of stream sources used to validate the specified file.- Returns:
- Document
- Throws:
Exception- Thrown if other (NON-VALIDATION) errors occurred.
-