metadata-store: based on discussion with @ixv, made differences between graphs and groups in metadatum more clear

This commit is contained in:
Logan Allen 2021-03-09 11:11:28 -06:00
parent 45b2ea4096
commit 7da7da8e1e
4 changed files with 37 additions and 23 deletions

View File

@ -280,8 +280,9 @@
(peek-metadatum:met %graph rid)
?~ metadatum `state
=/ module=term
?. ?=(%& -.module.u.metadatum) %$
p.module.u.metadatum
?: ?=(%empty -.config.u.metadatum) %$
?: ?=(%group -.config.u.metadatum) %$
module.config.u.metadatum
abet:check:(abed:handle-update:ha rid nodes u.group module)
--
::

View File

@ -273,10 +273,10 @@
creator creator.m
preview preview.m
::
module
config
?: =(module.m %$)
[%| ~]
[%& module.m]
[%group ~]
[%graph module.m]
==
::
++ associations-1-to-2
@ -303,7 +303,7 @@
::
++ metadata-1-to-2
|= m=metadata-1
%* . *metadatum:store
%* . *metadatum-2
title title.m
description description.m
color color.m

View File

@ -47,16 +47,22 @@
[%date-created s+(scot %da date-created.met)]
[%creator s+(scot %p creator.met)]
::
:- %module
?: ?=(%& -.module.met)
s+p.module.met
?~ p.module.met
~
?~ u.p.module.met
o+~
%- pairs
:~ [%app-name s+app-name.u.u.p.module.met]
[%resource s+(enjs-path:resource resource.u.u.p.module.met)]
:- %config
?+ -.config.met o+~
%graph
%+ frond %graph
s+module.config.met
::
%group
%+ frond %group
?~ feed.config.met
~
?~ u.feed.config.met
o+~
%- pairs
:~ [%app-name s+app-name.u.u.feed.config.met]
[%resource s+(enjs-path:resource resource.u.u.feed.config.met)]
==
==
::
[%picture s+picture.met]
@ -168,21 +174,21 @@
[%color nu]
[%date-created (se %da)]
[%creator (su ;~(pfix sig fed:ag))]
[%module module]
[%config config]
[%picture so]
[%preview bo]
[%vip vip]
==
::
++ module
++ config
|= jon=^json
^- (each term (unit (unit ^md-resource)))
^- md-config
?~ jon
[%| ~]
[%group ~]
?: ?=(%s -.jon)
[%& p.jon]
[%graph p.jon]
?> ?=(%o -.jon)
:+ %| ~
:+ %group ~
?. ?& (~(has by p.jon) 'app-name')
(~(has by p.jon) 'resource')
==

View File

@ -28,13 +28,20 @@
:: %$: No variation
::
+$ vip-metadata ?(%reader-comments %member-metadata %$)
+$ md-config
$~ [%empty ~]
$% [%group feed=(unit (unit md-resource))]
[%graph module=term]
[%empty ~]
==
::
+$ metadatum
$: title=cord
description=cord
=color
date-created=time
creator=ship
module=(each term (unit (unit md-resource)))
config=md-config
picture=url
preview=?
vip=vip-metadata