Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ws.commons.schema.resolver
Class DefaultURIResolver

    java.lang.Object
      org.apache.ws.commons.schema.resolver.DefaultURIResolver

All Implemented Interfaces:
  CollectionURIResolver, URIResolver

    public class DefaultURIResolver

extends java.lang.Object
implements CollectionURIResolver

This resolver provides the means of resolving the imports and includes of a given schema document. The system will call this default resolver if there is no other resolver present in the system.

Constructor Summary
`DefaultURIResolver()`

Method Summary
`java.lang.String` | `getCollectionBaseURI()` Get the base URI derived from a schema collection.
`protected java.net.URL` | `getFileURL(java.net.URL contextURL, java.lang.String path)` Method getFileURL
`protected java.net.URL` | `getURL(java.net.URL contextURL, java.lang.String spec)` This is essentially a call to "new URL(contextURL, spec)" with extra handling in case spec is a file.
`protected boolean` | `isAbsolute(java.lang.String uri)` Find whether a given uri is relative or not
`org.xml.sax.InputSource` | `resolveEntity(java.lang.String namespace, java.lang.String schemaLocation, java.lang.String baseUri)` Try to resolve a schema location to some data.
`void` | `setCollectionBaseURI(java.lang.String collectionBaseURI)` set the collection base URI, which serves as a fallback from the base of the immediate schema.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultURIResolver

    public DefaultURIResolver()

Method Detail

### resolveEntity

    public org.xml.sax.InputSource resolveEntity(java.lang.String namespace,
                                                 java.lang.String schemaLocation,
                                                 java.lang.String baseUri)

  Try to resolve a schema location to some data.

  Specified by:
    `resolveEntity` in interface `URIResolver`
  Parameters:
    `namespace` - targt namespace.
    `schemaLocation` - system ID.
    `baseUri` - base URI for the schema.

### isAbsolute

    protected boolean isAbsolute(java.lang.String uri)

  Find whether a given uri is relative or not

  Parameters:
    `uri` -
  Returns:
    boolean

### getURL

    protected java.net.URL getURL(java.net.URL contextURL,
                                  java.lang.String spec)
                           throws java.io.IOException

  This is essentially a call to "new URL(contextURL, spec)" with extra handling in case spec is a file.

  Parameters:
    `contextURL` -
    `spec` -
  Throws:
    `java.io.IOException`

### getFileURL

    protected java.net.URL getFileURL(java.net.URL contextURL,
                                      java.lang.String path)
                               throws java.io.IOException

  Method getFileURL

  Parameters:
    `contextURL` -
    `path` -
  Throws:
    `java.io.IOException`

### getCollectionBaseURI

    public java.lang.String getCollectionBaseURI()

  Get the base URI derived from a schema collection. It serves as a fallback from the specified base.

  Specified by:
    `getCollectionBaseURI` in interface `CollectionURIResolver`
  Returns:
    URI

### setCollectionBaseURI

    public void setCollectionBaseURI(java.lang.String collectionBaseURI)

  set the collection base URI, which serves as a fallback from the base of the immediate schema.

  Specified by:
    `setCollectionBaseURI` in interface `CollectionURIResolver`
  Parameters:
    `collectionBaseURI` - the URI.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.