Package com.networknt.schema.resource
Class AllowSchemaLoader
- java.lang.Object
-
- com.networknt.schema.resource.AllowSchemaLoader
-
- All Implemented Interfaces:
SchemaLoader
public class AllowSchemaLoader extends java.lang.Object implements SchemaLoader
SchemaLoaderthat allows loading external resources.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Predicate<AbsoluteIri>allowed
-
Constructor Summary
Constructors Constructor Description AllowSchemaLoader(java.util.function.Predicate<AbsoluteIri> allowed)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamSourcegetSchema(AbsoluteIri absoluteIri)Loads a schema given the retrieval IRI.
-
-
-
Field Detail
-
allowed
private final java.util.function.Predicate<AbsoluteIri> allowed
-
-
Constructor Detail
-
AllowSchemaLoader
public AllowSchemaLoader(java.util.function.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:SchemaLoaderLoads a schema given the retrieval IRI.- Specified by:
getSchemain interfaceSchemaLoader- Parameters:
absoluteIri- the retrieval IRI- Returns:
- the input stream source
-
-