Class DefaultURIResolver
java.lang.Object
org.apache.ws.commons.schema.resolver.DefaultURIResolver
- All Implemented Interfaces:
CollectionURIResolver,URIResolver
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the base URI derived from a schema collection.protected URLgetFileURL(URL contextURL, String path) Method getFileURLprotected URLThis is essentially a call to "new URL(contextURL, spec)" with extra handling in case spec is a file.protected booleanisAbsolute(String uri) Find whether a given uri is relative or notresolveEntity(String namespace, String schemaLocation, String baseUri) Try to resolve a schema location to some data.voidsetCollectionBaseURI(String collectionBaseURI) set the collection base URI, which serves as a fallback from the base of the immediate schema.
-
Field Details
-
collectionBaseURI
-
-
Constructor Details
-
DefaultURIResolver
public DefaultURIResolver()
-
-
Method Details
-
resolveEntity
Try to resolve a schema location to some data.- Specified by:
resolveEntityin interfaceURIResolver- Parameters:
namespace- target namespace.schemaLocation- system ID.baseUri- base URI for the schema.
-
isAbsolute
Find whether a given uri is relative or not- Parameters:
uri-- Returns:
- boolean
-
getURL
This is essentially a call to "new URL(contextURL, spec)" with extra handling in case spec is a file.- Parameters:
contextURL-spec-- Throws:
IOException
-
getFileURL
Method getFileURL- Parameters:
contextURL-path-- Throws:
IOException
-
getCollectionBaseURI
Get the base URI derived from a schema collection. It serves as a fallback from the specified base.- Specified by:
getCollectionBaseURIin interfaceCollectionURIResolver- Returns:
- URI
-
setCollectionBaseURI
set the collection base URI, which serves as a fallback from the base of the immediate schema.- Specified by:
setCollectionBaseURIin interfaceCollectionURIResolver- Parameters:
collectionBaseURI- the URI.
-