Package com.networknt.schema.resource
Class AllowSchemaLoader
- java.lang.Object
-
- com.networknt.schema.resource.AllowSchemaLoader
-
- All Implemented Interfaces:
SchemaLoader
public class AllowSchemaLoader extends Object implements SchemaLoader
SchemaLoader
that allows loading external resources.
-
-
Constructor Summary
Constructors Constructor Description AllowSchemaLoader(Predicate<AbsoluteIri> allowed)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamSource
getSchema(AbsoluteIri absoluteIri)
Loads a schema given the retrieval IRI.
-
-
-
Constructor Detail
-
AllowSchemaLoader
public AllowSchemaLoader(Predicate<AbsoluteIri> allowed)
Constructor.- Parameters:
allowed
- the predicate to determine which external resource is allowed to be loaded
-
-
Method Detail
-
getSchema
public InputStreamSource getSchema(AbsoluteIri absoluteIri)
Description copied from interface:SchemaLoader
Loads a schema given the retrieval IRI.- Specified by:
getSchema
in interfaceSchemaLoader
- Parameters:
absoluteIri
- the retrieval IRI- Returns:
- the input stream source
-
-