Object SchemaClient.Companion
-
- All Implemented Interfaces:
public class SchemaClient.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static SchemaClient.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final static SchemaClientcreateDefaultInstance(Map<URI, String> additionalMappings)Returns a SchemaClient instance which is used by default by SchemaLoader (unless it overwritten by passing an other instance to SchemaLoaderConfig.schemaClient). -
-
Method Detail
-
createDefaultInstance
final static SchemaClient createDefaultInstance(Map<URI, String> additionalMappings)
Returns a SchemaClient instance which is used by default by SchemaLoader (unless it overwritten by passing an other instance to SchemaLoaderConfig.schemaClient).
Directly calling this method can be useful in cases when a custom SchemaClient implementation is necessary, but it has to use this default instance as a fallback mechanism in some scenario.
The returned value (as of now) is a chain of
SchemaClients with fallbacks, as:the first in chain is aMemoizingSchemaClient (to avoid duplicate lookups)
the second is a PrepopulatedSchemaClient (additionalMappings are passed to it)
the third is a ClassPathAwareSchemaClient, which is used to query schema documents from the classpath
the last an URLQueryingSchemaClient which, if no previous lookup succeeded, converts the URI into URL, and performs an actual network call.
-
-
-
-