hydra-kernel-0.18.1: hydra-kernel-json/hydra/core/query.json
{
"name": "hydra.core.query",
"metadata": {"description": "A model for language-agnostic graph pattern queries", "comments": [], "seeAlso": [], "provisions": []},
"dependencies": [{"module": "hydra.core.model"}],
"definitions": [
{
"type": {
"name": "hydra.core.query.ComparisonConstraint",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"union": [
{"name": "equal", "type": "unit"},
{"name": "notEqual", "type": "unit"},
{"name": "lessThan", "type": "unit"},
{"name": "greaterThan", "type": "unit"},
{"name": "lessThanOrEqual", "type": "unit"},
{"name": "greaterThanOrEqual", "type": "unit"}]},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "One of several comparison operators"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.Edge",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "type",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Name"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The name of a record type, for which the edge also specifies an out- and an in- projection"}}}]}}}},
{
"name": "out",
"type": {
"annotated": {
"body": {"optional": {"variable": "hydra.core.model.Name"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The field representing the out-projection of the edge. Defaults to 'out'."}}}]}}}},
{
"name": "in",
"type": {
"annotated": {
"body": {"optional": {"variable": "hydra.core.model.Name"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The field representing the in-projection of the edge. Defaults to 'in'."}}}]}}}}]},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "An abstract edge based on a record type"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.GraphPattern",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "graph",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Name"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The name of the component graph"}}}]}}}},
{
"name": "patterns",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.query.Pattern"}},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The patterns to match within the subgraph"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A query pattern which matches within a designated component subgraph"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.Node",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"union": [
{
"name": "term",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Term"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A graph term; an expression which is valid in the graph being matched"}}}]}}}},
{
"name": "variable",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Variable"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A query variable, not to be confused with a variable term"}}}]}}}},
{
"name": "wildcard",
"type": {
"annotated": {
"body": "unit",
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "An anonymous variable which we do not care to join across patterns"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A node in a query expression; it may be a term, a variable, or a wildcard"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.Path",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"union": [
{
"name": "step",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Step"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A path given by a single step"}}}]}}}},
{
"name": "regex",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.RegexSequence"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A path given by a regular expression quantifier applied to another path"}}}]}}}},
{
"name": "inverse",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Path"},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A path given by the inverse of another path"}}}]}}}}]},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A query path"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.PathEquation",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "left",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Path"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The left-hand side of the equation"}}}]}}}},
{
"name": "right",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Path"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The right-hand side of the equation"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A declared equivalence between two abstract paths in a graph"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.Pattern",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"union": [
{
"name": "triple",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.TriplePattern"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A subject/predicate/object pattern"}}}]}}}},
{
"name": "negation",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Pattern"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The negation of another pattern"}}}]}}}},
{
"name": "conjunction",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.query.Pattern"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The conjunction ('and') of several other patterns"}}}]}}}},
{
"name": "disjunction",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.query.Pattern"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The disjunction (inclusive 'or') of several other patterns"}}}]}}}},
{
"name": "graph",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.GraphPattern"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A pattern which matches within a named subgraph"}}}]}}}}]},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A query pattern"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.PatternImplication",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "antecedent",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Pattern"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The pattern which, if it matches, triggers the constraint"}}}]}}}},
{
"name": "consequent",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Pattern"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The pattern which must also match when the antecedent matches"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "A pattern which, if it matches in a given graph, implies that another pattern must also match. Query variables are shared between the two patterns."}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.Query",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "variables",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.query.Variable"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The variables selected by the query"}}}]}}}},
{
"name": "patterns",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.query.Pattern"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The patterns to be matched"}}}]}}}}]},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A SELECT-style graph pattern matching query"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.Range",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "min",
"type": {
"annotated": {
"body": {"literal": {"integer": "int32"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The minimum value (inclusive)"}}}]}}}},
{
"name": "max",
"type": {
"annotated": {
"body": {"literal": {"integer": "int32"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The maximum value (inclusive)"}}}]}}}}]},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A range from min to max, inclusive"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.RegexQuantifier",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"union": [
{
"name": "one",
"type": {
"annotated": {
"body": "unit",
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "No quantifier; matches a single occurrence"}}}]}}}},
{
"name": "zeroOrOne",
"type": {
"annotated": {
"body": "unit",
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The ? quanifier; matches zero or one occurrence"}}}]}}}},
{
"name": "zeroOrMore",
"type": {
"annotated": {
"body": "unit",
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The * quantifier; matches any number of occurrences"}}}]}}}},
{
"name": "oneOrMore",
"type": {
"annotated": {
"body": "unit",
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The + quantifier; matches one or more occurrences"}}}]}}}},
{
"name": "exactly",
"type": {
"annotated": {
"body": {"literal": {"integer": "int32"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The {n} quantifier; matches exactly n occurrences"}}}]}}}},
{
"name": "atLeast",
"type": {
"annotated": {
"body": {"literal": {"integer": "int32"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The {n,} quantifier; matches at least n occurrences"}}}]}}}},
{
"name": "range",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Range"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The {n, m} quantifier; matches between n and m (inclusive) occurrences"}}}]}}}}]},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A regular expression quantifier"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.RegexSequence",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "path",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Path"},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The path to which the quantifier applies"}}}]}}}},
{
"name": "quantifier",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.RegexQuantifier"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The quantifier"}}}]}}}}]},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A path with a regex quantifier"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.Step",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"union": [
{
"name": "edge",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Edge"},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "An out-to-in traversal of an abstract edge"}}}]}}}},
{
"name": "project",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Projection"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A projection from a record through one of its fields"}}}]}}}},
{
"name": "compare",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.ComparisonConstraint"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A comparison of two terms"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {"string": "An atomic function as part of a query. When applied to a graph, steps are typed by function types."}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.TriplePattern",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "subject",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Node"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The subject of the pattern"}}}]}}}},
{
"name": "predicate",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Path"},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The predicate (property) of the pattern"}}}]}}}},
{
"name": "object",
"type": {
"annotated": {
"body": {"variable": "hydra.core.query.Node"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The object of the pattern"}}}]}}}}]},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A subject/predicate/object pattern"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.query.Variable",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {"wrap": {"literal": "string"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A query variable"}}}]}}},
"constraints": []}}}]}