Skip to content

Latest commit

 

History

History
68 lines (40 loc) · 2.79 KB

Doc_Graph_As_Lists.adoc

File metadata and controls

68 lines (40 loc) · 2.79 KB

Model Agt Frame

This presents a first sketch of a data model that incorporates the "CONS" notion from Lisp with a graph, so that every edit is an additional list item tacked on to the front of an existing list. It is very likely not the right way to do this, but may show a more skilled person what is desired.

CREATE (SpanF1:Span {title:'Agt.Body' ,value:'{Agt.Prologue}<ol><li>{Agt.Secs}</li></ol>{Agt.Sign}</br>{Agt.Attach}'})

CREATE (SpanF2:Span {title:'Agt.Secs' ,value:'<ol><li>{Sec.Def}</li><li>{Sec.Deal}</li><li>{Sec.Term}</li><li>{Sec.Misc}</li></ol>'})
CREATE (SpanF2) -[:Extends]->(SpanF1)

CREATE (SpanF3:Span {title:'Misc.Sec' ,value:'<u>{Misc.Title}</u>. <ol><li>{Misc.Notice.Sec}</li><li>{Misc.Law.Sec}</li><li>{Misc.Forum.Sec}</li><li>{Misc.Entire.Sec}</li></ol>', extends:'Span2'})
CREATE (SpanF3) -[:Extends]->(SpanF2)

CREATE (SpanF4:Span {title:'Misc.Law.Sec' , value:'<u>Law</u>.  This agreement and any dispute relating to it shall be governed by the law of {Dispute.State.the}.'})
CREATE (SpanF4) -[:Extends]->(SpanF3)

CREATE (SpanF5:Span {title:'Prologue' , value:'{P1.ID} and {P2.ID} hereby agree'})
CREATE (SpanF5) -[:Extends]->(SpanF4)


CREATE (SpanA1:Span {title:'(form)'})
CREATE (SpanA1) -[:UsesList]->(SpanF5)

CREATE (SpanA2:Span {title:'P1.ID' , value:'Acme Inc., a Delaware corporation'})
CREATE (SpanA2) -[:Extends]->(SpanA1)


CREATE (SpanF6:Span {title:'Misc.Law.Sec' , value:'<u>Applicable Law</u>.  This Agreement and all disputes relating to it and the transactions contemplated by it are subject to {Dispute.State} law.'})
CREATE (SpanF6) -[:Extends]->(SpanF5)

CREATE (SpanA3:Span {title:'(form)'})
CREATE (SpanA3) -[:Extends]->(SpanA2)
CREATE (SpanA3) -[:UsesList]->(SpanF6)


WITH SpanA3
MATCH (k)<-[]-()
RETURN k.title as Key, k.value as Value

Overview

The idea is to implement in a graph the list data model that is used in http://a.commonaccord.org/mediawiki/index.php/Main_Page and deepened in some of the links referenced at http://beta.commonaccord.org.

A list of key/values, where the value is either a span of html or the name of another list.

A list can be understood as in Lisp - an item that prepends a shorter list, recursively. That allows each bit of work to be separately recorded.

Notes

On reflection, the "UsesList" relationship notion seems incorrect. The relationship creates a direct binding between (SpanA3) -[]→ (SpanF6). Instead of this kind of inline linking, it is better to use indirect linking. So (SpanA3) would declare as a string the name or GUID of (SpanF6), and that would be resolved in an index. This would be consistent with how the keys for spans of text are resolved. Needs a bit of thought.