Package com.networknt.schema
Class SchemaLocation.Builder
- java.lang.Object
-
- com.networknt.schema.SchemaLocation.Builder
-
- Enclosing class:
- SchemaLocation
public static class SchemaLocation.Builder extends java.lang.Object
Builder for buildingSchemaLocation
.
-
-
Field Summary
Fields Modifier and Type Field Description private AbsoluteIri
absoluteIri
private JsonNodePath
fragment
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SchemaLocation.Builder
absoluteIri(AbsoluteIri absoluteIri)
Sets the canonical absolute IRI of the schema object.protected SchemaLocation.Builder
absoluteIri(java.lang.String absoluteIri)
Sets the canonical absolute IRI of the schema object.SchemaLocation
build()
Builds aSchemaLocation
.protected SchemaLocation.Builder
fragment(JsonNodePath fragment)
Sets the fragment.protected SchemaLocation.Builder
fragment(java.lang.String fragment)
Sets the fragment.
-
-
-
Field Detail
-
absoluteIri
private AbsoluteIri absoluteIri
-
fragment
private JsonNodePath fragment
-
-
Method Detail
-
absoluteIri
protected SchemaLocation.Builder absoluteIri(AbsoluteIri absoluteIri)
Sets the canonical absolute IRI of the schema object.This is a unique identifier indicated by the $id property or id property in Draft 4 and earlier. This does not have to be network accessible.
- Parameters:
absoluteIri
- the canonical IRI of the schema object- Returns:
- the builder
-
absoluteIri
protected SchemaLocation.Builder absoluteIri(java.lang.String absoluteIri)
Sets the canonical absolute IRI of the schema object.This is a unique identifier indicated by the $id property or id property in Draft 4 and earlier. This does not have to be network accessible.
- Parameters:
absoluteIri
- the canonical IRI of the schema object- Returns:
- the builder
-
fragment
protected SchemaLocation.Builder fragment(JsonNodePath fragment)
Sets the fragment.- Parameters:
fragment
- the fragment- Returns:
- the builder
-
fragment
protected SchemaLocation.Builder fragment(java.lang.String fragment)
Sets the fragment.- Parameters:
fragment
- the fragment- Returns:
- the builder
-
build
public SchemaLocation build()
Builds aSchemaLocation
.- Returns:
- the schema location
-
-