Package io.github.qishr.cascara.schema.structure
Interface SchemaNode
java.lang.Object
io.github.qishr.cascara.schema.structure.SchemaNode
All Implemented Interfaces:
AstNode
All Known Implementing Classes:
BaseSchemaNode
public interface SchemaNode
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public abstract SchemaType | getType() | |
| public abstract String | getTitle() | The human-readable title |
| public abstract String | getDescription() | The human-readable description |
| public abstract SchemaNode | getProperty(String key) | |
| public abstract Map<String, SchemaNode> | getProperties() | |
| public abstract SchemaNode | getItemSchema() | |
| public abstract boolean | isRef() | |
| public abstract String | getRef() | |
| public abstract SchemaNode | getDefinition(String name) | |
| public abstract Map<String, SchemaNode> | getDefinitions() | |
| public abstract URI | getOriginUri() | |
| public abstract String | getDynamicAnchor() | |
| public abstract Object | getDefaultValue() | |
| public abstract List<ValidationRule> | getRules() | |
| public abstract void | validate(AstNode node, String path, ValidationResult result) | |
| public abstract AstNode | getOriginAst() | |
| public abstract String | getContentMediaType() | |
| public abstract void | setContentMediaType(String contentMediaType) | |
| public abstract void | setExtension(String key, Object value) | |
| public abstract Object | getExtension(String key) | |
| public abstract Map<String, Object> | getExtensions() | |
| public abstract boolean | isReadOnly() | |
| public abstract void | setReadOnly(boolean readOnly) | |
| public default String | getFormat() | |
| public default String | getFormatOption(String key) | |
| public default boolean | getBooleanOption(String key, boolean defaultValue) | |
| public abstract void | addAllOf(SchemaNode node) | |
| public abstract List<SchemaNode> | getAllOf() | |
| public abstract SchemaNode | getPropertySchema(String key) | |
| public default boolean | areAdditionalPropertiesAllowed() | |
| public default SchemaNode | getAdditionalPropertiesSchema() | |
| public abstract SchemaNode | getMetaSchema() | Returns the schema that defines the structure of THIS node. |
Method Details
getType
public abstract SchemaType getType()
getTitle
public abstract String getTitle()
The human-readable title
getDescription
public abstract String getDescription()
The human-readable description
getProperty
public abstract SchemaNode getProperty(String key)
getProperties
public abstract Map<String, SchemaNode> getProperties()
getItemSchema
public abstract SchemaNode getItemSchema()
isRef
public abstract boolean isRef()
getRef
public abstract String getRef()
getDefinition
public abstract SchemaNode getDefinition(String name)
getDefinitions
public abstract Map<String, SchemaNode> getDefinitions()
getOriginUri
public abstract URI getOriginUri()
getDynamicAnchor
public abstract String getDynamicAnchor()
getDefaultValue
public abstract Object getDefaultValue()
getRules
public abstract List<ValidationRule> getRules()
validate
public abstract void validate(AstNode node, String path, ValidationResult result)
getOriginAst
public abstract AstNode getOriginAst()
getContentMediaType
public abstract String getContentMediaType()
setContentMediaType
public abstract void setContentMediaType(String contentMediaType)
setExtension
public abstract void setExtension(String key, Object value)
getExtension
public abstract Object getExtension(String key)
getExtensions
public abstract Map<String, Object> getExtensions()
isReadOnly
public abstract boolean isReadOnly()
setReadOnly
public abstract void setReadOnly(boolean readOnly)
getFormat
public default String getFormat()
getFormatOption
public default String getFormatOption(String key)
getBooleanOption
public default boolean getBooleanOption(String key, boolean defaultValue)
addAllOf
public abstract void addAllOf(SchemaNode node)
getAllOf
public abstract List<SchemaNode> getAllOf()
getPropertySchema
public abstract SchemaNode getPropertySchema(String key)
areAdditionalPropertiesAllowed
public default boolean areAdditionalPropertiesAllowed()
getAdditionalPropertiesSchema
public default SchemaNode getAdditionalPropertiesSchema()
getMetaSchema
public abstract SchemaNode getMetaSchema()
Returns the schema that defines the structure of THIS node.For a standard property, this returns the JSON Schema Meta-Schema. For a CEMA property, this might return the CEMA Meta-Schema.