Package com.networknt.schema.annotation
Class Annotation
- java.lang.Object
-
- com.networknt.schema.annotation.Annotation
-
public class Annotation extends Object
The annotation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnnotation.Builder
-
Constructor Summary
Constructors Constructor Description Annotation(String keyword, NodePath instanceLocation, SchemaLocation schemaLocation, NodePath evaluationPath, Object value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Annotation.Builderbuilder()booleanequals(Object obj)NodePathgetEvaluationPath()The evaluation path, indicating how reference keywords such as "$ref" were followed to reach the absolute schema location.NodePathgetInstanceLocation()The instance location to which it is attached, as a JSON Pointer.StringgetKeyword()The keyword that produces the annotation.SchemaLocationgetSchemaLocation()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)StringtoString()
-
-
-
Constructor Detail
-
Annotation
public Annotation(String keyword, NodePath instanceLocation, SchemaLocation schemaLocation, NodePath evaluationPath, Object value)
-
-
Method Detail
-
getKeyword
public String getKeyword()
The keyword that produces the annotation.- Returns:
- the keyword
-
getInstanceLocation
public NodePath 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 NodePath 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)
-
builder
public static Annotation.Builder builder()
-
-