Class WSILDocument

java.lang.Object
org.apache.wsil.WSILDocument
Direct Known Subclasses:
WSILDocumentImpl

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

    • 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 String documentURL
      WSIL document URL. NOTE: This field will not be set when the document is read from a Reader.
  • Constructor Details

    • WSILDocument

      public WSILDocument()
  • Method Details

    • 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(String[] args)
      Read a WS-Inspection document and display its contents.
      Parameters:
      args - command line arguments
    • newInstance

      public static WSILDocument newInstance() throws WSILException
      Throws:
      WSILException
    • read

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

      public void read(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(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 String toString()
      Return string representation of this object.
      Overrides:
      toString in class Object
      Returns:
      Returns the string representation of this object.
    • write

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

      public void write(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 String resolveURL(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(String documentURL)
      Set the location for the WS-Inspection document.
      Parameters:
      documentURL - the document URL