Package com.networknt.schema.annotation
Class JsonNodeAnnotation
- java.lang.Object
-
- com.networknt.schema.annotation.JsonNodeAnnotation
-
public class JsonNodeAnnotation extends java.lang.Object
The annotation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonNodeAnnotation.Builder
-
Field Summary
Fields Modifier and Type Field Description private JsonNodePath
evaluationPath
private JsonNodePath
instanceLocation
private java.lang.String
keyword
private SchemaLocation
schemaLocation
private java.lang.Object
value
-
Constructor Summary
Constructors Constructor Description JsonNodeAnnotation(java.lang.String keyword, JsonNodePath instanceLocation, SchemaLocation schemaLocation, JsonNodePath evaluationPath, java.lang.Object value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonNodeAnnotation.Builder
builder()
boolean
equals(java.lang.Object obj)
JsonNodePath
getEvaluationPath()
The evaluation path, indicating how reference keywords such as "$ref" were followed to reach the absolute schema location.JsonNodePath
getInstanceLocation()
The instance location to which it is attached, as a JSON Pointer.java.lang.String
getKeyword()
The keyword that produces the annotation.SchemaLocation
getSchemaLocation()
The schema location of the attaching keyword, as a IRI and JSON Pointer fragment.<T> T
getValue()
The attached value(s).int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
keyword
private final java.lang.String keyword
-
instanceLocation
private final JsonNodePath instanceLocation
-
schemaLocation
private final SchemaLocation schemaLocation
-
evaluationPath
private final JsonNodePath evaluationPath
-
value
private final java.lang.Object value
-
-
Constructor Detail
-
JsonNodeAnnotation
public JsonNodeAnnotation(java.lang.String keyword, JsonNodePath instanceLocation, SchemaLocation schemaLocation, JsonNodePath evaluationPath, java.lang.Object value)
-
-
Method Detail
-
getKeyword
public java.lang.String getKeyword()
The keyword that produces the annotation.- Returns:
- the keyword
-
getInstanceLocation
public JsonNodePath getInstanceLocation()
The instance location to which it is attached, as a JSON Pointer.- Returns:
- the instance location
-
getSchemaLocation
public SchemaLocation getSchemaLocation()
The schema location of the attaching keyword, as a IRI and JSON Pointer fragment.- Returns:
- the schema location
-
getEvaluationPath
public JsonNodePath getEvaluationPath()
The evaluation path, indicating how reference keywords such as "$ref" were followed to reach the absolute schema location.- Returns:
- the evaluation path
-
getValue
public <T> T getValue()
The attached value(s).- Type Parameters:
T
- the value type- Returns:
- the value
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
builder
public static JsonNodeAnnotation.Builder builder()
-
-