Package com.networknt.schema.resource
Class MapSchemaIdResolver
java.lang.Object
com.networknt.schema.resource.MapSchemaIdResolver
- All Implemented Interfaces:
SchemaIdResolver
Map implementation of
SchemaIdResolver.-
Constructor Summary
ConstructorsConstructorDescriptionMapSchemaIdResolver(Function<String, String> mappings) Apply the mapping function if the predicate is true.MapSchemaIdResolver(Map<String, String> mappings) -
Method Summary
Modifier and TypeMethodDescriptionresolve(AbsoluteIri absoluteIRI) Resolves a schema $id indicated by an absolute IRI to a retrieval IRI.
-
Constructor Details
-
MapSchemaIdResolver
-
MapSchemaIdResolver
-
MapSchemaIdResolver
Apply the mapping function if the predicate is true.- Parameters:
test- the predicatemappings- the mapping
-
-
Method Details
-
resolve
Description copied from interface:SchemaIdResolverResolves a schema $id indicated by an absolute IRI to a retrieval IRI.- Specified by:
resolvein interfaceSchemaIdResolver- Parameters:
absoluteIRI- the $id of the schema- Returns:
- the retrieval IRI or null if this resolver doesn't support the mapping
-