Class BiopaxValidatorClient

java.lang.Object
org.biopax.paxtools.client.BiopaxValidatorClient

public class BiopaxValidatorClient extends Object
Simple (example) BioPAX Validator client to upload and check BioPAX OWL files.
Author:
rodche
  • Field Details

    • DEFAULT_VALIDATOR_URL

      public static final String DEFAULT_VALIDATOR_URL
      Default BioPAX Validator's URL
      See Also:
    • JVM_PROPERTY_URL

      public static final String 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

      public BiopaxValidatorClient(String url)
      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 name
      retFormat - xml, html, or owl (no errors, just modified owl, if autofix=true)
      filterBy - filter validation issues by the error/warning level
      maxErrs - 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 URL
      biopaxFiles - an array of BioPAX files to validate
      out - validation report data output stream
      Throws:
      IOException - when there is an I/O error
    • setUrl

      public void setUrl(String url)
    • getUrl

      public String 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