expexp
Version:
The express model io and express model and data representation.
804 lines (801 loc) • 19.5 kB
JSON
{
"schemaId":"USER_AND_RELATED_SCHEMA",
"types":[
"units/TpRealBacked",
"units/TpBinaryBacked",
"units/TpBooleanBacked",
"units/TpLogicalBacked",
"units/TpIntegerGreaterThanZero",
{
"t": "type",
"id": "TpInt",
"spec": { "t": "integer" },
"wheres":[]
},
"units/TpNumberBacked",
"units/TpDate",
"units/TpGuid",
"units/TpIdent",
"units/TpLabel",
"units/TpText",
"units/TpCompass",
"units/TpThingSet",
{
"t": "type",
"id": "TpPhoneType",
"spec": {
"t": "enum",
"values": [
{"t": "eval","id": "FAX"},
{"t": "eval","id": "PHONE"},
{"t": "eval","id": "MOBILE"},
{"t": "eval","id": "OTHER"}
]
},
"wheres":[]
},
"units/TpDirection",
"units/TpTotallyMixedSomething",
{
"t": "type",
"id": "TpHiddenMixedSomething",
"spec": {
"t":"type_ref",
"id":"TpLegalPerson"
},
"wheres":[]
},
{
"t": "type",
"id": "TpActionType",
"spec": {
"t": "enum",
"values": [
{"t": "eval","id": "LEAD"},
{"t": "eval","id": "OPERATE"},
{"t": "eval","id": "HELP"},
{"t": "eval","id": "SPONSOR"},
{"t": "eval","id": "DIVERSE"}
]
},
"wheres":[]
},
{
"t": "type",
"id": "TpLegalPerson",
"spec": {
"t": "select",
"refs": [
{"t":"entity_ref", "id":"NttOrganisation"},
{"t":"entity_ref", "id":"NttPerson"},
{"t":"entity_ref", "id":"NttOccupation"}
]
},
"wheres":[]
}
],
"entities":[
{
"t": "entity",
"id": "NttAction",
"super": {"t":"not_set"},
"abs": false,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"acType"}],
"opt":false,
"type":{"t":"type_ref", "id":"TpActionType"}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"otherType"}],
"opt":true,
"type":{"t":"type_ref", "id":"TpLabel"}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"desc"}],
"opt":true,
"type":{"t":"type_ref", "id":"TpText"}
}
],
"derives": [],
"uniques": [],
"inverses": [],
"wheres":[{
"t":"where",
"id":"predefinedOrOtherType",
"expr":{
"t":"expr",
"arg0":[
[{
"t":"factor",
"arg0":{
"t":"parenthesis",
"expr":{
"t":"expr",
"arg0":[[{"arg0":{"id":"acType","t":"var_ref"},"arg1":null,"quals0":[],"quals1":null,"t":"factor"}]],
"op":{"id":"ne","t":"relopext"},
"arg1":[[{
"t":"factor",
"arg0":{"id":"TpActionType","t":"type_ref"},
"quals0":[{"id":"DIVERSE","t":"enum_value"}],
"arg1":null,
"quals1":null
}]]
}
},
"quals0":[],
"arg1":null,
"quals1":null
}],
{"id":"or","t":"addlikeop"},
[{
"t":"factor",
"arg0":{
"t":"parenthesis",
"expr":{
"t":"expr",
"arg0":[[
{
"t":"factor",
"arg0":{
"t":"parenthesis",
"expr":{
"t":"expr",
"arg0":[[{"arg0":{"id":"acType","t":"var_ref"},"arg1":null,"quals0":[],"quals1":null,"t":"factor"}]],
"op":{"id":"eq","t":"relopext"},
"arg1":[[{"arg0":{"id":"TpActionType","t":"type_ref"},"arg1":null,"quals0":[{"id":"DIVERSE","t":"enum_value"}],"quals1":null,"t":"factor"}]]
}
},
"quals0":[],
"arg1":null,
"quals1":null
},
{"id":"and","t":"multlikeop"},
{"arg0":{"id":"exists","t":"bifct","values":[{"arg0":[[{"arg0":{"id":"self","t":"biconst"},"arg1":null,"quals0":[{"id":"otherType","t":"attr_ref"}],"quals1":null,"t":"factor"}]],"arg1":null,"op":null,"t":"expr"}]},"arg1":null,"quals0":[],"quals1":null,"t":"factor"},
{"id":"and","t":"multlikeop"},
{
"t":"factor",
"arg0":{
"t":"parenthesis",
"expr":{
"t":"expr",
"arg0":[[{
"t":"factor",
"arg0":{"t":"integer","value":0},
"quals0":[],
"arg1":null,
"quals1":null
}]],
"op":{"id":"lt","t":"relopext"},
"arg1":[[{
"arg0":{"id":"length","t":"bifct","values":[{"arg0":[[{"arg0":{"id":"self","t":"biconst"},"arg1":null,"quals0":[{"id":"otherType","t":"attr_ref"}],"quals1":null,"t":"factor"}]],"arg1":null,"op":null,"t":"expr"}]},"arg1":null,"quals0":[],"quals1":null,"t":"factor"
}]]
}
},
"arg1":null,
"quals0":[],
"quals1":null
}
]],
"op":null,
"arg1":null
}
},
"quals0":[],
"arg1":null,
"quals1":null
}]
],
"op":null,
"arg1":null
}
}]
},
{
"t": "entity",
"id": "NttOccupation",
"super": {"t":"not_set"},
"abs": false,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"who"}],
"opt":false,
"type":{"t":"entity_ref", "id":"NttPerson"}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"inWhat"}],
"opt":false,
"type":{"t":"entity_ref", "id":"NttOrganisation"}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"doing"}],
"opt":true,
"type":{
"t":"set",
"bounds":{"t":"bounds","from":[[{ "t":"factor", "arg0":{"t":"integer", "value":1}, "quals0":[], "arg1":null, "quals1":null }]],"to":[]},
"spec":{"t":"entity_ref", "id":"NttAction"}
}
}
],
"derives": [],
"uniques": [],
"inverses": [],
"wheres":[]
},
"units/NttPerson",
"units/NttOrganisation",
{
"t":"entity",
"id":"NttTeam",
"super":{"t":"not_set"},
"abs":false,
"attrs":[
{
"t":"attr",
"ids":[{"id":"name","t":"attr_id"}],
"opt":false,
"type":{"id":"TpLabel","t":"type_ref"}
},
{
"t":"attr",
"ids":[{"id":"org","t":"attr_id"}],
"opt":false,
"type":{"id":"NttOrganisation","t":"entity_ref"}
},
{
"t":"attr",
"ids":[{"id":"members","t":"attr_id"}],
"opt":false,
"type":{
"t":"list",
"bounds":{
"t":"bounds",
"from":[[{"arg0":{"t":"integer","value":1},"arg1":null,"quals0":[],"quals1":null,"t":"factor"}]],
"to":[]
},
"spec":{"id":"NttPerson","t":"entity_ref"},
"unique":false
}
}
],
"derives":[
{
"t":"derive",
"id":{"id":"leader","t":"attr_id"},
"expr":{
"t":"expr",
"arg0":[[{
"t":"factor",
"arg0":{"id":"members","t":"var_ref"},
"quals0":[{
"t":"idx_qual",
"idxStart":[[{"arg0":{"t":"integer","value":1},"arg1":null,"quals0":[],"quals1":null,"t":"factor"}]],
"idxEnd":[]
}],
"arg1":null,
"quals1":null
}]],
"op":null,
"arg1":null
},
"type":{"id":"NttPerson","t":"entity_ref"}
}
],
"inverses":[],
"uniques":[],
"wheres":[]
},
{
"t": "entity",
"id": "NttRoot",
"super": {"t":"not_set"},
"abs": true,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"id"}],
"opt":false,
"type":{"t":"type_ref", "id":"TpIdent"}
}
],
"derives": [],
"uniques": [],
"inverses": [],
"wheres":[]
},
"units/NttBase",
{
"t": "entity",
"id": "NttThing",
"super": {"t":"entity_ref", "id":"NttBase"},
"abs": false,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"desc"}],
"opt":true,
"type":{"t":"type_ref", "id":"TpText"}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"isGood"}],
"opt":false,
"type":{"t":"type_ref", "id":"TpLogicalBacked"}
}
],
"derives": [],
"uniques": [],
"inverses": [],
"wheres":[]
},
{
"t": "entity",
"id": "NttDevice",
"super": {"t":"entity_ref", "id":"NttThing"},
"abs": false,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"nofParts"}],
"opt":false,
"type":{"t":"type_ref", "id":"TpIntegerGreaterThanZero"}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"isOn"}],
"opt":false,
"type":{"t":"type_ref", "id":"TpBooleanBacked"}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"direction"}],
"opt":false,
"type":{"t":"type_ref", "id":"TpCompass"}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"velocity"}],
"opt":false,
"type":{"t":"type_ref", "id":"TpNumberBacked"}
}
],
"derives": [
{
"t":"derive",
"id": {
"t":"qual_attr", "varId":"self",
"nttRef": {"t":"entity_ref", "id":"NttThing"},
"id":"isGood"
},
"type":{"t":"type_ref", "id":"TpLogicalBacked"},
"expr":{
"t":"expr",
"arg0":[[
{
"t":"factor",
"arg0":{
"t":"type_inst",
"id":"TpLogicalBacked",
"values":[
{
"t":"expr",
"arg0":[[
{
"t":"factor",
"arg0":{"id":"true","t":"biconst"},
"quals0":[],
"arg1":null,
"quals1":null
}
]],
"op":null,
"arg1":null
}
]
},
"quals0":[],
"arg1":null,
"quals1":null
}
]],
"op":null,
"arg1":null
}
}
],
"uniques": [],
"inverses": [],
"wheres":[]
},
"units/NttSoftware",
{
"t": "entity",
"id": "NttRelates",
"super": {"t":"not_set"},
"abs": true,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"ones"}],
"opt":false,
"type":{
"t":"set",
"bounds":{"t":"bounds","from":[[{ "t":"factor", "arg0":{"t":"integer", "value":1}, "quals0":[], "arg1":null, "quals1":null }]],"to":[]},
"spec":{"t":"entity_ref", "id":"NttBase"}
}
}
],
"derives": [],
"uniques": [],
"inverses": [],
"wheres":[]
},
{
"t": "entity",
"id": "NttRelCreates",
"super": {"t":"entity_ref", "id":"NttRelates"},
"abs": false,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"creator"}],
"opt":false,
"type":{"t":"entity_ref", "id":"NttPerson"}
}
],
"derives": [],
"uniques": [],
"inverses": [],
"wheres":[]
},
{
"t": "entity",
"id": "NttRelOwns",
"super": {"t":"entity_ref", "id":"NttRelates"},
"abs": false,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"owner"}],
"opt":false,
"type":{"t":"entity_ref", "id":"NttOrganisation"}
}
],
"derives": [],
"uniques": [],
"inverses": [],
"wheres":[]
},
{
"t": "entity",
"id": "NttRelInvites",
"super": {"t":"not_set"},
"abs": false,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"host"}],
"opt":false,
"type":{"t":"entity_ref", "id":"NttPerson"}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"guests"}],
"opt":false,
"type":{
"t":"set",
"bounds":{"t":"bounds","from":[[{ "t":"factor", "arg0":{"t":"integer", "value":1}, "quals0":[], "arg1":null, "quals1":null }]],"to":[]},
"spec":{"t":"entity_ref", "id":"NttPerson"}
}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"date"}],
"opt":true,
"type":{"t":"type_ref", "id":"TpDate"}
}
],
"derives": [],
"uniques": [],
"inverses": [],
"wheres":[
{
"t":"where",
"id":"avoidSelfInvitation",
"expr":{
"t":"expr",
"arg0":[[{
"t":"factor",
"arg0":{
"id":"sizeof",
"t":"bifct",
"values":[{
"arg0":[[{
"t":"factor",
"arg0":{
"t":"query",
"var":"p",
"src":[[{
"t":"factor",
"arg0":{"t":"var_ref", "id":"guests"},
"quals0":[],
"arg1":null,
"quals1":null
}]],
"cond":{
"t":"expr",
"arg0":[[{
"t":"factor",
"arg0":{"t":"var_ref", "id":"host"},
"quals0":[],
"arg1":null,
"quals1":null
}]],
"op":{"t":"relopext", "id":"seq"},
"arg1":[[{
"t":"factor",
"arg0":{"id":"p","t":"var_ref"},
"quals0":[],
"arg1":null,
"quals1":null
}]]
}
},
"quals0":[],
"arg1":null,
"quals1":null
}]],
"op":null,
"arg1":null,
"t":"expr"
}]
},
"quals0":[],
"arg1":null,
"quals1":null
}]],
"op":{"id":"eq","t":"relopext"},
"arg1":[[{
"t":"factor",
"arg0":{"t":"integer", "value":0},
"quals0":[],
"arg1":null,
"quals1":null
}]]
}
}
]
},
{
"t": "entity",
"id": "NttWithTotallyMixedSomething",
"super": {"t":"not_set"},
"abs": false,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"choice"}],
"opt":false,
"type":{"t":"type_ref", "id":"TpTotallyMixedSomething"}
}
],
"derives": [],
"uniques": [],
"inverses": [],
"wheres":[]
},
{
"t": "entity",
"id": "NttWithOptionalTotallyMixedSomething",
"super": {"t":"not_set"},
"abs": false,
"attrs": [
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"choice"}],
"opt":true,
"type":{"t":"type_ref", "id":"TpTotallyMixedSomething"}
},
{
"t":"attr",
"ids":[{"t":"attr_id", "id":"noneOpt"}],
"opt":false,
"type":{"t":"boolean"}
}
],
"derives": [],
"uniques": [],
"inverses": [],
"wheres":[]
},
{
"t": "entity",
"id": "NttRandomGenerator",
"super": {"t":"not_set"},
"abs": false,
"attrs": [],
"derives": [
{
"t":"derive",
"id": {"t":"attr_id", "id":"val"},
"type":{"t":"integer"},
"expr":{
"t":"expr",
"arg0":[[
{"t":"factor", "arg0":{"t":"integer","value":0}, "quals0":[],"arg1":null, "quals1":null}
]],
"op":null,
"arg1":null
}
}
],
"uniques": [],
"inverses": [],
"wheres":[]
}
],
"functions":[
],
"procedures":[
],
"verySimpleTypes":[
{"id":"TpBinaryBacked","value":7},
{"id":"TpBooleanBacked","value":false},
{"id":"TpInt","value":55},
{"id":"TpNumberBacked","value":66},
{"id":"TpRealBacked","value":-3.234e4}
],
"typeInheritChains":[
["TpLabel", "TpCompass"]
],
"entityInheritChains":[
["NttRoot", "NttBase", "NttThing", "NttDevice"],
["NttRoot", "NttBase", "NttThing"],
["NttRoot", "NttBase", "NttSoftware"],
["NttRelates", "NttRelCreates"],
["NttRelates", "NttRelOwns"]
],
"enitiyCompleteAttrs":[
{"id":"NttDevice", "attrGrps":[
{"nttRef":"NttRoot", "attrs":["id"]},
{"nttRef":"NttBase", "attrs":["guid", "name"]},
{"nttRef":"NttThing", "attrs":["desc"]},
{"nttRef":"NttDevice", "attrs":["nofParts", "isOn", "direction", "velocity", "isGood"]}
]},
{"id":"NttThing", "attrGrps":[
{"nttRef":"NttRoot", "attrs":["id"]},
{"nttRef":"NttBase", "attrs":["guid", "name"]},
{"nttRef":"NttThing", "attrs":["desc", "isGood"]}
]},
{"id":"NttSoftware", "attrGrps":[
{"nttRef":"NttRoot", "attrs":["id"]},
{"nttRef":"NttBase", "attrs":["guid", "name"]},
{"nttRef":"NttSoftware", "attrs":["version", "code", "size"]}
]},
{"id":"NttRelCreates", "attrGrps":[
{"nttRef":"NttRelates", "attrs":["ones"]},
{"nttRef":"NttRelCreates", "attrs":["creator"]}
]},
{"id":"NttRelOwns", "attrGrps":[
{"nttRef":"NttRelates", "attrs":["ones"]},
{"nttRef":"NttRelOwns", "attrs":["owner"]}
]}
],
"entityEvalOrders":[
{"id":"NttWithTotallyMixedSomething", "order":[
{"t":"attr", "ids":["choice"]}
]},
{"id":"NttWithOptionalTotallyMixedSomething", "order":[
{"t":"attr", "ids":["choice"]},
{"t":"attr", "ids":["noneOpt"]}
]},
{"id":"NttAction", "order":[
{"t":"attr", "ids":["acType"]},
{"t":"attr", "ids":["desc"]},
{"t":"attr", "ids":["otherType"]},
{"t":"where", "id":"predefinedOrOtherType"}
]},
{"id":"NttOccupation", "order":[
{"t":"attr", "ids":["doing"]},
{"t":"attr", "ids":["inWhat"]},
{"t":"attr", "ids":["who"]}
]},
{"id":"NttPerson", "order":[
{"t":"attr", "ids":["birthDate"]},
{"t":"inverse", "id":"creates"},
{"t":"attr", "ids":["firstName"]},
{"t":"inverse", "id":"invites"},
{"t":"inverse", "id":"isInvited"},
{"t":"attr", "ids":["lastName"]},
{"t":"attr", "ids":["middleNames"]},
{"t":"attr", "ids":["phone"]},
{"t":"attr", "ids":["phoneType"]},
{"t":"attr", "ids":["phoneTypeOther"]},
{"t":"inverse", "id":"teams"},
{"t":"where", "id":"isNamed"},
{"t":"where", "id":"phoneTypeOtherDescribed"},
{"t":"where", "id":"phoneTypeWhenPhoneSet"}
]},
{"id":"NttOrganisation", "order":[
{"t":"derive", "id":"aimlessOccupations"},
{"t":"attr", "ids":["desc"]},
{"t":"attr", "ids":["name"]},
{"t":"inverse", "id":"owns"},
{"t":"inverse", "id":"teams"},
{"t":"derive", "id":"isInSoftwareBusiness"},
{"t":"derive", "id":"randomProduct"}
]},
{"id":"NttTeam", "order":[
{"t":"attr", "ids":["members"]},
{"t":"attr", "ids":["name"]},
{"t":"attr", "ids":["org"]},
{"t":"derive", "id":"leader"}
]},
{"id":"NttRoot", "order":[
{"t":"attr", "ids":["id"]}
]},
{"id":"NttBase", "order":[
{"t":"attr", "ids":["guid"]},
{"t":"attr", "ids":["id"]},
{"t":"inverse", "id":"isRelatedBy"},
{"t":"attr", "ids":["name"]}
]},
{"id":"NttSoftware", "order":[
{"t":"attr", "ids":["code"]},
{"t":"attr", "ids":["guid"]},
{"t":"attr", "ids":["id"]},
{"t":"inverse", "id":"isRelatedBy"},
{"t":"attr", "ids":["name"]},
{"t":"attr", "ids":["version"]},
{"t":"derive", "id":"size"}
]},
{"id":"NttThing", "order":[
{"t":"attr", "ids":["desc"]},
{"t":"attr", "ids":["guid"]},
{"t":"attr", "ids":["id"]},
{"t":"attr", "ids":["isGood"]},
{"t":"inverse", "id":"isRelatedBy"},
{"t":"attr", "ids":["name"]}
]},
{"id":"NttDevice", "order":[
{"t":"attr", "ids":["desc"]},
{"t":"attr", "ids":["direction"]},
{"t":"attr", "ids":["guid"]},
{"t":"attr", "ids":["id"]},
{"t":"derive", "id":"isGood"},
{"t":"attr", "ids":["isOn"]},
{"t":"inverse", "id":"isRelatedBy"},
{"t":"attr", "ids":["name"]},
{"t":"attr", "ids":["nofParts"]},
{"t":"attr", "ids":["velocity"]}
]},
{"id":"NttRelates", "order":[
{"t":"attr", "ids":["ones"]}
]},
{"id":"NttRelCreates", "order":[
{"t":"attr", "ids":["creator"]},
{"t":"attr", "ids":["ones"]}
]},
{"id":"NttRelOwns", "order":[
{"t":"attr", "ids":["ones"]},
{"t":"attr", "ids":["owner"]}
]},
{"id":"NttRelInvites", "order":[
{"t":"attr", "ids":["date"]},
{"t":"attr", "ids":["guests"]},
{"t":"attr", "ids":["host"]},
{"t":"where", "id":"avoidSelfInvitation"}
]},
{"id":"NttRandomGenerator", "order":[
{"t":"derive", "id":"val"}
]}
],
"functionEvalOrders":[],
"procedureEvalOrders":[]
}