Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/12 feature type definition UI #26

Merged
merged 211 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
2269ae1
Start type/template editor UIs
TSampley Oct 5, 2024
7fd8c64
remove empty space and generated comment
TSampley Oct 5, 2024
9ed9250
stub replacement callback
TSampley Oct 5, 2024
dcd7d03
Rename class editor to record editor to narrow scope of behavior
TSampley Oct 6, 2024
4c4d838
Replace class editor ui state with record editor ui state
TSampley Oct 6, 2024
fee1bde
Define name across types
TSampley Oct 6, 2024
1548c45
Add interface todo note
TSampley Oct 6, 2024
e80690c
add migration comments
TSampley Oct 6, 2024
a130910
Create RecordEditor to take over responsibility of concept editor
TSampley Oct 6, 2024
37b84a3
Add record editor view model to take over concept editor view model
TSampley Oct 6, 2024
81eb373
Add name to field editor ui state
TSampley Oct 6, 2024
dc6e346
Add controls around individual field controls
TSampley Oct 6, 2024
8f987c2
Add IntField to allow reflection and modification of int fields
TSampley Oct 6, 2024
3f655b3
Allow modification of int typed fields
TSampley Oct 6, 2024
427d171
pass temporary dummy data types to record editor
TSampley Oct 6, 2024
24a7f35
Expand supported values to include String
TSampley Oct 6, 2024
75fb7fd
show same types in every field row editor
TSampley Oct 6, 2024
ae409e8
use dummy data for record editor view model
TSampley Oct 6, 2024
d80bfb5
Add field name event
TSampley Oct 6, 2024
f8984e6
Remove concept editor dialog
TSampley Oct 6, 2024
573c620
Replace Concept references with Record
TSampley Oct 6, 2024
2b88df8
Make value type an output type
TSampley Oct 6, 2024
7657675
Remove wildcard from record editor ui state.fields
TSampley Oct 6, 2024
8315f76
Implement record name changes
TSampley Oct 6, 2024
0e83e93
Add new field with placeholders
TSampley Oct 6, 2024
0a728d5
Add missing field name event
TSampley Oct 6, 2024
4bebdc4
Remove field by index
TSampley Oct 6, 2024
fe92975
Implement indexed field modifiers
TSampley Oct 6, 2024
feeeded
Replace complex components using type instead of value type
TSampley Oct 6, 2024
3c9f65d
Add StringField composable to modify String fields
TSampley Oct 6, 2024
8d489e3
Add string-value type fields to be modified
TSampley Oct 6, 2024
b8490b2
map fields to new list instead of list->mutable->list cycle
TSampley Oct 6, 2024
1628d16
Fix wrong callback being invoked on event
TSampley Oct 6, 2024
37f1ce7
Wrap record editor in dialog
TSampley Oct 6, 2024
240af43
Add record cancel/confirm buttons
TSampley Oct 6, 2024
a7ef9a9
remove concept case state
TSampley Oct 6, 2024
ca27cc1
replace conceptEditorViewModel with recordEVM
TSampley Oct 6, 2024
a7ca799
Add preparation and completion callbacks in view model
TSampley Oct 6, 2024
187d1bd
Replace ui todo with view model mapping
TSampley Oct 7, 2024
b305d17
Add missing callbacks for view model
TSampley Oct 7, 2024
87ee9c8
Provide missing dependency
TSampley Oct 7, 2024
926065c
Update category explorer screen ui test
TSampley Oct 8, 2024
ac625f2
Add realm dependencies
TSampley Oct 8, 2024
325d63c
Add attribute class to mirror field definitions
TSampley Oct 9, 2024
bae58de
replace field.value with defaultValue
TSampley Oct 9, 2024
7759561
Add instance type to values
TSampley Oct 9, 2024
6fbba41
Move record to nested type hierarchy
TSampley Oct 9, 2024
04b8e44
Add type/value methods to replace concepts
TSampley Oct 9, 2024
d050b6a
Fix kdoc
TSampley Oct 9, 2024
bc742e1
Create tentative type-system tables
TSampley Oct 10, 2024
c3d724c
Use plurals for table names
TSampley Oct 10, 2024
27e26fc
Create type system queries
TSampley Oct 10, 2024
c1cc1de
Create records sql data source implementation with function stubs
TSampley Oct 10, 2024
d892c46
Uncomment query labels
TSampley Oct 10, 2024
23da8b9
provide records sql data source binding
TSampley Oct 10, 2024
cc424b6
deprecate category sql data source
TSampley Oct 10, 2024
f0493b1
Fix Instance only allowing a single attribute
TSampley Oct 10, 2024
0281c26
Add uuid to record
TSampley Oct 10, 2024
0d3806b
Replace orphaned uuids with instance holders
TSampley Oct 10, 2024
4f14118
replace comments with generated queries invocation
TSampley Oct 10, 2024
a51bff6
replace Uuid's with holder types
TSampley Oct 10, 2024
2d8f0e6
Implement addField
TSampley Oct 10, 2024
baaf5cc
Implement setAttribute
TSampley Oct 10, 2024
8957528
wrap function with runCatching
TSampley Oct 10, 2024
0124b18
Remove unused attributes table
TSampley Oct 10, 2024
9dcbe6c
Refactor tables
TSampley Oct 11, 2024
2a004c4
Bump compile/targetSdks
TSampley Oct 11, 2024
cf1feb5
Add table names to type enumeration table
TSampley Oct 12, 2024
9006c33
Add foreign key constraints on fields
TSampley Oct 12, 2024
f07fb54
Create type change trigger to prevent leaving default values in table…
TSampley Oct 13, 2024
a7f77be
Add Type.Record import
TSampley Oct 13, 2024
d1d6e28
Allow fieldEditor ui state value to be null
TSampley Oct 13, 2024
b7c0371
Provide random ids in fake record data
TSampley Oct 13, 2024
597eaca
Add Boolean Values to supported types
TSampley Oct 13, 2024
47e3daa
Make defaultValue optional in records data source
TSampley Oct 13, 2024
0b6cfdb
Create hypothetical type structures for test update
TSampley Oct 13, 2024
061fc40
Create RecordsRepository to abstract call to data source
TSampley Oct 13, 2024
4fc95f6
Add remaining fields to test instances
TSampley Oct 13, 2024
960cc61
Add coroutines swing/android dependencies
TSampley Oct 13, 2024
23125ea
Replace record object prototypes with record variables
TSampley Oct 13, 2024
6f41985
Fix outdated stringe expectation
TSampley Oct 13, 2024
1cee008
Add record data source extension
TSampley Oct 13, 2024
ed3e230
Replace "Concepts" in semantics expectations with "Records"
TSampley Oct 13, 2024
747d836
Replace "Concept 1" expectation with ".*Foo.*" expectation
TSampley Oct 13, 2024
49e2912
Replace "Records" references with "Instances"
TSampley Oct 13, 2024
af70ae4
Fix outdated dialog string
TSampley Oct 13, 2024
411fccc
add kotlin.uuid to Value Instances
TSampley Oct 13, 2024
df2ce70
replace project uuid with kotlin.uuid
TSampley Oct 13, 2024
1d23c8c
Create model to ui state mapper function
TSampley Oct 13, 2024
72ebf96
Add data source replacement signatures
TSampley Oct 15, 2024
8c7a90a
Implement stubs with kotlin uuid
TSampley Oct 16, 2024
5b7910f
Implement stubs with kotlin uuid
TSampley Oct 17, 2024
c5d0cdd
Replace MyUuid with kotlin-uuid
TSampley Oct 17, 2024
9697b52
Add missing opt-ins
TSampley Oct 19, 2024
5c19f67
remove now unused MyUuid
TSampley Oct 19, 2024
15a1abc
Add missing uuid serializer
TSampley Oct 20, 2024
be17842
Register uuid serializer in ConceptSpaceJson
TSampley Oct 21, 2024
cb4315f
Fix stopKoin being called before test
TSampley Oct 22, 2024
3c0d1fd
Create new RecordsSqlDataSourceUnitTest
TSampley Oct 22, 2024
8889d63
Add record and field test cases
TSampley Oct 23, 2024
d645b20
Add record mutators test cases
TSampley Oct 24, 2024
3598b6f
Add create instance default test case
TSampley Oct 25, 2024
72e0a4b
Remove attribute type from instances
TSampley Oct 26, 2024
0088d8f
Create map to string extension function
TSampley Oct 26, 2024
e1a9677
Simplify ui state mapping with extension function
TSampley Oct 26, 2024
04155f5
Implement getRecord
TSampley Oct 27, 2024
7c52b9d
Replace ambiguous set field with typed set field statements
TSampley Oct 27, 2024
9ef6814
Add RealValue to type hierarchy
TSampley Oct 28, 2024
0dd37d8
implement RecordsSqlDataSource.defineField
TSampley Oct 28, 2024
8506298
Fix record names not checked on creation
TSampley Oct 28, 2024
fd37e40
Expand case coverage for valid record names
TSampley Oct 28, 2024
84dac9f
Add empty string case for invalid record names
TSampley Oct 28, 2024
0d67b46
Prevent expensive recreation of regex
TSampley Oct 28, 2024
1f733be
Fix test expecting exception to be thrown when result API is used
TSampley Oct 28, 2024
aeaf256
remove redundant test
TSampley Oct 28, 2024
22cffa5
Fix getRecord ignoring null possibility
TSampley Oct 28, 2024
4b9dc3c
Fix test expecting exception to be thrown
TSampley Oct 28, 2024
36248d6
Add non-empty field name requirement
TSampley Oct 28, 2024
9fb8661
Add getRecordFields sql statement
TSampley Oct 29, 2024
f9eb0f3
Stub type cases in getRecord
TSampley Oct 29, 2024
ffae146
Add get value sql statements
TSampley Oct 29, 2024
90ef5d6
Implement int value case
TSampley Oct 29, 2024
27c9e6c
Add record and field name statement bindings
TSampley Oct 29, 2024
a16f79e
Fix id pulled from instances table instead of records
TSampley Oct 29, 2024
7eac8bc
Implement instance setIntField functions
TSampley Oct 29, 2024
40b3fb9
Fix test not checking default value
TSampley Oct 29, 2024
bb5a378
Fix test not checking for reconstituted content
TSampley Oct 29, 2024
386a717
Fix test not using updated record to create instance
TSampley Oct 29, 2024
428f8e5
rename default value flag for clarity
TSampley Oct 29, 2024
46632e8
remove extraneous currently unsupported types
TSampley Oct 29, 2024
dd2b338
Move getIntField below setter statement
TSampley Oct 29, 2024
67cab60
Temporarily disable onClick
TSampley Oct 29, 2024
9ea6902
move join to single line
TSampley Oct 29, 2024
51ded4a
Insert "null" instance creation to support default values
TSampley Oct 29, 2024
910bdce
Create queries unit test to verify query behavior
TSampley Oct 29, 2024
cfa2002
replace extra stubbed methods with single necessary test case
TSampley Oct 29, 2024
5015c55
Add instance editor ui state
TSampley Oct 29, 2024
da0b972
Add category explorer instance editor state
TSampley Oct 29, 2024
0d4ef46
Add instance case to EditorState enum
TSampley Oct 29, 2024
368fdfb
Add ui state docs
TSampley Oct 30, 2024
a6e5c12
Create new instance editor view model
TSampley Oct 30, 2024
1c5b455
Add uuids to instance/record editors
TSampley Oct 30, 2024
fd26996
remove concept editor route
TSampley Oct 30, 2024
44dde15
transfer class editor signatures to accepted record editor view model
TSampley Oct 30, 2024
42e06d9
remove dropped class editor view model
TSampley Oct 30, 2024
1747dfd
Create InstanceEditor ui to replace ConceptEditor
TSampley Oct 30, 2024
dfefee9
Remove ConceptEditorViewModel
TSampley Oct 30, 2024
ad4d803
Add content description semantics to root of record editor
TSampley Oct 30, 2024
d080a10
remove unused ConceptEditorUiState.kt
TSampley Oct 30, 2024
f12865a
Create instance editor view model interface
TSampley Oct 30, 2024
dd0cfcc
Add record editor view model doc
TSampley Oct 30, 2024
4263d41
reconcile signatures between record editor view model interface and impl
TSampley Oct 30, 2024
112e287
Add instance editor view model essential signatures
TSampley Oct 30, 2024
5c8cda3
Rename Concept->Instance in ui
TSampley Oct 30, 2024
21d0a64
Add new structure button to category explorer screen
TSampley Oct 30, 2024
7db40e9
Add onConfirm/Cancel to record editor view model interfac
TSampley Oct 30, 2024
0e6f4ee
Fix record editor view model signatures not updated in category explo…
TSampley Oct 30, 2024
c1a7466
Fix outdated doc param name
TSampley Oct 30, 2024
a7a5954
Fix instance state not added to category explorer editor state hierarchy
TSampley Oct 30, 2024
de1612e
Add instance state to combine mapping
TSampley Oct 30, 2024
81ef24e
Add state flow to InstanceEditorViewModel
TSampley Oct 30, 2024
85329b8
Add instance editor view model binding
TSampley Oct 30, 2024
4cef6b7
opt-in to uuid api
TSampley Oct 30, 2024
1ff3c01
Allow null values for instance editor view model state
TSampley Oct 30, 2024
5fddade
Replace bullet points with mermaid diagram
TSampley Oct 30, 2024
e161ca3
replace explicit binding with inline constructor notation
TSampley Oct 30, 2024
b12aa3e
remove category data sources implementation and tst
TSampley Oct 30, 2024
7885948
replace category repository with records repository and *concept* wit…
TSampley Oct 30, 2024
7b2c899
rename concept event with instance
TSampley Oct 30, 2024
770e8df
remove unused concept ui state mapper
TSampley Oct 30, 2024
b23df79
Add record item ui state and instance item ui state to replace concep…
TSampley Oct 30, 2024
ad98873
Add instance item ui
TSampley Oct 30, 2024
bd3fcdb
Add showCheckbox flag and onCheckChange event to instance item ui
TSampley Oct 30, 2024
99ed3f0
replace concepts list with instances
TSampley Oct 30, 2024
cd500c2
Add checkbox for selection to instance item
TSampley Oct 30, 2024
b4c937d
add instance item doc
TSampley Oct 30, 2024
17d87bd
remove unused concept item ui
TSampley Oct 30, 2024
d86ea62
Add structure item row ui
TSampley Oct 30, 2024
14f3db4
simplify link in kdoc
TSampley Oct 30, 2024
d5da376
Add structure item to category explorer ui
TSampley Oct 30, 2024
7a32295
remove unused member concept
TSampley Oct 30, 2024
333beac
Add instance counterparts to replace concepts in ontology
TSampley Oct 30, 2024
33e7fbc
replace concept references with instances
TSampley Oct 30, 2024
aa70306
remove buggy file opt-in
TSampley Oct 30, 2024
0d8ff16
move concept space files to nested package
TSampley Oct 30, 2024
f753b0d
move opt-in down from buggy file position
TSampley Oct 30, 2024
facba45
simplify getInstance interactor
TSampley Oct 30, 2024
f17bbe1
remove unused IndependentConcept
TSampley Oct 30, 2024
eb4bbad
remove unused concept json
TSampley Oct 30, 2024
eadbf4d
move opt-in down from buggy file location
TSampley Oct 30, 2024
879fd6f
deprecate concept-related repository functions
TSampley Oct 30, 2024
be55790
remove unused import
TSampley Oct 31, 2024
c7d84b2
Add proposition comment in readme
TSampley Oct 31, 2024
24ac287
Add intended process to readme
TSampley Oct 31, 2024
0bd4986
Add renaming note
TSampley Oct 31, 2024
2de81e7
replace explicit edge labeling fields with instance reference
TSampley Oct 31, 2024
daafc78
Add RecordsRepository kdocs
TSampley Oct 31, 2024
6d0467c
remove unused relation members
TSampley Oct 31, 2024
e65695b
remove unused category repository functions
TSampley Oct 31, 2024
c3219d8
remove remaining Concept references
TSampley Oct 31, 2024
623c64e
move opt-in down from buggy file position
TSampley Oct 31, 2024
56ccc6c
shorten kdoc type reference
TSampley Oct 31, 2024
d576c27
define sql argument binding names
TSampley Nov 2, 2024
461fb45
Update concept space imports after moving types to space package
TSampley Nov 3, 2024
89f59aa
generate RecordsRepositoryImpl from interface
TSampley Nov 3, 2024
bcf6aba
open value type in signature and check in implementation
TSampley Nov 3, 2024
c70cf7e
Add category data source to handle category functions
TSampley Nov 3, 2024
28e1a6b
implement category signatures
TSampley Nov 3, 2024
261cd7c
implement record and instance functions
TSampley Nov 3, 2024
dc6048d
Provide stubbed implementation of category data source
TSampley Nov 12, 2024
5c84d70
ignore ui test
TSampley Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 60 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,63 @@ When one agent introduces information to another agent that presents a conflict

## Modularization

* core
* entities
* interactors
* data
* local
* remote
* view-models
* ui
* feature
* ontology - enables users to document their perspective as discrete elements and their relations
* epistemology - enables users to compare and test differences in ontologies
Ontology - enables users to document their perspective as discrete elements and their relations
Epistemology - enables users to compare and test differences in ontologies

```mermaid
%%{
init: {
'theme': 'neutral'
}
}%%

graph LR
:app-android --> :app-shared
:app-desktop --> :app-shared

:app-shared --> :feature:ontology
:app-shared --> :feature:epistemology

:feature:ontology --> :core-all
:feature:epistemology --> :core-all

:core-all --> :core:common
:core-all --> :core:entities
:core-all --> :core:interactors
:core-all --> :core:data
:core-all --> :core:remote
:core-all --> :core:local
:core-all --> :core:view-models
:core-all --> :core:ui
:core-all --> :core:navigation

:core:ui --> :core:entities
:core:ui --> :core:common

:core:data --> :core:common
:core:data --> :core:entities
:core:data --> :core:local
:core:data --> :core:remote

:core:entities --> :core:common

:core:interactors --> :core:common
:core:interactors --> :core:data

:core:local --> :core:common
:core:local --> :core:entities

:core:navigation --> :core:common
:core:navigation --> :core:entities

:core:remote --> :core:common
:core:remote --> :core:entities

:core:ui --> :core:common
:core:ui --> :core:entities
:core:ui --> :core:view-models

:core:view-models --> :core:common
:core:view-models --> :core:entities
:core:view-models --> :core:interactors
```
4 changes: 2 additions & 2 deletions app-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ plugins {

android {
namespace = "org.pointyware.commonsense.android"
compileSdk = 34
compileSdk = 35
defaultConfig {
applicationId = "org.pointyware.commonsense.android"
minSdk = 24
targetSdk = 34
targetSdk = 35
versionCode = 1
versionName = "1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion app-shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ compose.resources {

android {
namespace = "org.pointyware.commonsense.shared"
compileSdk = 34
compileSdk = 35
defaultConfig {
minSdk = 21
}
Expand Down
2 changes: 1 addition & 1 deletion core/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ kotlin {

android {
namespace = "org.pointyware.commonsense.core.common"
compileSdk = 34
compileSdk = 35
defaultConfig {
minSdk = 21
}
Expand Down
12 changes: 12 additions & 0 deletions core/common/src/commonMain/kotlin/MapExt.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2024 Pointyware. Use of this software is governed by the GPL-3.0 license.
*/

package org.pointyware.commonsense.core.common

/**
*
*/
fun <K, V> Map<K, V>.joinToString() {
entries.joinToString(prefix = "{", separator = ", ", postfix = "}") { (k, v) -> "$k=$v" }
}
52 changes: 0 additions & 52 deletions core/common/src/commonMain/kotlin/Uuid.kt

This file was deleted.

2 changes: 1 addition & 1 deletion core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ kotlin {

android {
namespace = "org.pointyware.commonsense.core.data"
compileSdk = 34
compileSdk = 35
defaultConfig {
minSdk = 21
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
@file:OptIn(ExperimentalUuidApi::class)

package org.pointyware.commonsense.core.data.org.pointyware.commonsense.core.data.db

import org.pointyware.commonsense.core.common.Uuid
import org.pointyware.commonsense.core.entities.Type
import org.pointyware.commonsense.core.entities.Value
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid

/**
* Represents a document that can be stored in a graph database. A node in a graph.
Expand Down
2 changes: 1 addition & 1 deletion core/entities/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ kotlin {

android {
namespace = "org.pointyware.commonsense.core.entities"
compileSdk = 34
compileSdk = 35
defaultConfig {
minSdk = 21
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package org.pointyware.commonsense.core.entities
data class Field<T:Type>(
val name: String,
val type: T,
var value: Value<T>
val defaultValue: Value<T>? = null
) {

}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package org.pointyware.commonsense.core.entities

import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid

@RequiresOptIn(
message = "This API is experimental and may change in the future.",
level = RequiresOptIn.Level.WARNING
Expand All @@ -14,6 +17,9 @@ annotation class ExperimentalType
* [Type.Int] is the only non-experimental type.
*/
sealed interface Type {

val name: kotlin.String

// region Theoretical Types

/**
Expand Down Expand Up @@ -98,68 +104,99 @@ sealed interface Type {
* <sup>(1)</sup> - [null etymology](https://www.etymonline.com/word/null)
*/
@ExperimentalType
data object Null: Type
data object Null: Type {
override val name: kotlin.String
get() = "Null"
}

/**
* A boolean is a value that can be either true or false.
*/
@ExperimentalType
data object Boolean: Type
data object Boolean: Type {
override val name: kotlin.String
get() = "Boolean"
}

/**
* An integer is a value that can be represented as a whole number.
*/
data object Int: Type // Add min, max constraints or define as further type?
data object Int: Type { // Add min, max constraints or define as further type?
override val name: kotlin.String
get() = "Int"
}

/**
* A floating point number is composed of a sign bit, mantissa, and an exponent.
*/
@ExperimentalType
data object Float: Type // Add min, max constraints or define as further type?
data object Float: Type { // Add min, max constraints or define as further type?
override val name: kotlin.String
get() = "Float"
}

// Collections
/**
* A collection is a group of objects that are treated as a single entity.
*/
@ExperimentalType
data object Collection: Type
data object Collection: Type {
override val name: kotlin.String
get() = "Collection<E>"
}

// Homogenous Collections
/**
* A sequence is an ordered collection of objects.
*/
@ExperimentalType
data object Sequence: Type
data object Sequence: Type {
override val name: kotlin.String
get() = "Sequence<E>"
}

/**
* An array is a fixed-size collection of objects.
*/
@ExperimentalType
data object Array: Type // Add size min, max constraints or define as further type?
data object Array: Type { // Add size min, max constraints or define as further type?
override val name: kotlin.String
get() = "Array<E>"
}

/**
* A string is a special case sequence of characters.
*/
@ExperimentalType
data object String: Type // Add pattern constraints or define as further type?
data object String: Type { // Add pattern constraints or define as further type?
override val name: kotlin.String
get() = "String|Array<Char>"
}

/**
* A set is collection of unique objects.
*/
@ExperimentalType
data object Set: Type
data object Set: Type {
override val name: kotlin.String
get() = "Set<E>"
}

/**
* A bag is a special case of a set where each element can appear more than once.
*/
@ExperimentalType
data object Bag: Type
data object Bag: Type {
override val name: kotlin.String
get() = "Bag<E>"
}

/**
* A map is a special case of a set where each element is a key-value pair.
*/
@ExperimentalType
data object Map: Type
data object Map: Type {
override val name: kotlin.String
get() = "Map<K,V>"
}

// Heterogeneous Collections

Expand All @@ -174,14 +211,38 @@ sealed interface Type {
* @see Record
*/
@ExperimentalType
data object Object: Type
data object Object: Type {
override val name: kotlin.String
get() = "Object"
}


/**
* An interface is a collection of properties that define a contract for objects that implement
* the interface.
*/
@ExperimentalType
data object Interface: Type
data class Interface(
override val name: kotlin.String,
val fields: List<Field<*>>
): Type {
// TODO: interface focus on function signatures
}

/**
* A form of Schema that is used to define the structure of a Concept.
*
* Each Concept belongs to a Class and has a set of Properties.
*
* TODO: rename to Structure? for lay people
*/
@OptIn(ExperimentalUuidApi::class)
data class Record(
override val name: kotlin.String,
val uuid: Uuid,
val fields: kotlin.collections.Set<Field<*>> = emptySet()
): Type {
}

// endregion
}
Loading