org.modeshape.sequencer.wsdl

## Class WsdlReader<T>

- java.lang.Object
- - org.modeshape.sequencer.sramp.AbstractResolvingReader
  - - org.modeshape.sequencer.wsdl.WsdlReader<T>

- Type Parameters:
    `T` - the type of object returned by the parser
  Direct Known Subclasses:
    Wsdl11Reader

      @NotThreadSafe
      public abstract class WsdlReader<T>
      extends AbstractResolvingReader

  A class that can parse WSDL definitions and derive a node structure from the content.

  This class is intended to be subclassed by supplying implementations for the `parse(org.xml.sax.InputSource)`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `baseUri` the URI of the document being read; never null or empty

    - ### Fields inherited from class org.modeshape.sequencer.sramp.AbstractResolvingReader

      `context, logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WsdlReader(Sequencer.Context context, String baseUri)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract T` | `parse(InputSource source)` Parse the supplied source (which contains either a `Reader` or an `InputStream`) and produce a representation of the WSDL definition.
    `protected abstract void` | `process(T parsedForm, Node outputNode, long sizeOfFile)` Process the supplied representation of the WSDL definition that was returned from the `parse(org.xml.sax.InputSource)` method and write the derived output content under the `outputNode`.
    `void` | `read(InputSource source, Node outputNode)` Read the document from the supplied stream, and produce the derived content.

    - ### Methods inherited from class org.modeshape.sequencer.sramp.AbstractResolvingReader

      `getContext, getResolvers, read, registerForSymbolSpace, registerNamespace, resolveReferences, setReference`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### baseUri

          protected final String baseUri

      the URI of the document being read; never null or empty

  - ### Constructor Detail

    - #### WsdlReader

          public WsdlReader(Sequencer.Context context,
                    String baseUri)

  - ### Method Detail

    - #### read

          public void read(InputSource source,
                  Node outputNode)
                    throws Exception

      Description copied from class: `AbstractResolvingReader`
      Read the document from the supplied stream, and produce the derived content.
      Specified by:
        `read` in class `AbstractResolvingReader`
      Parameters:
        `source` - the input source of the document; may not be null
        `outputNode` - the parent node at which the derived content should be written; may not be null
      Throws:
        `Exception` - if there is a problem reading the XSD content

    - #### parse

          protected abstract T parse(InputSource source)
                              throws Exception

      Parse the supplied source (which contains either a `Reader` or an `InputStream`) and produce a representation of the WSDL definition.
      Parameters:
        `source` - the source containing the WSDL stream; never null
      Returns:
        the WSDL definition representation; may not be null
      Throws:
        `Exception` - if there is a problem during parsing

    - #### process

          protected abstract void process(T parsedForm,
                     Node outputNode,
                     long sizeOfFile)
                                   throws Exception

      Process the supplied representation of the WSDL definition that was returned from the `parse(org.xml.sax.InputSource)` method and write the derived output content under the `outputNode`.
      Parameters:
        `parsedForm` - the representation of the WSDL definition, which will always be the value returned from `parse(org.xml.sax.InputSource)`
        `outputNode` - the `node` under which the derived content for the XSD should be written; may not be null
        `sizeOfFile` - the size of the WSDL stream, in bytes
      Throws:
        `Exception` - if there is a problem during processing

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.