Class WSILDocument

  • Direct Known Subclasses:
    WSILDocumentImpl

    public abstract class WSILDocument
    extends java.lang.Object
    Instance of a WS-Inspection document.
    Version:
    1.0
    Author:
    Peter Brittenham
    • Field Detail

      • docReader

        protected DocumentReader docReader
        Set default document reader.
      • docWriter

        protected DocumentWriter docWriter
        Set default document writer.
      • extRegistry

        protected ExtensionRegistry extRegistry
        WS-Inspection extension registry.
      • inspection

        protected Inspection inspection
        Inspection element.
      • documentURL

        protected java.lang.String documentURL
        WSIL document URL. NOTE: This field will not be set when the document is read from a Reader.
    • Constructor Detail

      • WSILDocument

        public WSILDocument()
    • Method Detail

      • createAbstract

        public abstract Abstract createAbstract()
        Create abstract element.
        Returns:
        Returns an abstract object.
      • createDescription

        public abstract Description createDescription()
        Create description element.
        Returns:
        Returns a description object.
      • createLink

        public abstract Link createLink()
        Create link element.
        Returns:
        Returns a link object.
      • createService

        public abstract Service createService()
        Create service element.
        Returns:
        Returns a service object.
      • createServiceName

        public abstract ServiceName createServiceName()
        Create service name element.
        Returns:
        Returns a serviceName object.
      • getExtensionRegistry

        public ExtensionRegistry getExtensionRegistry()
        Get the WS-Inspection extension registry implementation.
        Parameters:
        Returns - a reference to the extension registry.
      • getInspection

        public Inspection getInspection()
        Get the inspection element for this document.
        Returns:
        Returns a reference to the inspection element.
      • getReader

        public DocumentReader getReader()
        Get the WS-Inspection reader implementation.
        Returns:
        Returns the document reader.
      • getWriter

        public DocumentWriter getWriter()
        Get the WS-Inspection writer implementation.
        Returns:
        Returns the document writer.
      • main

        public static void main​(java.lang.String[] args)
        Read a WS-Inspection document and display its contents.
        Parameters:
        args - command line arguments
      • read

        public void read​(java.io.Reader reader)
                  throws WSILException
        Read the WS-Inspection document from a input reader.
        Parameters:
        reader - the input reader
        Throws:
        WSILException
      • read

        public void read​(java.lang.String urlString)
                  throws WSILException
        Read the WS-Inspection document from a file URL string.
        Parameters:
        urlString - the file URL string for the WS-Inspection document
        Throws:
        WSILException
      • read

        public void read​(java.net.URL url)
                  throws WSILException
        Read the WS-Inspection document from a location specified using a URL.
        Parameters:
        url - location of the document
        Throws:
        WSILException
      • setExtensionRegistry

        public void setExtensionRegistry​(ExtensionRegistry extRegistry)
                                  throws WSILException
        Set the WS-Inspection extension registry implementation.
        Parameters:
        extRegistry - the extension registry implementation
        Throws:
        WSILException
      • setReader

        public void setReader​(DocumentReader docReader)
        Set the WS-Inspection reader implementation.
        Parameters:
        docReader - the WS-Inpsection document reader
      • setWriter

        public void setWriter​(DocumentWriter docWriter)
        Set the WS-Inspection writer implementation.
        Parameters:
        docWriter - the WS-Inpsection document writer
      • toString

        public java.lang.String toString()
        Return string representation of this object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        Returns the string representation of this object.
      • write

        public void write​(java.io.Writer writer)
                   throws WSILException
        Write the WS-Inpsection document to an output writer.
        Parameters:
        writer - the output writer
        Throws:
        WSILException
      • write

        public void write​(java.lang.String filename)
                   throws WSILException
        Write the WS-Inspection document to an output file.
        Parameters:
        filename - the filename for the WS-Inspection document
        Throws:
        WSILException
      • resolveURL

        public java.lang.String resolveURL​(java.lang.String relativeURL)
        This method is used to resolve a relative URL into a full URL.
        Parameters:
        relativeURL - the relative URL value
        Returns:
        Returns the full URL.
      • setDocumentURL

        public void setDocumentURL​(java.lang.String documentURL)
        Set the location for the WS-Inspection document.
        Parameters:
        documentURL - the document URL