fragment { import interface PresentationState; import interface PresentationSubject; import interface PresentationStateValues; import interface PresentationStateRecord; import interface PresentationStateFactory; import interface Presentation; import interface PresentationStates; import package PresentationRuntime; atom PresentationMountRecord id "atom:org.quixos.presentation-mount"; shared edge PresentationMembership id "org.quixos.presentation:membership" { interface PresentationMount projection members id "org.quixos.presentation:members" many-unique keyed "string" public-traversal; interface PresentationState projection presentationMount id "org.quixos.presentation:owner" optional-one public-traversal; } shared edge PresentationParent id "org.quixos.presentation:parent" { interface PresentationState projection parent id "org.quixos.presentation:parent" optional-one public-traversal; interface PresentationState projection children id "org.quixos.presentation:children" many-unique public-traversal; } shared edge PresentationRoot id "org.quixos.presentation:root" { interface PresentationMount projection root id "org.quixos.presentation:root" optional-one public-traversal; interface PresentationState projection rootOf id "org.quixos.presentation:root-of" optional-one; } conform PresentationMountRecord as PresentationMount id "org.quixos.presentation:mount" { bind copy.call to package PresentationRuntime.copy with {members to edge PresentationMembership.members;root to edge PresentationRoot.root;metadata to interface PresentationState from input;presentationMount to creation PresentationMountRecord with {};}; bind members.resolve to edge PresentationMembership.members.resolve; bind find.call to package PresentationRuntime.find with {members to edge PresentationMembership.members;}; bind attach.call to package PresentationRuntime.claim with {members to edge PresentationMembership.members;root to edge PresentationRoot.root;metadata to interface PresentationState from input;}; bind root.resolve to edge PresentationRoot.root.resolve; bind create.call to package PresentationRuntime.createPresentationMount with {presentationMount to creation PresentationMountRecord with {};}; } conform Presentation as PresentationSubject id "org.quixos.presentation:subject" {} conform Presentation as PresentationStates id "org.quixos.presentation:state-association" { bind ensure.call to package PresentationRuntime.ensure with { presentationMount to interface PresentationMount from input; metadata to interface PresentationState from input; factory to interface PresentationStateFactory; }; bind create.call to package PresentationRuntime.create with { metadata to interface PresentationState from input; factory to interface PresentationStateFactory; }; } conform & PresentationSubject> PresentationStateRecord as PresentationState id "org.quixos.presentation:state-metadata" { private state Occurrence id "org.quixos.presentation:occurrence" on Self : string policy register; private edge Source id "org.quixos.presentation:source" {atom Self projection source id "org.quixos.presentation:source" exactly-one; object Subject projection states id "org.quixos.presentation:source-states" many-unique;} initialize {occurrence to state Occurrence;source to edge Source.source;}; bind source.resolve to edge Source.source.resolve; bind allocate.call to package PresentationRuntime.allocate with {source to interface PresentationStates via edge Source.source;}; bind copyValues.call to interface PresentationStateValues.copyValues.call; bind occurrence.get to state Occurrence.read; bind parent.resolve to edge PresentationParent.parent.resolve; bind children.resolve to edge PresentationParent.children.resolve; bind presentationMount.resolve to edge PresentationMembership.presentationMount.resolve; bind attach.call to package PresentationRuntime.attach with { owner to edge PresentationMembership.presentationMount; parent to edge PresentationParent.parent; rootOf to edge PresentationRoot.rootOf; metadata to interface PresentationState from input; presentationMount to interface PresentationMount from input; }; } }