Class SchemaBuilder

java.lang.Object
org.apache.ws.commons.schema.SchemaBuilder

public class SchemaBuilder extends Object
Object used to build a schema from a schema document. This object includes a cache of previously resolved schema documents. This cache might be useful when an application has multiple webservices that each have WSDL documents that import the same schema, for example. On app startup, we may wish to cache XmlSchema objects so we don't build up the schema graph multiple times. key - use a combination of thread id and all three parameters passed to resolveXmlSchema to give minimal thread safety value - XmlSchema object wrapped in a SoftReference to encourage GC in low memory situations. CAUTION: XmlSchema objects are not likely to be thread-safe. This cache should only be used, then cleared, by callers aware of its existence. It is VERY important that users of this cache call clearCache() after they are done. Usage of the cache is controlled by calling initCache() which will initialize resolvedSchemas to non-null. Clearing of cache is done by calling clearCache() which will clear and nullify resolvedSchemas