Package io.github.qishr.cascara.schema.structure
Class BaseSchemaNode
java.lang.Object
io.github.qishr.cascara.schema.structure.BaseSchemaNode
All Implemented Interfaces:
SchemaNode
Direct Known Subtypes:
ArraySchemaNode, ObjectSchemaNode, ScalarSchemaNode, LazySchemaNode
public abstract class BaseSchemaNode
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
| protected final Map |
definitions | |
| protected URI | originUri | |
| protected String | ref |
Constructor Summary
| Constructor | Description |
|---|---|
| BaseSchemaNode(SchemaType type, SchemaNode metaSchema) |
Method Summary
Field Details
definitions
protected final Map
originUri
protected URI originUri
ref
protected String ref
Method Details
setDynamicAnchor
public void setDynamicAnchor(String anchor)
getDynamicAnchor
public String getDynamicAnchor()
Specified By:
addAllOf
public void addAllOf(SchemaNode node)
Specified By:
getAllOf
public List<SchemaNode> getAllOf()
Specified By:
setFormat
public void setFormat(String format)
getFormat
public String getFormat()
Specified By:
setFormatOption
public void setFormatOption(String key, String value)
getFormatOption
public String getFormatOption(String key)
Specified By:
getProperties
public abstract Map<String, SchemaNode> getProperties()
Specified By:
addRule
public void addRule(ValidationRule rule)
addDefinition
public void addDefinition(String key, SchemaNode node)
setType
public void setType(SchemaType type)
setOriginUri
public void setOriginUri(URI originUri)
setTitle
public void setTitle(String title)
setDescription
public void setDescription(String description)
setRef
public void setRef(String ref)
setDefaultValue
public void setDefaultValue(Object defaultValue)
getContentMediaType
public String getContentMediaType()
Specified By:
setContentMediaType
public void setContentMediaType(String contentMediaType)
Specified By:
getOriginAst
public AstNode getOriginAst()
Specified By:
setOriginAst
public void setOriginAst(AstNode originAst)
isReadOnly
public boolean isReadOnly()
Specified By:
setReadOnly
public void setReadOnly(boolean readOnly)
Specified By:
setExtension
public void setExtension(String key, Object value)
Specified By:
getExtension
@io.github.qishr.cascara.common.lang.annotation.Nullable
public Object getExtension(String key)
Specified By:
getExtensions
public Map<String, Object> getExtensions()
Specified By:
getType
public SchemaType getType()
Specified By:
getTitle
public String getTitle()
Specified By:
getDescription
public String getDescription()
Specified By:
getDefaultValue
public Object getDefaultValue()
Specified By:
getDefinitions
public Map<String, SchemaNode> getDefinitions()
Specified By:
getRules
public List<ValidationRule> getRules()
Specified By:
isRef
public boolean isRef()
Specified By:
getRef
public String getRef()
Specified By:
getProperty
public SchemaNode getProperty(String name)
Specified By:
getDefinition
public SchemaNode getDefinition(String name)
Specified By:
validate
public void validate(AstNode node, String path, ValidationResult result)
Specified By:
getOriginUri
public URI getOriginUri()
Specified By:
getChildren
public List<? extends AstNode> getChildren()
getStartLine
public int getStartLine()
getStartColumn
public int getStartColumn()
getEndLine
public int getEndLine()
getEndColumn
public int getEndColumn()
getComments
public List<CommentAstNode> getComments()
getPropertySchema
public SchemaNode getPropertySchema(String key)
Specified By:
getMetaSchema
public SchemaNode getMetaSchema()
Specified By: