| JSON name | V1 pattern element type | visual representation |
|---|---|---|
| Start | Pattern Start | ![]() |
| Concrete | Concrete Entity | ![]() |
| Typed | Typed Entity | ![]() |
| Untyped | Untyped Entity | ![]() |
| Rel | Relationship | ![]() |
| EExpr | Entity's Expression | ![]() |
| RExpr | Relationship's Expression | ![]() |
| Quant | Quantifier | ![]() |
| Comb | Combiner | ![]() |
| Path | Path | ![]() |
| PathSeg | Path Segment | ![]() |
| HQuant | Horizontal Quantifier | ![]() |
| HComb | Horizontal Combiner | ![]() |
| A1 | A1 Aggregator | ![]() |
| A2 | A2 Aggregator | ![]() |
| A3 | A3 Aggregator | ![]() |
| M1 | M1 Aggregator | ![]() |
| M2 | M2 Aggregator | ![]() |
| M3 | M3 Aggregator | ![]() |
| R1 | R1 Aggregator | ![]() |
X - Negator
N - relationship/path negator
O - Optional 
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | schema | string | Schema name |
| + | name | string | Pattern name |
| + | elements | [...] | Elements composing the pattern |
| nonidentical | [...] | nonidenticality constraints between entity tags | |
| order | [...] | order constraints between entity tags |
JSON fields: for each pattern element:
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | elNum | int | Element number. Distinct value for each pattern element |
| + | type | string | Element type (e.g. "Start", "Concrete", "Quant") |
Additional JSON fields for pattern elements:
There must be a single element with type "Start". Its elNum must be 0.
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | next | int | elNum of next element. Valid element types: Concrete, Typed, Untyped, Quant |
| chained | int | elNum of chained element. Valid element types: A1, A3, M1, M3 |
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | eTag | string | entity tag (e.g. "A") |
| + | eID | string | Technical ID of the entity |
| + | eType | int | Entity type (e.g. of 'Person') According to the schema (eType) |
| + | eName | string | Cached display name of the entity (e.g. "Brandon Stark"). This was the display name when the pattern was stored |
| expLatent | bool | true if explicit latent (default: false) | |
| next | int | elNum of next element. Valid element types: Rel, EExpr, Quant, Path |
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | eTag | string | entity tag (e.g. "A") |
| + | eType | int | Entity type (e.g. of 'Person') According to the schema (eType) / 0 (null entity type) |
| expLatent | bool | true if explicit latent (default: false) | |
| next | int | elNum of next element. Valid element types: Rel, EExpr, Quant, Path |
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | eTag | string | entity tag (e.g. "A") |
| ett | int | entity type tag to assign (unique positive integer) | |
| valid | bool | true if etts and eTypes are lists of valid types, false if lists of invalid types (default: true) | |
| etts | [int] | non-empty list of entity type tags | |
| eTypes | [int] | non-empty list of entity types. According to the schema (eType) / 0 (null entity type) | |
| expLatent | bool | true if explicit latent (default: false) | |
| next | int | elNum of next element. Valid element types: Rel, EExpr, Quant, Path |
| Mandatory | Name | Type | Description |
|---|---|---|---|
| rType | int | Relationship type (e.g. of 'own') According to the schema (rType) either rType or [rtt] [valid] [rtts] [rTypes] |
|
| rtt | int | relationship type tag to assign (unique positive integer) | |
| + | dir | string | "-": non-directional, "O": Outgoing to next element, "I": Incoming from next element |
| valid | bool | true if rtts and rTypes are lists of valid types, false if lists of invalid types (default: true) | |
| rtts | [int] | non-empty list of relationship type tags | |
| rTypes | [int] | non-empty list of relationship types. According to the schema (rType) | |
| wrapper | string | valid wrappers: X,N,XN,O,ON | |
| + | next | int | elNum of next element. Valid element types: Concrete, Typed, Untyped, Comb |
| chained | int | elNum of chained element. Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | EAtag | int | EA tag to assign (unique positive integer) |
| + | expr | string | Entity's expression. Property types are according to the schema (pType) for untyped entity: property types should be valid for all valid (implicitly and explicitly) entity types |
| con | {...} | Constraint op: string - Constraint operator ("=" / "≠" / "∈" / "∉" / ... / "is null" / "not null") When op ≠ "is null" and op ≠ "not null": - expr: string - Constraint expression - null: bool - how to evaluate the constraint when the expression is evaluated to null (default: false - the constraint is not satisfied) |
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | EAtag | int | EA tag to assign (unique positive integer) |
| + | expr | string | Relationship's Expression. Property types are according to the schema (pType) (e.g. "$(1).$(.2)" for "tf.till" of "member of") |
| con | {...} | Constraint op: string - Constraint operator ("=" / "≠" / "∈" / "∉" / ... / "is null" / "not null") When op ≠ "is null" and op ≠ "not null": - expr: string - Constraint expression - null: bool - how to evaluate the constraint when the expression is evaluated to null (default: false - the constraint is not satisfied) |
|
| chained | int | elNum of chained element. Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | qType | string | "all"/"some"/"gt"/"ge"/"notall"/"none"/"eq"/"ne"/"lt"/"le"/"range"/"notrange" |
| qVal | int | mandatory if qType = "gt"/"ge"/"eq"/"ne"/"lt"/"le" | |
| qVal | [int] | mandatory if qType = "range"/"notrange": array [int] of two elements | |
| wrapper | string | valid wrappers: O | |
| + | next | [int] | elNum of first element in each branch (0 or more branches). Next to a sequence of Quants that is directly next to Start - Valid element types: Concrete, Typed, Untyped, Quant Otherwise - Valid element types: Rel, Path, EExpr, Quant |
| chained | int | elNum of chained element (chained to the quantifier's input) Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | next | int | elNum of next element. Valid element types: Concrete, Typed, Untyped, Comb |
| Mandatory | Name | Type | Description |
|---|---|---|---|
| rTypes | [{...}] | Relationship types and constraints For each: mandatory rType: int - Relationship type. According to the schema (rType) not mandatory dir - string - direction ("O"/"I") (see "Rel") not mandatory con: {...} - op: string, expr: string - constraint over a non-negative integer expression (number of relationships of this type [and direction] along the path) |
|
| con | {...} | Constraint for path length (positive integer) op: string - Constraint operator ("=" / "<" / "≤" / "∈" only) expr: string - Constraint expression |
|
| shortest | bool | Shortest paths only. There must either be a con field or "shortest" is true |
|
| eTypes | [{...}] | Entity types and constraints For each: mandatory eType: int - entity type. According to the schema (eType) not mandatory con: {...} - op: string, expr: string - constraint over a non-negative integer expression (number of entities of this type along the path) |
|
| wrapper | string | valid wrappers: X,N,XN,O,ON | |
| + | next | int | elNum of next element. Valid element types: Concrete, Typed, Untyped, Comb |
| chained | int | elNum of chained element. Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| todo |
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | qType | string | "some"/"gt"/"ge"/"notall"/"none"/"eq"/"ne"/"lt"/"le"/"range"/"notrange" |
| qVal | int | mandatory if qType = "gt"/"ge"/"eq"/"ne"/"lt"/"le" | |
| qVal | [int] | mandatory if qType = "range"/"notrange": array [int] of two elements | |
| + | chained | [int] | elNum of first element in each branch (0 or more branches). Valid element types: RExpr, HQuant |
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | chained | int | elNum of chained element. Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | EAtag | int | EA tag to assign (unique positive integer) |
| per | {...} | elements composing the per clause: eTags: [string] - one or more entity tags (e.g. "A", "B") or a single string: "<", ">" or "<>" (for ←,→,↔) exprs: [string] expressions (e.g. "$(1).$(.1).date"). Property types are according to the schema (pType) etts: [int] - entity type tags (e.g. 1 for "⟨1⟩") rtts: [int] - relationship type tags (e.g. 1 for "⟪1⟫") |
|
| + | eTags | [[string]] | entity tags in the "et × et × ... ∪ ..." clause (union of Cartesian products), or a single clause of a single string: "<", ">" or "<>" (for ←,→,↔) |
| con | {...} | Constraint over non-negative integer expression op: string - Constraint operator ("=" / "≠" / "∈" / "∉" / ...) expr: string - Constraint expression |
|
| chained | int | elNum of chained element. Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | EAtag | int | EA tag to assign (unique positive integer) |
| per | {...} | elements composing the per clause: eTags: [string] - one or more entity tags (e.g. "A", "B") or a single string: "<", ">" or "<>" (for ←,→,↔) exprs: [string] expressions (e.g. "$(1).$(.1).date"). Property types are according to the schema (pType) etts: [int] - entity type tags (e.g. 1 for "⟨1⟩") rtts: [int] - relationship type tags (e.g. 1 for "⟪1⟫") |
|
| con | {...} | Constraint over non-negative integer expression op: string - Constraint operator ("=" / "≠" / "∈" / "∉" / ...) expr: string - Constraint expression |
|
| chained | int | elNum of chained element. Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| + | EAtag | int | EA tag to assign (unique positive integer) |
| per | {...} | elements composing the per clause: eTags: [string] - one or more entity tags (e.g. "A", "B") or a single string: "<", ">" or "<>" (for ←,→,↔) exprs: [string] expressions (e.g. "$(1).$(.1).date"). . Property types are according to the schema (pType) etts: [int] - entity type tags (e.g. 1 for "⟨1⟩") rtts: [int] - relationship type tags (e.g. 1 for "⟪1⟫") |
|
| + | aggOp | string | aggregation operator: min/max/avg/sum/distinct/set/bag/union/intersection |
| + | expr | string | expression to aggregate. Property types are according to the schema (pType) (e.g. "$(1).$(.2)" for "tf.till" of "member of") |
| con | {...} | Constraint op: string - Constraint operator ("=" / "≠" / "∈" / "∉" / ... / "is null" / "not null") When op ≠ "is null" and op ≠ "not null": - expr: string - Constraint expression - null: bool - how to evaluate the constraint when the expression is evaluated to null (default: false - the constraint is not satisfied) |
|
| chained | int | elNum of chained element. Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| per | {...} | elements composing the per clause: eTags: [string] - one or more entity tags (e.g. "A", "B") or a single string: "<", ">" or "<>" (for ←,→,↔) exprs: [string] expressions (e.g. "$(1).$(.1).date") etts: [int] - entity type tags (e.g. 1 for "⟨1⟩") rtts: [int] - relationship type tags (e.g. 1 for "⟪1⟫") |
|
| + | k | int | number of min/max entities. negative value means "all but ..." |
| + | els | {...} | elements composing the '[all but] k ...' clause: at least one of the following: eTags: [string] - one or more entity tags (e.g. "A", "B") or a single string: "<", ">" or "<>" (for ←,→,↔) exprs: [string] - one or more expressions (e.g. "$(1).$(.1).date") etts: [int] - on or more entity type tags (e.g. 1 for "⟨1⟩") rtts: [int] - on or more relationship type tags (e.g. 1 for "⟪1⟫") |
| + | op | string | min/max |
| + | eTags | [[string]] | entity tags in the 'with min/max et × et × ... ∪ ..." clause (union of Cartesian products), or a single clause of a single string: "<", ">" or "<>" (for ←,→,↔) |
| chained | int | elNum of chained element. Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| per | {...} | elements composing the per clause: eTags: [string] - one or more entity tags (e.g. "A", "B") or a single string: "<", ">" or "<>" (for ←,→,↔) exprs: [string] expressions (e.g. "$(1).$(.1).date") etts: [int] - entity type tags (e.g. 1 for "⟨1⟩") rtts: [int] - relationship type tags (e.g. 1 for "⟪1⟫") |
|
| + | k | int | number of min/max entities. negative value means "all but ..." |
| + | els | {...} | elements composing the '[all but] k ...' clause: at least one of the following: eTags: [string] - one or more entity tags (e.g. "A", "B") or a single string: "<", ">" or "<>" (for ←,→,↔) exprs: [string] - one or more expressions (e.g. "$(1).$(.1).date") etts: [int] - on or more entity type tags (e.g. 1 for "⟨1⟩") rtts: [int] - on or more relationship type tags (e.g. 1 for "⟪1⟫") |
| + | op | string | min/max |
| chained | int | elNum of chained element. Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| per | {...} | elements composing the per clause: eTags: [string] - one or more entity tags (e.g. "A", "B") or a single string: "<", ">" or "<>" (for ←,→,↔) exprs: [string] expressions (e.g. "$(1).$(.1).date") etts: [int] - entity type tags (e.g. 1 for "⟨1⟩") rtts: [int] - relationship type tags (e.g. 1 for "⟪1⟫") |
|
| + | k | int | number of min/max entities. negative value means "all but ..." |
| + | els | {...} | elements composing the '[all but] k ...' clause: at least one of the following: eTags: [string] - one or more entity tags (e.g. "A", "B") or a single string: "<", ">" or "<>" (for ←,→,↔) exprs: [string] - one or more expressions (e.g. "$(1).$(.1).date") etts: [int] - on or more entity type tags (e.g. 1 for "⟨1⟩") rtts: [int] - on or more relationship type tags (e.g. 1 for "⟪1⟫") |
| + | op | string | min/max |
| + | expr | string | expression to aggregate. Property types are according to the schema (pType) (e.g. "$(1).$(.2)" for "tf.till" of "member of") |
| chained | int | elNum of chained element. Valid element types:
|
| Mandatory | Name | Type | Description |
|---|---|---|---|
| per | {...} | elements composing the per clause: eTags: [string] - one or more entity tags (e.g. "A", "B") or a single string: "<", ">" or "<>" (for ←,→,↔) exprs: [string] expressions (e.g. "$(1).$(.1).date") etts: [int] - entity type tags (e.g. 1 for "⟨1⟩") rtts: [int] - relationship type tags (e.g. 1 for "⟪1⟫") |
|
| + | k | int | number of min/max entities. negative value means "all but ..." |
| + | op | string | min/max |
| + | expr | string | Relationship's Expression. Property types are according to the schema (pType) (e.g. "$(1).$(.2)" for "tf.till" of "member of") |
| chained | int | elNum of chained element. Valid element types:
|
The following snippet demonstrates nonidenticality constraints between entity tags "C≠E" and "C≠F":
"nonidentical": [ ["C", "E"] ["C", "F"] ]
The following snippet demonstrates order constraints between entity tags "C<E" and "C<F":
"order": [ ["C", "E"] ["C", "F"] ]
| References | Examples |
|---|---|
| EA tag | ${n} represents EA tag n. To differentiate from "{n}" - a set of one element |
| (sub)property | $(n) represents property n of the attached entity/relationship. $(.n) represents subproperty n of the last referred [sub]property. |
| categorical value | #color(2) - second value of the categorical type 'color' |



















