noctis.repository.neo4j.neo4j_queries.GetPathsThroughIntermediates

pydantic model noctis.repository.neo4j.neo4j_queries.GetPathsThroughIntermediates[source]

Query to get paths which start with start node and go through provided intermediate nodes

Show JSON schema
{
   "title": "GetPathsThroughIntermediates",
   "description": "Query to get paths which start with start node and go through provided intermediate nodes",
   "type": "object",
   "properties": {
      "query": {
         "default": null,
         "items": {
            "type": "string"
         },
         "title": "Query",
         "type": "array"
      },
      "graph_schema": {
         "anyOf": [
            {
               "$ref": "#/$defs/GraphSchema"
            },
            {
               "type": "null"
            }
         ],
         "default": {
            "base_nodes": {
               "chemical_equation": "ChemicalEquation",
               "molecule": "Molecule"
            },
            "base_relationships": {
               "product": {
                  "end_node": "molecule",
                  "start_node": "chemical_equation",
                  "type": "PRODUCT"
               },
               "reactant": {
                  "end_node": "chemical_equation",
                  "start_node": "molecule",
                  "type": "REACTANT"
               }
            },
            "extra_nodes": {},
            "extra_relationships": {}
         }
      },
      "start_match_value": {
         "default": null,
         "title": "Start Match Value",
         "type": "string"
      },
      "intermediates": {
         "default": null,
         "items": {
            "type": "string"
         },
         "title": "Intermediates",
         "type": "array"
      },
      "max_reactions_between_intermediates": {
         "default": null,
         "title": "Max Reactions Between Intermediates",
         "type": "integer"
      },
      "total_n_reactions": {
         "default": null,
         "title": "Total N Reactions",
         "type": "integer"
      },
      "min_max_n_reactions": {
         "default": null,
         "maxItems": 2,
         "minItems": 2,
         "prefixItems": [
            {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ]
            },
            {
               "type": "integer"
            }
         ],
         "title": "Min Max N Reactions",
         "type": "array"
      },
      "end_at_last_intermediate": {
         "default": true,
         "title": "End At Last Intermediate",
         "type": "boolean"
      },
      "limit": {
         "default": null,
         "title": "Limit",
         "type": "integer"
      },
      "between_intr_in_rel": {
         "default": null,
         "title": "Between Intr In Rel",
         "type": "integer"
      },
      "total_in_rel": {
         "default": null,
         "title": "Total In Rel",
         "type": "integer"
      },
      "min_max_in_rel": {
         "default": null,
         "maxItems": 2,
         "minItems": 2,
         "prefixItems": [
            {
               "type": "integer"
            },
            {
               "type": "integer"
            }
         ],
         "title": "Min Max In Rel",
         "type": "array"
      },
      "match_property": {
         "default": "uid",
         "title": "Match Property",
         "type": "string"
      }
   },
   "$defs": {
      "GraphSchema": {
         "additionalProperties": false,
         "description": "Base model representing the schema of a NOCtis graph",
         "properties": {
            "base_nodes": {
               "additionalProperties": {
                  "type": "string"
               },
               "default": {
                  "chemical_equation": "ChemicalEquation",
                  "molecule": "Molecule"
               },
               "minProperties": 2,
               "title": "Base Nodes",
               "type": "object"
            },
            "base_relationships": {
               "additionalProperties": {
                  "additionalProperties": {
                     "type": "string"
                  },
                  "type": "object"
               },
               "default": {
                  "product": {
                     "end_node": "molecule",
                     "start_node": "chemical_equation",
                     "type": "PRODUCT"
                  },
                  "reactant": {
                     "end_node": "chemical_equation",
                     "start_node": "molecule",
                     "type": "REACTANT"
                  }
               },
               "minProperties": 2,
               "title": "Base Relationships",
               "type": "object"
            },
            "extra_nodes": {
               "additionalProperties": {
                  "type": "string"
               },
               "title": "Extra Nodes",
               "type": "object"
            },
            "extra_relationships": {
               "additionalProperties": {
                  "additionalProperties": {
                     "type": "string"
                  },
                  "type": "object"
               },
               "title": "Extra Relationships",
               "type": "object"
            }
         },
         "title": "GraphSchema",
         "type": "object"
      }
   }
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
Validators:

field between_intr_in_rel: int = None
Validated by:
field end_at_last_intermediate: bool = True
Validated by:
field intermediates: list[str] = None
Validated by:
field limit: int = None
Validated by:
field match_property: str = 'uid'
Validated by:
field max_reactions_between_intermediates: int = None
Validated by:
field min_max_in_rel: tuple[int, int] = None
Validated by:
field min_max_n_reactions: tuple[None | int, int] = None
Validated by:
field query: list[str] = None
Validated by:
field start_match_value: str = None
Validated by:
field total_in_rel: int = None
Validated by:
field total_n_reactions: int = None
Validated by:
get_query() list[str][source]
parameters_embedded: ClassVar[bool] = True
query_args_optional: ClassVar[list[str]] = ['intermediates', 'max_reactions_between_intermediates', 'total_n_reactions', 'min_max_n_reactions', 'end_at_last_intermediate', 'limit', 'match_property']
query_args_required: ClassVar[list[str]] = ['start_match_value']
query_name: ClassVar[str] = 'get_paths'
query_type: ClassVar[str] = 'retrieve_graph'