Module org.eclipse.persistence.sdo
Class DefaultSchemaResolver
java.lang.Object
org.eclipse.persistence.sdo.helper.DefaultSchemaResolver
- All Implemented Interfaces:
SchemaResolver
,EntityResolver
Purpose: Default implementation of the org.eclipse.persistence.sdo.helper.SchemaResolver interface
Responsibilities:
- Given the source schema and namespace and schemaLocation values from an import or include return the referenced Schema
- If a baseSchemaLocation is set it will be prepended to all schemaLocations passed into the resovleSchema methods
- This implementation will try to open an Inputstream to a URL created from the schemaLocation and return a StreamSource based on that inputstream
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolveEntity
(String publicId, String systemId) Satisfy EntityResolver interface implementation.resolveSchema
(Source sourceXSD, String namespace, String schemaLocation) Given the source schema and namespace and schemaLocation values from an import or include return the referenced Schema.void
setBaseSchemaLocation
(String baseSchemaLocation) Optional baseSchemaLocation can be specified If set, all schemaLocations passed into the resolveSchema methods will be resolved against this base location according to the java.net.URI API
-
Constructor Details
-
DefaultSchemaResolver
public DefaultSchemaResolver()
-
-
Method Details
-
resolveSchema
Given the source schema and namespace and schemaLocation values from an import or include return the referenced Schema.- Specified by:
resolveSchema
in interfaceSchemaResolver
- Parameters:
sourceXSD
- The Source object of the source schemanamespace
- The namespace portion of the import/includeschemaLocation
- The schemaLocation portion of the import/include- Returns:
- Source for the referenced Schema or null if processing the referenced schema should be skipped
-
resolveEntity
Satisfy EntityResolver interface implementation. Allow resolution of external entities.- Specified by:
resolveEntity
in interfaceEntityResolver
- Parameters:
publicId
-systemId
-- Returns:
- null
-
setBaseSchemaLocation
Optional baseSchemaLocation can be specified If set, all schemaLocations passed into the resolveSchema methods will be resolved against this base location according to the java.net.URI API- Parameters:
baseSchemaLocation
- optional baseSchemaLocation
-
getBaseSchemaLocation
-