Interface SchemaReader

  • All Known Implementing Classes:
    AbstractSchemaReader, SchemaReaderImpl

    public interface SchemaReader
    This interface describes a collection of methods that enable conversion of a SchemaImpl document (in XML, following the SchemaImpl parent described in the SchemaImpl specification) into a SchemaImpl model.
    Author:
    Nicolas Salatge - EBM WebSourcing
    • Method Detail

      • setFeature

        void setFeature​(SchemaReader.FeatureConstants name,
                        Object value)
                 throws IllegalArgumentException

        Sets the specified feature to the specified value.

        The minimum features that must be supported are:

        Minimal features to support
        Name Description Default Value
        org.ow2.easywsdl.schema.verbose If set to true, status messages will be displayed. type: boolean - default value: false
        org.ow2.easywsdl.schema.importDocuments If set to true, imported WSDL documents will be retrieved and processed. type: boolean - default value: true
        org.ow2.easywsdl.schema.pathDirectoryOfImportLocations If the location is set, imported WSDL documents will be retrieved at this location (Set the importDocuments Features at true). type: String

        All feature names must be fully-qualified, Java package style. All names starting with com.ebmwebsourcing. are reserved for features defined by the specification. It is recommended that implementation-specific features be fully-qualified to match the package name of that implementation. For example: com.abc.featureName

        Parameters:
        name - the name of the feature to be set.
        value - the value to set the feature to.
        Throws:
        IllegalArgumentException - if the feature name is not recognized.
        See Also:
        getFeature(FeatureConstants)
      • read

        Schema read​(URL schemaURL)
             throws SchemaException,
                    URISyntaxException,
                    IOException

        Read the XMLSchema definition available at the location identified by the specified URL, and bind it into a Schema object.

        Note: all relative URIs are resolved according to the specified URL.

        Parameters:
        schemaURL - an URL pointing to a XMLSchema definition.
        Returns:
        the Schema definition.
        Throws:
        SchemaException - An error occurs during the parsing or the binding of the XMLSchema
        URISyntaxException - If the URL is not formatted strictly according to to RFC2396 and cannot be converted to a URI.
        IOException - An I/O error occurs openning the URL stream.
      • read

        Schema read​(Document document)
             throws SchemaException

        Read the XMLSchema definition accessible via the specified DOM Document, and bind it into a Schema object.

        Note: To be able to resolve relative URIs, the Document base URI must be set.

        Parameters:
        document - a DOM Document pointing to a XMLSchema definition.
        Returns:
        the Schema definition.
        Throws:
        SchemaException - An error occurs during the parsing or the binding of the XMLSchema
      • setDocumentBaseURI

        void setDocumentBaseURI​(URI documentBaseURI)
        Set the document base URI of the reader to be able to resolve imported parts.
        Parameters:
        documentBaseURI -
      • getDocumentBaseURI

        URI getDocumentBaseURI()
        Get the document base URI of the reader.
        Returns:
        The document base URI.