Package com.networknt.schema.annotation
Class Annotation
java.lang.Object
com.networknt.schema.annotation.Annotation
The annotation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAnnotation(String keyword, NodePath instanceLocation, SchemaLocation schemaLocation, NodePath evaluationPath, Object value) -
Method Summary
Modifier and TypeMethodDescriptionstatic Annotation.Builderbuilder()booleanThe evaluation path, indicating how reference keywords such as "$ref" were followed to reach the absolute schema location.The instance location to which it is attached, as a JSON Pointer.The keyword that produces the annotation.The schema location of the attaching keyword, as a IRI and JSON Pointer fragment.<T> TgetValue()The attached value(s).inthashCode()booleanisValid()voidsetValid(boolean valid) toString()
-
Constructor Details
-
Annotation
public Annotation(String keyword, NodePath instanceLocation, SchemaLocation schemaLocation, NodePath evaluationPath, Object value)
-
-
Method Details
-
getKeyword
The keyword that produces the annotation.- Returns:
- the keyword
-
getInstanceLocation
The instance location to which it is attached, as a JSON Pointer.- Returns:
- the instance location
-
getSchemaLocation
The schema location of the attaching keyword, as a IRI and JSON Pointer fragment.- Returns:
- the schema location
-
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
-
isValid
public boolean isValid() -
setValid
public void setValid(boolean valid) -
toString
-
hashCode
public int hashCode() -
equals
-
builder
-