Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.sdo.helper
Class SchemaResolverWrapper

java.lang.Object
  extended by org.eclipse.persistence.sdo.helper.SchemaResolverWrapper


public class SchemaResolverWrapper
extends java.lang.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:

See Also:
SchemaResolver, DefaultSchemaResolver

Field Summary
private  SchemaResolver schemaResolver
           
private  java.util.List<java.lang.String> systemIdList
           

 

Constructor Summary
SchemaResolverWrapper(SchemaResolver resolver)
          This constructor sets schemaResolver to the given value.

 

Method Summary
private  boolean addSchemaToList(java.lang.String systemId)
          Add the given SystemId to the list of processed schemas, if it isn't already in the list.
 SchemaResolver getSchemaResolver()
          Return the SchemaResolver for this wrapper instance.
 javax.xml.transform.Source resolveSchema(javax.xml.transform.Source sourceXSD)
          Resolve the Source if only a system ID is specified.
 javax.xml.transform.Source resolveSchema(javax.xml.transform.Source sourceXSD, java.lang.String namespace, java.lang.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.
 javax.xml.transform.Source resolveSchema(java.lang.String systemId)
           
 javax.xml.transform.Source resolveSchema(java.lang.String publicId, java.lang.String systemId)
           
private  boolean shouldProcessSchema(java.lang.String systemId)
          Indicates if the schema represented by the given systemId (schema URL string) should be processed.

 

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

 

Field Detail

schemaResolver

private SchemaResolver schemaResolver

systemIdList

private java.util.List<java.lang.String> systemIdList

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 javax.xml.transform.Source resolveSchema(javax.xml.transform.Source sourceXSD)
Resolve the Source if only a system ID is specified.

resolveSchema

public javax.xml.transform.Source resolveSchema(javax.xml.transform.Source sourceXSD,
                                                java.lang.String namespace,
                                                java.lang.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 schema
namespace - The namespace portion of the import/include
schemaLocation - The schemaLocation portion of the import/include
Returns:
Source for the referenced Schema or null if processing the referenced schema should be skipped

resolveSchema

public javax.xml.transform.Source resolveSchema(java.lang.String systemId)

resolveSchema

public javax.xml.transform.Source resolveSchema(java.lang.String publicId,
                                                java.lang.String systemId)

shouldProcessSchema

private boolean shouldProcessSchema(java.lang.String systemId)
Indicates if the schema represented by the given systemId (schema URL string) should be processed. If systemId exists in the list, it should not be processed; otherwise, it will be added to the list and true returned to indicate processing is required.
Parameters:
systemId - a String that conforms to the URI syntax
Returns:
true if systemId is null or does not exist in the list of previously processed schemas, false otherwise

addSchemaToList

private boolean addSchemaToList(java.lang.String systemId)
Add the given SystemId to the list of processed schemas, if it isn't already in the list.
Parameters:
systemId - a String that conforms to the URI syntax
Returns:
true if systemId was added to the list (hence the associated schema should be processed), false if the id was not added to the list or systemId is null.

getSchemaResolver

public SchemaResolver getSchemaResolver()
Return the SchemaResolver for this wrapper instance.
Returns:

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.