Package com.networknt.schema.resource
Class SchemaIdResolvers.Builder
java.lang.Object
com.networknt.schema.resource.SchemaIdResolvers.Builder
- Enclosing class:
SchemaIdResolvers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(SchemaIdResolver schemaIdResolver) Adds a schema mapper.build()Builds aSchemaIdResolversSets the function that maps the IRI to another IRI.Sets the function that maps the IRI to another IRI if the predicate is true.Sets the mappings.Maps a schema given a source prefix with a replacement.values(Consumer<List<SchemaIdResolver>> customizer) Customize the schema id resolvers.with(SchemaIdResolvers.Builder builder)
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
with
-
values
Customize the schema id resolvers.- Parameters:
customizer- the customizer- Returns:
- the builder
-
add
Adds a schema mapper.- Parameters:
schemaIdResolver- the schema mapper- Returns:
- the builder
-
mapPrefix
Maps a schema given a source prefix with a replacement.- Parameters:
source- the source prefixreplacement- the replacement prefix- Returns:
- the builder
-
mappings
Sets the mappings.- Parameters:
mappings- the mappings- Returns:
- the builder
-
mappings
Sets the function that maps the IRI to another IRI.- Parameters:
mappings- the mappings- Returns:
- the builder
-
mappings
Sets the function that maps the IRI to another IRI if the predicate is true.- Parameters:
test- the predicatemappings- the mappings- Returns:
- the builder
-
build
Builds aSchemaIdResolvers- Returns:
- the schema mappers
-