Package org.biopax.paxtools.client
Class BiopaxValidatorClient
java.lang.Object
org.biopax.paxtools.client.BiopaxValidatorClient
Simple (example) BioPAX Validator client
to upload and check BioPAX OWL files.
- Author:
- rodche
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor It configures for the default validator URL.Main Constructor It configures for the validator's URL (defined by DEFAULT_VALIDATOR_URL constant) and result format (). -
Method Summary
Modifier and TypeMethodDescriptiongetUrl()voidstatic org.biopax.validator.jaxb.ValidatorResponseConverts a biopax-validator XML response to the java object.voidvalidate(boolean autofix, String profile, BiopaxValidatorClient.RetFormat retFormat, org.biopax.validator.jaxb.Behavior filterBy, Integer maxErrs, String biopaxUrl, File[] biopaxFiles, OutputStream out) Checks a BioPAX OWL file(s) or resource using the online BioPAX Validator and prints the results to the output stream.
-
Field Details
-
DEFAULT_VALIDATOR_URL
Default BioPAX Validator's URL- See Also:
-
JVM_PROPERTY_URL
The Java Option to set a BioPAX Validator URL (if set, overrides the default and URL provided by the Constructor arg.)- See Also:
-
-
Constructor Details
-
BiopaxValidatorClient
Main Constructor It configures for the validator's URL (defined by DEFAULT_VALIDATOR_URL constant) and result format ().- Parameters:
url- - validator's file-upload form address
-
BiopaxValidatorClient
public BiopaxValidatorClient()Default Constructor It configures for the default validator URL.
-
-
Method Details
-
validate
public void validate(boolean autofix, String profile, BiopaxValidatorClient.RetFormat retFormat, org.biopax.validator.jaxb.Behavior filterBy, Integer maxErrs, String biopaxUrl, File[] biopaxFiles, OutputStream out) throws IOException Checks a BioPAX OWL file(s) or resource using the online BioPAX Validator and prints the results to the output stream.- Parameters:
autofix- true/false (experimental)profile- validation profile nameretFormat- xml, html, or owl (no errors, just modified owl, if autofix=true)filterBy- filter validation issues by the error/warning levelmaxErrs- errors threshold - max no. critical errors to collect before quitting (warnings not counted; null/0/negative value means unlimited)biopaxUrl- check the BioPAX at the URLbiopaxFiles- an array of BioPAX files to validateout- validation report data output stream- Throws:
IOException- when there is an I/O error
-
setUrl
-
getUrl
-
unmarshal
public static org.biopax.validator.jaxb.ValidatorResponse unmarshal(String xml) throws JAXBException Converts a biopax-validator XML response to the java object.- Parameters:
xml- input XML data - validation report - to import- Returns:
- validation report object
- Throws:
JAXBException- when there is an JAXB unmarshalling error
-