- java.lang.Object
-
- org.eclipse.persistence.sdo.helper.SchemaResolverWrapper
-
public class SchemaResolverWrapper extends Object
Purpose: Allow the contained schema resolver to resolve a schema based on a given namespace and schema location, and return either the resolved schema source or null, depending on whether the schema had been processed previously.
Responsibilities:
- Allow the contained schema resolver to return the referenced Schema given the source schema and namespace and schemaLocation values from an import or include
- Keep track of previously processed schemas to avoid multiple processing and infinite looping
- See Also:
SchemaResolver
,DefaultSchemaResolver
-
-
Constructor Summary
Constructors Constructor Description SchemaResolverWrapper(SchemaResolver resolver)
This constructor sets schemaResolver to the given value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemaResolver
getSchemaResolver()
Return the SchemaResolver for this wrapper instance.Source
resolveSchema(String systemId)
Source
resolveSchema(String publicId, String systemId)
Source
resolveSchema(Source sourceXSD)
Resolve the Source if only a system ID is specified.Source
resolveSchema(Source sourceXSD, String namespace, String schemaLocation)
Allow the SchemaResolver implementation to attempt to return the referenced Schema based on given source schema, namespace and schemaLocation values from an import or include.
-
-
-
Constructor Detail
-
SchemaResolverWrapper
public SchemaResolverWrapper(SchemaResolver resolver)
This constructor sets schemaResolver to the given value.- Parameters:
resolver
- the SchemaResolver implementation that will be used to resolve imports/includes from a give source schema.
-
-
Method Detail
-
resolveSchema
public Source resolveSchema(Source sourceXSD)
Resolve the Source if only a system ID is specified.
-
resolveSchema
public Source resolveSchema(Source sourceXSD, String namespace, String schemaLocation)
Allow the SchemaResolver implementation to attempt to return the referenced Schema based on given source schema, namespace and schemaLocation values from an import or include. If the resolver fails, this method will attempt to resolve the schema- 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
-
getSchemaResolver
public SchemaResolver getSchemaResolver()
Return the SchemaResolver for this wrapper instance.- Returns:
-
-