Class XsdStage

  • All Implemented Interfaces:
    Stage

    public abstract class XsdStage
    extends java.lang.Object
    implements Stage
    Validation stage for validating a document against a given XML schema.
    Since:
    3 Jun 2011
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected XsdStage​(java.lang.String topElNamespaceUri, java.lang.String topElName, boolean isMandatory, java.lang.String resourceDescription)
      Constructor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Returns a short one-line description of this stage.
      abstract java.net.URL getDocumentUrl​(uk.ac.starlink.vo.TapService tapService)
      Returns the URL of the document to validate, given the service URL for the TAP service.
      XsdValidation.Result getResult()
      Returns a token giving the result status last time this stage was run.
      void run​(Reporter reporter, uk.ac.starlink.vo.TapService tapService)
      Performs the validation checks for this stage.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XsdStage

        protected XsdStage​(java.lang.String topElNamespaceUri,
                           java.lang.String topElName,
                           boolean isMandatory,
                           java.lang.String resourceDescription)
        Constructor.
        Parameters:
        topElNamespaceUri - namespace of required document root element
        topElName - local name of required document root element
        isMandatory - true iff resource is REQUIRED by standard
        resourceDescription - short description of what resource contains
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Stage
        Returns a short one-line description of this stage.
        Specified by:
        getDescription in interface Stage
        Returns:
        description in imperative mood
      • getDocumentUrl

        public abstract java.net.URL getDocumentUrl​(uk.ac.starlink.vo.TapService tapService)
        Returns the URL of the document to validate, given the service URL for the TAP service.
        Parameters:
        tapService - TAP service description
        Returns:
        url of XML document to validate
      • run

        public void run​(Reporter reporter,
                        uk.ac.starlink.vo.TapService tapService)
        Description copied from interface: Stage
        Performs the validation checks for this stage.
        Specified by:
        run in interface Stage
        Parameters:
        reporter - destination for validation messages
        tapService - TAP service description
      • getResult

        public XsdValidation.Result getResult()
        Returns a token giving the result status last time this stage was run.
        Returns:
        validation result