Files
quixos-protocol/test/fixtures/collections/workspace.qx
T

29 lines
1.4 KiB
Plaintext

workspace Collections id "workspace:collections" revision "workspace:collections@1" commit "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" {
import interface NodeData;
import package CollectionRuntime;
atom Node id "collection:node";
conform Node as NodeData id "collection:node:data" {
private state Label id "collection:label-slot" on Node : string policy register;
private edge Items id "collection:items-edge" {
atom Node projection items id "collection:items-projection" many;
atom Node projection containers id "collection:containers-projection" many;
}
private edge Detail id "collection:detail-edge" {
atom Node projection detail id "collection:detail-projection" optional-one;
atom Node projection owner id "collection:owner-projection" optional-one;
}
initialize { label to state Label; };
bind label.get to state Label.read;
bind label.set to state Label.write;
bind items.resolve to edge Items.items.resolve;
bind containers.resolve to edge Items.containers.resolve;
bind detail.resolve to edge Detail.detail.resolve;
bind version.get to package CollectionRuntime.version with { items to edge Items.items; };
bind replace.call to package CollectionRuntime.replace with { items to edge Items.items; };
bind ensure.call to package CollectionRuntime.ensure with {
detail to edge Detail.detail;
node to creation Node with { NodeData from input; };
};
}
}