Package space.kscience.dataforge.meta.descriptors

Types

Described
Link copied to clipboard
common
interface Described

An object which provides its descriptor

MetaDescriptor
Link copied to clipboard
common
data class MetaDescriptor(info: String?, children: Map<String, MetaDescriptor>, multiple: Boolean, valueRequirement: ValueRequirement, valueTypes: List<ValueType>?, indexKey: String, defaultValue: Value?, attributes: Meta)

The descriptor for a meta

MetaDescriptorBuilder
Link copied to clipboard
common
class MetaDescriptorBuilder
ValueRequirement
Link copied to clipboard
common
enum ValueRequirement : Enum<ValueRequirement>

Restrictions on value in the node

Functions

copy
Link copied to clipboard
common
fun MetaDescriptor.copy(block: MetaDescriptorBuilder.() -> Unit = {}): MetaDescriptor

Make a deep copy of this descriptor applying given transformation block

enum
Link copied to clipboard
common
inline fun <E : Enum<E>> MetaDescriptorBuilder.enum(key: Name, default: E?, crossinline modifier: MetaDescriptorBuilder.() -> Unit = {}): MetaDescriptorBuilder
get
Link copied to clipboard
common
operator fun MetaDescriptor.get(name: String): MetaDescriptor?
operator fun MetaDescriptor.get(name: Name): MetaDescriptor?
item
Link copied to clipboard
common
fun MetaDescriptorBuilder.item(name: String, block: MetaDescriptorBuilder.() -> Unit): MetaDescriptorBuilder
MetaDescriptor
Link copied to clipboard
common
fun MetaDescriptor(block: MetaDescriptorBuilder.() -> Unit): MetaDescriptor
node
Link copied to clipboard
common
fun MetaDescriptorBuilder.node(name: String, block: MetaDescriptorBuilder.() -> Unit)
fun MetaDescriptorBuilder.node(key: String, described: Described, block: MetaDescriptorBuilder.() -> Unit = {})
fun MetaDescriptorBuilder.node(name: Name, block: MetaDescriptorBuilder.() -> Unit): MetaDescriptorBuilder

Create and configure child value descriptor

required
Link copied to clipboard
common
fun MetaDescriptorBuilder.required()
scheme
Link copied to clipboard
common
inline fun <S : Scheme, T : Scheme> MetaDescriptorBuilder.scheme(property: KProperty1<S, T>, spec: SchemeSpec<T>, noinline block: MetaDescriptorBuilder.() -> Unit = {})
validate
Link copied to clipboard
common
fun MetaDescriptor.validate(item: Meta?): Boolean

Check if given item suits the descriptor

fun MetaDescriptor.validate(value: Value?): Boolean
value
Link copied to clipboard
common
inline fun <S : Scheme, T> MetaDescriptorBuilder.value(property: KProperty1<S, T>, noinline block: MetaDescriptorBuilder.() -> Unit = {}): MetaDescriptorBuilder
fun MetaDescriptorBuilder.value(name: String, type: ValueType, vararg additionalTypes: ValueType, block: MetaDescriptorBuilder.() -> Unit = {}): MetaDescriptorBuilder
fun MetaDescriptorBuilder.value(name: Name, type: ValueType, vararg additionalTypes: ValueType, block: MetaDescriptorBuilder.() -> Unit = {}): MetaDescriptorBuilder

Create and configure child value descriptor

Properties

allowedValues
Link copied to clipboard
common
val MetaDescriptor.allowedValues: List<Value>?
required
Link copied to clipboard
common
val MetaDescriptor.required: Boolean