{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "core/factories/ontology.factory.ts",
          "name": "danglingFor",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-ontology-factory-ts",
            "json": "https://banes-lab.com/json/source/context/core/factories/ontology.factory.ts",
            "label": "core/factories/ontology.factory.ts",
            "markdown": "https://banes-lab.com/source/context/core/factories/ontology.factory.ts.md",
            "ref": "anatomy:file-context-core-factories-ontology-factory-ts"
          }
        },
        {
          "file": "core/factories/ontology.factory.ts",
          "name": "findDuplicateIds",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-ontology-factory-ts",
            "json": "https://banes-lab.com/json/source/context/core/factories/ontology.factory.ts",
            "label": "core/factories/ontology.factory.ts",
            "markdown": "https://banes-lab.com/source/context/core/factories/ontology.factory.ts.md",
            "ref": "anatomy:file-context-core-factories-ontology-factory-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/factories/ontology.factory.ts",
          "name": "createOntology",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-ontology-factory-ts",
            "json": "https://banes-lab.com/json/source/context/core/factories/ontology.factory.ts",
            "label": "core/factories/ontology.factory.ts",
            "markdown": "https://banes-lab.com/source/context/core/factories/ontology.factory.ts.md",
            "ref": "anatomy:file-context-core-factories-ontology-factory-ts"
          }
        }
      ],
      "exported": false,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 60,
      "name": "makeValidate",
      "signature": "const makeValidate = function makeValidate<R>("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/factories/ontology.factory.ts",
          "name": "makeValidate",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-ontology-factory-ts",
            "json": "https://banes-lab.com/json/source/context/core/factories/ontology.factory.ts",
            "label": "core/factories/ontology.factory.ts",
            "markdown": "https://banes-lab.com/source/context/core/factories/ontology.factory.ts.md",
            "ref": "anatomy:file-context-core-factories-ontology-factory-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/stores/ontology.store.ts",
          "name": "constructor",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-stores-ontology-store-ts",
            "json": "https://banes-lab.com/json/source/context/core/stores/ontology.store.ts",
            "label": "core/stores/ontology.store.ts",
            "markdown": "https://banes-lab.com/source/context/core/stores/ontology.store.ts.md",
            "ref": "anatomy:file-context-core-stores-ontology-store-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 74,
      "name": "createOntology",
      "signature": "export const createOntology = function createOntology<R>(options: OntologyOptions<R>): Ontology<R> {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/factories/ontology.factory.ts",
          "name": "makeValidate",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-ontology-factory-ts",
            "json": "https://banes-lab.com/json/source/context/core/factories/ontology.factory.ts",
            "label": "core/factories/ontology.factory.ts",
            "markdown": "https://banes-lab.com/source/context/core/factories/ontology.factory.ts.md",
            "ref": "anatomy:file-context-core-factories-ontology-factory-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 26,
      "name": "findDuplicateIds",
      "signature": "const findDuplicateIds = function findDuplicateIds<R>(records: readonly R[], idOf: (record: R) => string): string[] {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/factories/ontology.factory.ts",
          "name": "makeValidate",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-ontology-factory-ts",
            "json": "https://banes-lab.com/json/source/context/core/factories/ontology.factory.ts",
            "label": "core/factories/ontology.factory.ts",
            "markdown": "https://banes-lab.com/source/context/core/factories/ontology.factory.ts.md",
            "ref": "anatomy:file-context-core-factories-ontology-factory-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 40,
      "name": "danglingFor",
      "signature": "const danglingFor = function danglingFor<R>("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "configuration/strings/ontology.strings.ts",
          "name": "duplicateRecordId",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-configuration-strings-ontology-strings-ts",
            "json": "https://banes-lab.com/json/source/context/configuration/strings/ontology.strings.ts",
            "label": "configuration/strings/ontology.strings.ts",
            "markdown": "https://banes-lab.com/source/context/configuration/strings/ontology.strings.ts.md",
            "ref": "anatomy:file-context-configuration-strings-ontology-strings-ts"
          }
        },
        {
          "file": "configuration/strings/ontology.strings.ts",
          "name": "emptyRecordId",
          "source": {
            "href": "https://banes-lab.com/anatomy/context#file-context-configuration-strings-ontology-strings-ts",
            "json": "https://banes-lab.com/json/source/context/configuration/strings/ontology.strings.ts",
            "label": "configuration/strings/ontology.strings.ts",
            "markdown": "https://banes-lab.com/source/context/configuration/strings/ontology.strings.ts.md",
            "ref": "anatomy:file-context-configuration-strings-ontology-strings-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 6,
      "name": "buildIndex",
      "signature": "const buildIndex = function buildIndex<R>("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 27,
      "name": "seen",
      "signature": "const seen = new Set<string>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 28,
      "name": "duplicates",
      "signature": "const duplicates: string[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 30,
      "name": "id",
      "signature": "const id = idOf(record);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 45,
      "name": "out",
      "signature": "const out: OntologyIssues[\"danglingEdges\"] = [];"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 56,
      "name": "identity",
      "signature": "const identity = function identity(target: string): string {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 66,
      "name": "hasId",
      "signature": "const hasId = (target: string): boolean => byId.has(resolveId(target));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 75,
      "name": "{ idOf, label }",
      "signature": "const { idOf, label } = options;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 76,
      "name": "logger",
      "signature": "const logger = options.logger ?? NOOP_LOGGER;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 77,
      "name": "records",
      "signature": "const records = options.records.map((record) => deepFreeze(record));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 78,
      "name": "byId",
      "signature": "const byId = buildIndex(records, idOf, { label, logger });"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-ontology-factory-ts",
  "language": "typescript",
  "layer": "infrastructure",
  "name": "ontology.factory.ts",
  "path": "core/factories/ontology.factory.ts",
  "ref": "anatomy:file-context-core-factories-ontology-factory-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/context#folder-context-core-factories",
          "json": "https://banes-lab.com/json/anatomy/context/folder-context-core-factories",
          "label": "core/factories",
          "markdown": "https://banes-lab.com/anatomy/context/folder-context-core-factories.md",
          "ref": "chapter:/anatomy/context#folder-context-core-factories"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/context#file-context-configuration-strings-ontology-strings-ts",
          "json": "https://banes-lab.com/json/source/context/configuration/strings/ontology.strings.ts",
          "label": "configuration/strings/ontology.strings.ts",
          "markdown": "https://banes-lab.com/source/context/configuration/strings/ontology.strings.ts.md",
          "ref": "anatomy:file-context-configuration-strings-ontology-strings-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/context#file-context-core-stores-ontology-store-ts",
          "json": "https://banes-lab.com/json/source/context/core/stores/ontology.store.ts",
          "label": "core/stores/ontology.store.ts",
          "markdown": "https://banes-lab.com/source/context/core/stores/ontology.store.ts.md",
          "ref": "anatomy:file-context-core-stores-ontology-store-ts"
        }
      ],
      "relation": "used-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/context#folder-context-configuration-strings",
          "json": "https://banes-lab.com/json/anatomy/context/folder-context-configuration-strings",
          "label": "configuration/strings",
          "markdown": "https://banes-lab.com/anatomy/context/folder-context-configuration-strings.md",
          "ref": "chapter:/anatomy/context#folder-context-configuration-strings"
        },
        {
          "href": "https://banes-lab.com/anatomy/context#folder-context-core-factories",
          "json": "https://banes-lab.com/json/anatomy/context/folder-context-core-factories",
          "label": "core/factories",
          "markdown": "https://banes-lab.com/anatomy/context/folder-context-core-factories.md",
          "ref": "chapter:/anatomy/context#folder-context-core-factories"
        },
        {
          "href": "https://banes-lab.com/anatomy/context#folder-context-core-stores",
          "json": "https://banes-lab.com/json/anatomy/context/folder-context-core-stores",
          "label": "core/stores",
          "markdown": "https://banes-lab.com/anatomy/context/folder-context-core-stores.md",
          "ref": "chapter:/anatomy/context#folder-context-core-stores"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "factory",
    "subject": "ontology",
    "variant": null
  },
  "stats": {
    "bytes": 3023,
    "callable": 7,
    "definitions": 15,
    "edges": 5,
    "exported": 5,
    "files": 1,
    "findings": {},
    "flows": {
      "relay": 2,
      "leaf": 2,
      "entry": 1,
      "isolated": 10
    },
    "lines": {
      "blank": 6,
      "code": 81,
      "total": 87
    }
  },
  "summary": "81 lines of code and 15 definitions.",
  "text": "https://banes-lab.com/source/context/core/factories/ontology.factory.ts.txt",
  "tree": "context",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-reason-factory-ts",
      "json": "https://banes-lab.com/json/source/context/core/factories/reason.factory.ts",
      "label": "core/factories/reason.factory.ts",
      "markdown": "https://banes-lab.com/source/context/core/factories/reason.factory.ts.md",
      "ref": "anatomy:file-context-core-factories-reason-factory-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/context#file-context-core-factories-lexicon-factory-ts",
      "json": "https://banes-lab.com/json/source/context/core/factories/lexicon.factory.ts",
      "label": "core/factories/lexicon.factory.ts",
      "markdown": "https://banes-lab.com/source/context/core/factories/lexicon.factory.ts.md",
      "ref": "anatomy:file-context-core-factories-lexicon-factory-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/context/core/factories",
    "label": "core/factories",
    "markdown": "https://banes-lab.com/api/source/context/core/factories.md",
    "ref": "api:source/context/core/factories"
  }
}
