glossarist 0.4.50 → 0.4.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiled-format.d.ts +43 -0
- package/dist/compiled-format.d.ts.map +1 -0
- package/{src/compiled-format.ts → dist/compiled-format.js} +28 -46
- package/dist/compiled-format.js.map +1 -0
- package/dist/concept-collection.d.ts +39 -0
- package/dist/concept-collection.d.ts.map +1 -0
- package/dist/concept-collection.js +127 -0
- package/dist/concept-collection.js.map +1 -0
- package/dist/concept-diff.d.ts +14 -0
- package/dist/concept-diff.d.ts.map +1 -0
- package/{src/concept-diff.ts → dist/concept-diff.js} +2 -20
- package/dist/concept-diff.js.map +1 -0
- package/dist/concept-parser.d.ts +11 -0
- package/dist/concept-parser.d.ts.map +1 -0
- package/dist/concept-parser.js +209 -0
- package/dist/concept-parser.js.map +1 -0
- package/dist/concept-reader.d.ts +55 -0
- package/dist/concept-reader.d.ts.map +1 -0
- package/{src/concept-reader.ts → dist/concept-reader.js} +70 -76
- package/dist/concept-reader.js.map +1 -0
- package/dist/concept-serializer.d.ts +9 -0
- package/dist/concept-serializer.d.ts.map +1 -0
- package/dist/concept-serializer.js +87 -0
- package/dist/concept-serializer.js.map +1 -0
- package/dist/concept-writer.d.ts +10 -0
- package/dist/concept-writer.d.ts.map +1 -0
- package/dist/concept-writer.js +28 -0
- package/dist/concept-writer.js.map +1 -0
- package/dist/dataset-asset.d.ts +49 -0
- package/dist/dataset-asset.d.ts.map +1 -0
- package/{src/dataset-asset.ts → dist/dataset-asset.js} +16 -33
- package/dist/dataset-asset.js.map +1 -0
- package/dist/diff/canonical-json.d.ts +7 -0
- package/dist/diff/canonical-json.d.ts.map +1 -0
- package/dist/diff/canonical-json.js +28 -0
- package/dist/diff/canonical-json.js.map +1 -0
- package/dist/diff/change.d.ts +67 -0
- package/dist/diff/change.d.ts.map +1 -0
- package/dist/diff/change.js +131 -0
- package/dist/diff/change.js.map +1 -0
- package/dist/diff/collection-diff.d.ts +50 -0
- package/dist/diff/collection-diff.d.ts.map +1 -0
- package/dist/diff/collection-diff.js +182 -0
- package/dist/diff/collection-diff.js.map +1 -0
- package/dist/diff/concept-diff.d.ts +188 -0
- package/dist/diff/concept-diff.d.ts.map +1 -0
- package/dist/diff/concept-diff.js +624 -0
- package/dist/diff/concept-diff.js.map +1 -0
- package/dist/diff/diff-patch.d.ts +7 -0
- package/dist/diff/diff-patch.d.ts.map +1 -0
- package/dist/diff/diff-patch.js +225 -0
- package/dist/diff/diff-patch.js.map +1 -0
- package/dist/diff/diff-renderer.d.ts +44 -0
- package/dist/diff/diff-renderer.d.ts.map +1 -0
- package/dist/diff/diff-renderer.js +263 -0
- package/dist/diff/diff-renderer.js.map +1 -0
- package/dist/diff/identity.d.ts +2 -0
- package/dist/diff/identity.d.ts.map +1 -0
- package/dist/diff/identity.js +29 -0
- package/dist/diff/identity.js.map +1 -0
- package/dist/diff/index.d.ts +8 -0
- package/dist/diff/index.d.ts.map +1 -0
- package/dist/diff/index.js +8 -0
- package/dist/diff/index.js.map +1 -0
- package/dist/diff/list-diff.d.ts +36 -0
- package/dist/diff/list-diff.d.ts.map +1 -0
- package/dist/diff/list-diff.js +185 -0
- package/dist/diff/list-diff.js.map +1 -0
- package/dist/diff/similarity.d.ts +4 -0
- package/dist/diff/similarity.d.ts.map +1 -0
- package/dist/diff/similarity.js +20 -0
- package/dist/diff/similarity.js.map +1 -0
- package/dist/diff/text-diff.d.ts +42 -0
- package/dist/diff/text-diff.d.ts.map +1 -0
- package/dist/diff/text-diff.js +134 -0
- package/dist/diff/text-diff.js.map +1 -0
- package/dist/entity-directory.d.ts +13 -0
- package/dist/entity-directory.d.ts.map +1 -0
- package/dist/entity-directory.js +35 -0
- package/dist/entity-directory.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +23 -0
- package/dist/errors.js.map +1 -0
- package/dist/gcr-reader.d.ts +57 -0
- package/dist/gcr-reader.d.ts.map +1 -0
- package/dist/gcr-reader.js +264 -0
- package/dist/gcr-reader.js.map +1 -0
- package/dist/gcr-writer.d.ts +23 -0
- package/dist/gcr-writer.d.ts.map +1 -0
- package/dist/gcr-writer.js +84 -0
- package/dist/gcr-writer.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/managed-concept-collection.d.ts +31 -0
- package/dist/managed-concept-collection.d.ts.map +1 -0
- package/dist/managed-concept-collection.js +87 -0
- package/dist/managed-concept-collection.js.map +1 -0
- package/dist/migration/hyperedge-migrator.d.ts +33 -0
- package/dist/migration/hyperedge-migrator.d.ts.map +1 -0
- package/dist/migration/hyperedge-migrator.js +70 -0
- package/dist/migration/hyperedge-migrator.js.map +1 -0
- package/dist/models/abstract-hyperedge.d.ts +35 -0
- package/dist/models/abstract-hyperedge.d.ts.map +1 -0
- package/dist/models/abstract-hyperedge.js +112 -0
- package/dist/models/abstract-hyperedge.js.map +1 -0
- package/dist/models/base.d.ts +58 -0
- package/dist/models/base.d.ts.map +1 -0
- package/dist/models/base.js +77 -0
- package/dist/models/base.js.map +1 -0
- package/dist/models/bibliography-data.d.ts +20 -0
- package/dist/models/bibliography-data.d.ts.map +1 -0
- package/dist/models/bibliography-data.js +43 -0
- package/dist/models/bibliography-data.js.map +1 -0
- package/dist/models/bibliography-entry.d.ts +19 -0
- package/dist/models/bibliography-entry.d.ts.map +1 -0
- package/dist/models/bibliography-entry.js +34 -0
- package/dist/models/bibliography-entry.js.map +1 -0
- package/dist/models/citation.d.ts +40 -0
- package/dist/models/citation.d.ts.map +1 -0
- package/dist/models/citation.js +82 -0
- package/dist/models/citation.js.map +1 -0
- package/dist/models/completeness.d.ts +9 -0
- package/dist/models/completeness.d.ts.map +1 -0
- package/{src/models/completeness.ts → dist/models/completeness.js} +4 -9
- package/dist/models/completeness.js.map +1 -0
- package/dist/models/concept-date.d.ts +20 -0
- package/dist/models/concept-date.d.ts.map +1 -0
- package/dist/models/concept-date.js +36 -0
- package/dist/models/concept-date.js.map +1 -0
- package/dist/models/concept-ref.d.ts +32 -0
- package/dist/models/concept-ref.d.ts.map +1 -0
- package/dist/models/concept-ref.js +53 -0
- package/dist/models/concept-ref.js.map +1 -0
- package/dist/models/concept-reference.d.ts +22 -0
- package/dist/models/concept-reference.d.ts.map +1 -0
- package/dist/models/concept-reference.js +39 -0
- package/dist/models/concept-reference.js.map +1 -0
- package/dist/models/concept-source.d.ts +53 -0
- package/dist/models/concept-source.d.ts.map +1 -0
- package/dist/models/concept-source.js +66 -0
- package/dist/models/concept-source.js.map +1 -0
- package/dist/models/concept-system-type.d.ts +6 -0
- package/dist/models/concept-system-type.d.ts.map +1 -0
- package/dist/models/concept-system-type.js +22 -0
- package/dist/models/concept-system-type.js.map +1 -0
- package/dist/models/concept-system.d.ts +44 -0
- package/dist/models/concept-system.d.ts.map +1 -0
- package/dist/models/concept-system.js +115 -0
- package/dist/models/concept-system.js.map +1 -0
- package/dist/models/concept-type.d.ts +7 -0
- package/dist/models/concept-type.d.ts.map +1 -0
- package/{src/models/concept-type.ts → dist/models/concept-type.js} +8 -19
- package/dist/models/concept-type.js.map +1 -0
- package/dist/models/concept.d.ts +94 -0
- package/dist/models/concept.d.ts.map +1 -0
- package/dist/models/concept.js +368 -0
- package/dist/models/concept.js.map +1 -0
- package/dist/models/dataset-color.d.ts +28 -0
- package/dist/models/dataset-color.d.ts.map +1 -0
- package/dist/models/dataset-color.js +74 -0
- package/dist/models/dataset-color.js.map +1 -0
- package/dist/models/definition-type.d.ts +9 -0
- package/dist/models/definition-type.d.ts.map +1 -0
- package/{src/models/definition-type.ts → dist/models/definition-type.js} +6 -15
- package/dist/models/definition-type.js.map +1 -0
- package/dist/models/designation-relationship.d.ts +17 -0
- package/dist/models/designation-relationship.d.ts.map +1 -0
- package/dist/models/designation-relationship.js +30 -0
- package/dist/models/designation-relationship.js.map +1 -0
- package/dist/models/designation.d.ts +110 -0
- package/dist/models/designation.d.ts.map +1 -0
- package/dist/models/designation.js +224 -0
- package/dist/models/designation.js.map +1 -0
- package/dist/models/detailed-definition.d.ts +34 -0
- package/dist/models/detailed-definition.d.ts.map +1 -0
- package/dist/models/detailed-definition.js +63 -0
- package/dist/models/detailed-definition.js.map +1 -0
- package/dist/models/enum.d.ts +21 -0
- package/dist/models/enum.d.ts.map +1 -0
- package/dist/models/enum.js +39 -0
- package/dist/models/enum.js.map +1 -0
- package/dist/models/equivalence-degree.d.ts +7 -0
- package/dist/models/equivalence-degree.d.ts.map +1 -0
- package/dist/models/equivalence-degree.js +20 -0
- package/dist/models/equivalence-degree.js.map +1 -0
- package/dist/models/figure.d.ts +40 -0
- package/dist/models/figure.d.ts.map +1 -0
- package/dist/models/figure.js +82 -0
- package/dist/models/figure.js.map +1 -0
- package/dist/models/formula.d.ts +15 -0
- package/dist/models/formula.d.ts.map +1 -0
- package/dist/models/formula.js +27 -0
- package/dist/models/formula.js.map +1 -0
- package/dist/models/gcr-metadata.d.ts +62 -0
- package/dist/models/gcr-metadata.d.ts.map +1 -0
- package/dist/models/gcr-metadata.js +102 -0
- package/dist/models/gcr-metadata.js.map +1 -0
- package/dist/models/gcr-statistics.d.ts +30 -0
- package/dist/models/gcr-statistics.d.ts.map +1 -0
- package/dist/models/gcr-statistics.js +53 -0
- package/dist/models/gcr-statistics.js.map +1 -0
- package/dist/models/generic-hyperedge.d.ts +32 -0
- package/dist/models/generic-hyperedge.d.ts.map +1 -0
- package/dist/models/generic-hyperedge.js +51 -0
- package/dist/models/generic-hyperedge.js.map +1 -0
- package/dist/models/generic-member.d.ts +14 -0
- package/dist/models/generic-member.d.ts.map +1 -0
- package/dist/models/generic-member.js +51 -0
- package/dist/models/generic-member.js.map +1 -0
- package/dist/models/grammar-info.d.ts +34 -0
- package/dist/models/grammar-info.d.ts.map +1 -0
- package/dist/models/grammar-info.js +59 -0
- package/dist/models/grammar-info.js.map +1 -0
- package/dist/models/hyperedge-colors.d.ts +19 -0
- package/dist/models/hyperedge-colors.d.ts.map +1 -0
- package/dist/models/hyperedge-colors.js +61 -0
- package/dist/models/hyperedge-colors.js.map +1 -0
- package/dist/models/hyperedge-index.d.ts +34 -0
- package/dist/models/hyperedge-index.d.ts.map +1 -0
- package/dist/models/hyperedge-index.js +85 -0
- package/dist/models/hyperedge-index.js.map +1 -0
- package/dist/models/hyperedge-member.d.ts +28 -0
- package/dist/models/hyperedge-member.d.ts.map +1 -0
- package/dist/models/hyperedge-member.js +92 -0
- package/dist/models/hyperedge-member.js.map +1 -0
- package/dist/models/hyperedge-registry.d.ts +47 -0
- package/dist/models/hyperedge-registry.d.ts.map +1 -0
- package/dist/models/hyperedge-registry.js +118 -0
- package/dist/models/hyperedge-registry.js.map +1 -0
- package/dist/models/index.d.ts +53 -0
- package/dist/models/index.d.ts.map +1 -0
- package/{src/models/index.ts → dist/models/index.js} +11 -63
- package/dist/models/index.js.map +1 -0
- package/dist/models/locality.d.ts +17 -0
- package/dist/models/locality.d.ts.map +1 -0
- package/dist/models/locality.js +26 -0
- package/dist/models/locality.js.map +1 -0
- package/dist/models/localized-concept.d.ts +102 -0
- package/dist/models/localized-concept.d.ts.map +1 -0
- package/dist/models/localized-concept.js +195 -0
- package/dist/models/localized-concept.js.map +1 -0
- package/dist/models/localized-string.d.ts +5 -0
- package/dist/models/localized-string.d.ts.map +1 -0
- package/dist/models/localized-string.js +20 -0
- package/dist/models/localized-string.js.map +1 -0
- package/dist/models/multiplicity.d.ts +42 -0
- package/dist/models/multiplicity.d.ts.map +1 -0
- package/dist/models/multiplicity.js +84 -0
- package/dist/models/multiplicity.js.map +1 -0
- package/dist/models/non-verb-rep.d.ts +20 -0
- package/dist/models/non-verb-rep.d.ts.map +1 -0
- package/dist/models/non-verb-rep.js +32 -0
- package/dist/models/non-verb-rep.js.map +1 -0
- package/dist/models/non-verbal-entity.d.ts +30 -0
- package/dist/models/non-verbal-entity.d.ts.map +1 -0
- package/dist/models/non-verbal-entity.js +48 -0
- package/dist/models/non-verbal-entity.js.map +1 -0
- package/dist/models/non-verbal-reference.d.ts +23 -0
- package/dist/models/non-verbal-reference.d.ts.map +1 -0
- package/dist/models/non-verbal-reference.js +44 -0
- package/dist/models/non-verbal-reference.js.map +1 -0
- package/dist/models/non-verbal-references.d.ts +12 -0
- package/dist/models/non-verbal-references.d.ts.map +1 -0
- package/dist/models/non-verbal-references.js +20 -0
- package/dist/models/non-verbal-references.js.map +1 -0
- package/dist/models/partitive-count.d.ts +10 -0
- package/dist/models/partitive-count.d.ts.map +1 -0
- package/{src/models/partitive-count.ts → dist/models/partitive-count.js} +5 -9
- package/dist/models/partitive-count.js.map +1 -0
- package/dist/models/partitive-enumeration.d.ts +5 -0
- package/dist/models/partitive-enumeration.d.ts.map +1 -0
- package/dist/models/partitive-enumeration.js +16 -0
- package/dist/models/partitive-enumeration.js.map +1 -0
- package/dist/models/partitive-hyperedge.d.ts +43 -0
- package/dist/models/partitive-hyperedge.d.ts.map +1 -0
- package/dist/models/partitive-hyperedge.js +63 -0
- package/dist/models/partitive-hyperedge.js.map +1 -0
- package/dist/models/partitive-member.d.ts +14 -0
- package/dist/models/partitive-member.d.ts.map +1 -0
- package/dist/models/partitive-member.js +44 -0
- package/dist/models/partitive-member.js.map +1 -0
- package/dist/models/partitive-presence.d.ts +9 -0
- package/dist/models/partitive-presence.d.ts.map +1 -0
- package/{src/models/partitive-presence.ts → dist/models/partitive-presence.js} +4 -8
- package/dist/models/partitive-presence.js.map +1 -0
- package/dist/models/plurality-marker.d.ts +5 -0
- package/dist/models/plurality-marker.d.ts.map +1 -0
- package/dist/models/plurality-marker.js +20 -0
- package/dist/models/plurality-marker.js.map +1 -0
- package/dist/models/pronunciation.d.ts +19 -0
- package/dist/models/pronunciation.d.ts.map +1 -0
- package/dist/models/pronunciation.js +34 -0
- package/dist/models/pronunciation.js.map +1 -0
- package/dist/models/register.d.ts +104 -0
- package/dist/models/register.d.ts.map +1 -0
- package/dist/models/register.js +297 -0
- package/dist/models/register.js.map +1 -0
- package/dist/models/registrable.d.ts +25 -0
- package/dist/models/registrable.d.ts.map +1 -0
- package/dist/models/registrable.js +23 -0
- package/dist/models/registrable.js.map +1 -0
- package/dist/models/related-concept.d.ts +33 -0
- package/dist/models/related-concept.d.ts.map +1 -0
- package/dist/models/related-concept.js +95 -0
- package/dist/models/related-concept.js.map +1 -0
- package/dist/models/relation-categories.d.ts +38 -0
- package/dist/models/relation-categories.d.ts.map +1 -0
- package/dist/models/relation-categories.js +135 -0
- package/dist/models/relation-categories.js.map +1 -0
- package/dist/models/relation-colors.d.ts +35 -0
- package/dist/models/relation-colors.d.ts.map +1 -0
- package/dist/models/relation-colors.js +68 -0
- package/dist/models/relation-colors.js.map +1 -0
- package/dist/models/relation-loader.d.ts +41 -0
- package/dist/models/relation-loader.d.ts.map +1 -0
- package/dist/models/relation-loader.js +101 -0
- package/dist/models/relation-loader.js.map +1 -0
- package/dist/models/section.d.ts +22 -0
- package/dist/models/section.d.ts.map +1 -0
- package/dist/models/section.js +47 -0
- package/dist/models/section.js.map +1 -0
- package/dist/models/sequential-hyperedge.d.ts +32 -0
- package/dist/models/sequential-hyperedge.d.ts.map +1 -0
- package/dist/models/sequential-hyperedge.js +49 -0
- package/dist/models/sequential-hyperedge.js.map +1 -0
- package/dist/models/sequential-member.d.ts +8 -0
- package/dist/models/sequential-member.d.ts.map +1 -0
- package/{src/models/sequential-member.ts → dist/models/sequential-member.js} +4 -9
- package/dist/models/sequential-member.js.map +1 -0
- package/dist/models/shared-non-verbal-entity.d.ts +16 -0
- package/dist/models/shared-non-verbal-entity.d.ts.map +1 -0
- package/dist/models/shared-non-verbal-entity.js +28 -0
- package/dist/models/shared-non-verbal-entity.js.map +1 -0
- package/dist/models/table.d.ts +15 -0
- package/dist/models/table.d.ts.map +1 -0
- package/dist/models/table.js +27 -0
- package/dist/models/table.js.map +1 -0
- package/dist/rdf/agents-emitter.d.ts +37 -0
- package/dist/rdf/agents-emitter.d.ts.map +1 -0
- package/dist/rdf/agents-emitter.js +107 -0
- package/dist/rdf/agents-emitter.js.map +1 -0
- package/dist/rdf/bibliography-emitter.d.ts +16 -0
- package/dist/rdf/bibliography-emitter.d.ts.map +1 -0
- package/dist/rdf/bibliography-emitter.js +84 -0
- package/dist/rdf/bibliography-emitter.js.map +1 -0
- package/dist/rdf/bnode-id.d.ts +2 -0
- package/dist/rdf/bnode-id.d.ts.map +1 -0
- package/dist/rdf/bnode-id.js +57 -0
- package/dist/rdf/bnode-id.js.map +1 -0
- package/dist/rdf/build-activity-emitter.d.ts +42 -0
- package/dist/rdf/build-activity-emitter.d.ts.map +1 -0
- package/dist/rdf/build-activity-emitter.js +103 -0
- package/dist/rdf/build-activity-emitter.js.map +1 -0
- package/dist/rdf/curie.d.ts +7 -0
- package/dist/rdf/curie.d.ts.map +1 -0
- package/dist/rdf/curie.js +45 -0
- package/dist/rdf/curie.js.map +1 -0
- package/dist/rdf/dataset-emitter.d.ts +37 -0
- package/dist/rdf/dataset-emitter.d.ts.map +1 -0
- package/dist/rdf/dataset-emitter.js +126 -0
- package/dist/rdf/dataset-emitter.js.map +1 -0
- package/dist/rdf/deterministic-id.d.ts +3 -0
- package/dist/rdf/deterministic-id.d.ts.map +1 -0
- package/dist/rdf/deterministic-id.js +68 -0
- package/dist/rdf/deterministic-id.js.map +1 -0
- package/dist/rdf/document-writer.d.ts +11 -0
- package/dist/rdf/document-writer.d.ts.map +1 -0
- package/dist/rdf/document-writer.js +77 -0
- package/dist/rdf/document-writer.js.map +1 -0
- package/dist/rdf/gloss-concept.d.ts +27 -0
- package/dist/rdf/gloss-concept.d.ts.map +1 -0
- package/dist/rdf/gloss-concept.js +95 -0
- package/dist/rdf/gloss-concept.js.map +1 -0
- package/dist/rdf/gloss-designation.d.ts +17 -0
- package/dist/rdf/gloss-designation.d.ts.map +1 -0
- package/dist/rdf/gloss-designation.js +46 -0
- package/dist/rdf/gloss-designation.js.map +1 -0
- package/dist/rdf/gloss-detailed-definition.d.ts +14 -0
- package/dist/rdf/gloss-detailed-definition.d.ts.map +1 -0
- package/dist/rdf/gloss-detailed-definition.js +53 -0
- package/dist/rdf/gloss-detailed-definition.js.map +1 -0
- package/dist/rdf/gloss-generic-hyperedge.d.ts +27 -0
- package/dist/rdf/gloss-generic-hyperedge.d.ts.map +1 -0
- package/{src/rdf/gloss-generic-hyperedge.ts → dist/rdf/gloss-generic-hyperedge.js} +36 -50
- package/dist/rdf/gloss-generic-hyperedge.js.map +1 -0
- package/dist/rdf/gloss-localized-concept.d.ts +24 -0
- package/dist/rdf/gloss-localized-concept.d.ts.map +1 -0
- package/dist/rdf/gloss-localized-concept.js +71 -0
- package/dist/rdf/gloss-localized-concept.js.map +1 -0
- package/dist/rdf/gloss-non-verbal-rep.d.ts +33 -0
- package/dist/rdf/gloss-non-verbal-rep.d.ts.map +1 -0
- package/dist/rdf/gloss-non-verbal-rep.js +163 -0
- package/dist/rdf/gloss-non-verbal-rep.js.map +1 -0
- package/dist/rdf/gloss-partitive-member.d.ts +8 -0
- package/dist/rdf/gloss-partitive-member.d.ts.map +1 -0
- package/{src/rdf/gloss-partitive-member.ts → dist/rdf/gloss-partitive-member.js} +23 -41
- package/dist/rdf/gloss-partitive-member.js.map +1 -0
- package/dist/rdf/gloss-partitive-relation.d.ts +26 -0
- package/dist/rdf/gloss-partitive-relation.d.ts.map +1 -0
- package/dist/rdf/gloss-partitive-relation.js +73 -0
- package/dist/rdf/gloss-partitive-relation.js.map +1 -0
- package/dist/rdf/gloss-source.d.ts +23 -0
- package/dist/rdf/gloss-source.d.ts.map +1 -0
- package/dist/rdf/gloss-source.js +52 -0
- package/dist/rdf/gloss-source.js.map +1 -0
- package/dist/rdf/group-emitter.d.ts +46 -0
- package/dist/rdf/group-emitter.d.ts.map +1 -0
- package/dist/rdf/group-emitter.js +107 -0
- package/dist/rdf/group-emitter.js.map +1 -0
- package/dist/rdf/image-variant-emitter.d.ts +12 -0
- package/dist/rdf/image-variant-emitter.d.ts.map +1 -0
- package/dist/rdf/image-variant-emitter.js +55 -0
- package/dist/rdf/image-variant-emitter.js.map +1 -0
- package/dist/rdf/index.d.ts +26 -0
- package/dist/rdf/index.d.ts.map +1 -0
- package/{src/rdf/index.ts → dist/rdf/index.js} +8 -37
- package/dist/rdf/index.js.map +1 -0
- package/dist/rdf/normalize-enum.d.ts +3 -0
- package/dist/rdf/normalize-enum.d.ts.map +1 -0
- package/{src/rdf/normalize-enum.ts → dist/rdf/normalize-enum.js} +11 -10
- package/dist/rdf/normalize-enum.js.map +1 -0
- package/dist/rdf/predicates.d.ts +277 -0
- package/dist/rdf/predicates.d.ts.map +1 -0
- package/dist/rdf/predicates.js +279 -0
- package/dist/rdf/predicates.js.map +1 -0
- package/dist/rdf/prefixes.d.ts +16 -0
- package/dist/rdf/prefixes.d.ts.map +1 -0
- package/{src/rdf/prefixes.ts → dist/rdf/prefixes.js} +10 -12
- package/dist/rdf/prefixes.js.map +1 -0
- package/dist/rdf/provenance-emitter.d.ts +28 -0
- package/dist/rdf/provenance-emitter.d.ts.map +1 -0
- package/dist/rdf/provenance-emitter.js +74 -0
- package/dist/rdf/provenance-emitter.js.map +1 -0
- package/dist/rdf/sections-builder.d.ts +17 -0
- package/dist/rdf/sections-builder.d.ts.map +1 -0
- package/dist/rdf/sections-builder.js +137 -0
- package/dist/rdf/sections-builder.js.map +1 -0
- package/dist/rdf/shacl-entry.d.ts +2 -0
- package/dist/rdf/shacl-entry.d.ts.map +1 -0
- package/{src/rdf/shacl-entry.ts → dist/rdf/shacl-entry.js} +1 -1
- package/dist/rdf/shacl-entry.js.map +1 -0
- package/dist/rdf/shacl.d.ts +10 -0
- package/dist/rdf/shacl.d.ts.map +1 -0
- package/{src/rdf/shacl.ts → dist/rdf/shacl.js} +38 -57
- package/dist/rdf/shacl.js.map +1 -0
- package/dist/rdf/terms.d.ts +10 -0
- package/dist/rdf/terms.d.ts.map +1 -0
- package/{src/rdf/terms.ts → dist/rdf/terms.js} +6 -3
- package/dist/rdf/terms.js.map +1 -0
- package/dist/rdf/version-emitter.d.ts +57 -0
- package/dist/rdf/version-emitter.d.ts.map +1 -0
- package/dist/rdf/version-emitter.js +68 -0
- package/dist/rdf/version-emitter.js.map +1 -0
- package/dist/rdf/vocabulary-emitter.d.ts +32 -0
- package/dist/rdf/vocabulary-emitter.d.ts.map +1 -0
- package/dist/rdf/vocabulary-emitter.js +46 -0
- package/dist/rdf/vocabulary-emitter.js.map +1 -0
- package/dist/rdf/write-turtle-sync.d.ts +7 -0
- package/dist/rdf/write-turtle-sync.d.ts.map +1 -0
- package/dist/rdf/write-turtle-sync.js +130 -0
- package/dist/rdf/write-turtle-sync.js.map +1 -0
- package/dist/reference-mention.d.ts +49 -0
- package/dist/reference-mention.d.ts.map +1 -0
- package/dist/reference-mention.js +98 -0
- package/dist/reference-mention.js.map +1 -0
- package/dist/reference-resolver.d.ts +52 -0
- package/dist/reference-resolver.d.ts.map +1 -0
- package/dist/reference-resolver.js +311 -0
- package/dist/reference-resolver.js.map +1 -0
- package/dist/render-classification.d.ts +19 -0
- package/dist/render-classification.d.ts.map +1 -0
- package/dist/render-classification.js +82 -0
- package/dist/render-classification.js.map +1 -0
- package/dist/sort.d.ts +5 -0
- package/dist/sort.d.ts.map +1 -0
- package/dist/sort.js +25 -0
- package/dist/sort.js.map +1 -0
- package/dist/transforms/concept-to-gloss.transform.d.ts +32 -0
- package/dist/transforms/concept-to-gloss.transform.d.ts.map +1 -0
- package/dist/transforms/concept-to-gloss.transform.js +60 -0
- package/dist/transforms/concept-to-gloss.transform.js.map +1 -0
- package/dist/transforms/index.d.ts +2 -0
- package/dist/transforms/index.d.ts.map +1 -0
- package/{src/transforms/index.ts → dist/transforms/index.js} +1 -0
- package/dist/transforms/index.js.map +1 -0
- package/dist/utils/assertions.d.ts +4 -0
- package/dist/utils/assertions.d.ts.map +1 -0
- package/dist/utils/assertions.js +17 -0
- package/dist/utils/assertions.js.map +1 -0
- package/dist/utils/external-detection.d.ts +38 -0
- package/dist/utils/external-detection.d.ts.map +1 -0
- package/dist/utils/external-detection.js +55 -0
- package/dist/utils/external-detection.js.map +1 -0
- package/dist/uuid.d.ts +4 -0
- package/dist/uuid.d.ts.map +1 -0
- package/dist/uuid.js +23 -0
- package/dist/uuid.js.map +1 -0
- package/dist/v1-reader.d.ts +8 -0
- package/dist/v1-reader.d.ts.map +1 -0
- package/dist/v1-reader.js +56 -0
- package/dist/v1-reader.js.map +1 -0
- package/dist/validators/asset-index.d.ts +23 -0
- package/dist/validators/asset-index.d.ts.map +1 -0
- package/dist/validators/asset-index.js +58 -0
- package/dist/validators/asset-index.js.map +1 -0
- package/dist/validators/binary-has-part-redundancy-rule.d.ts +8 -0
- package/dist/validators/binary-has-part-redundancy-rule.d.ts.map +1 -0
- package/dist/validators/binary-has-part-redundancy-rule.js +57 -0
- package/dist/validators/binary-has-part-redundancy-rule.js.map +1 -0
- package/dist/validators/concept-validator.d.ts +21 -0
- package/dist/validators/concept-validator.d.ts.map +1 -0
- package/dist/validators/concept-validator.js +76 -0
- package/dist/validators/concept-validator.js.map +1 -0
- package/dist/validators/delimiting-coherence-rule.d.ts +8 -0
- package/dist/validators/delimiting-coherence-rule.d.ts.map +1 -0
- package/dist/validators/delimiting-coherence-rule.js +72 -0
- package/dist/validators/delimiting-coherence-rule.js.map +1 -0
- package/dist/validators/extensional-completeness.d.ts +18 -0
- package/dist/validators/extensional-completeness.d.ts.map +1 -0
- package/dist/validators/extensional-completeness.js +41 -0
- package/dist/validators/extensional-completeness.js.map +1 -0
- package/dist/validators/external-concept-shape-rule.d.ts +8 -0
- package/dist/validators/external-concept-shape-rule.d.ts.map +1 -0
- package/dist/validators/external-concept-shape-rule.js +48 -0
- package/dist/validators/external-concept-shape-rule.js.map +1 -0
- package/dist/validators/gcr-validator.d.ts +11 -0
- package/dist/validators/gcr-validator.d.ts.map +1 -0
- package/dist/validators/gcr-validator.js +76 -0
- package/dist/validators/gcr-validator.js.map +1 -0
- package/dist/validators/hyperedge-coherence-rule.d.ts +9 -0
- package/dist/validators/hyperedge-coherence-rule.d.ts.map +1 -0
- package/dist/validators/hyperedge-coherence-rule.js +78 -0
- package/dist/validators/hyperedge-coherence-rule.js.map +1 -0
- package/dist/validators/index.d.ts +21 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/{src/validators/index.ts → dist/validators/index.js} +25 -51
- package/dist/validators/index.js.map +1 -0
- package/dist/validators/partitive-relation-coherence-rule.d.ts +2 -0
- package/dist/validators/partitive-relation-coherence-rule.d.ts.map +1 -0
- package/{src/validators/partitive-relation-coherence-rule.ts → dist/validators/partitive-relation-coherence-rule.js} +1 -1
- package/dist/validators/partitive-relation-coherence-rule.js.map +1 -0
- package/dist/validators/ref-keys.d.ts +8 -0
- package/dist/validators/ref-keys.d.ts.map +1 -0
- package/dist/validators/ref-keys.js +27 -0
- package/dist/validators/ref-keys.js.map +1 -0
- package/dist/validators/register-validator.d.ts +10 -0
- package/dist/validators/register-validator.d.ts.map +1 -0
- package/dist/validators/register-validator.js +18 -0
- package/dist/validators/register-validator.js.map +1 -0
- package/dist/validators/relationship-type-rule.d.ts +13 -0
- package/dist/validators/relationship-type-rule.d.ts.map +1 -0
- package/dist/validators/relationship-type-rule.js +34 -0
- package/dist/validators/relationship-type-rule.js.map +1 -0
- package/dist/validators/sourced-from-locality-rule.d.ts +8 -0
- package/dist/validators/sourced-from-locality-rule.d.ts.map +1 -0
- package/dist/validators/sourced-from-locality-rule.js +37 -0
- package/dist/validators/sourced-from-locality-rule.js.map +1 -0
- package/dist/validators/v3-rules.d.ts +60 -0
- package/dist/validators/v3-rules.d.ts.map +1 -0
- package/dist/validators/v3-rules.js +327 -0
- package/dist/validators/v3-rules.js.map +1 -0
- package/dist/validators/validation-error.d.ts +13 -0
- package/dist/validators/validation-error.d.ts.map +1 -0
- package/dist/validators/validation-error.js +17 -0
- package/dist/validators/validation-error.js.map +1 -0
- package/dist/validators/validation-result.d.ts +17 -0
- package/dist/validators/validation-result.d.ts.map +1 -0
- package/dist/validators/validation-result.js +47 -0
- package/dist/validators/validation-result.js.map +1 -0
- package/dist/validators/validation-rule.d.ts +10 -0
- package/dist/validators/validation-rule.d.ts.map +1 -0
- package/dist/validators/validation-rule.js +17 -0
- package/dist/validators/validation-rule.js.map +1 -0
- package/package.json +37 -42
- package/src/concept-collection.ts +0 -172
- package/src/concept-parser.ts +0 -235
- package/src/concept-reader.d.ts +0 -13
- package/src/concept-serializer.ts +0 -110
- package/src/concept-writer.d.ts +0 -7
- package/src/concept-writer.ts +0 -47
- package/src/diff/canonical-json.ts +0 -29
- package/src/diff/change.ts +0 -175
- package/src/diff/collection-diff.ts +0 -245
- package/src/diff/concept-diff.ts +0 -853
- package/src/diff/diff-patch.ts +0 -276
- package/src/diff/diff-renderer.ts +0 -348
- package/src/diff/identity.ts +0 -33
- package/src/diff/index.d.ts +0 -242
- package/src/diff/index.ts +0 -50
- package/src/diff/list-diff.ts +0 -231
- package/src/diff/similarity.ts +0 -20
- package/src/diff/text-diff.ts +0 -167
- package/src/entity-directory.ts +0 -43
- package/src/errors.d.ts +0 -11
- package/src/errors.ts +0 -24
- package/src/gcr-reader.d.ts +0 -65
- package/src/gcr-reader.ts +0 -512
- package/src/gcr-writer.d.ts +0 -22
- package/src/gcr-writer.ts +0 -99
- package/src/index.d.ts +0 -124
- package/src/index.ts +0 -92
- package/src/managed-concept-collection.ts +0 -130
- package/src/migration/hyperedge-migrator.ts +0 -104
- package/src/models/abstract-hyperedge.ts +0 -164
- package/src/models/base.ts +0 -110
- package/src/models/bibliography-data.ts +0 -64
- package/src/models/bibliography-entry.ts +0 -40
- package/src/models/citation.ts +0 -98
- package/src/models/concept-date.ts +0 -48
- package/src/models/concept-ref.ts +0 -64
- package/src/models/concept-reference.ts +0 -50
- package/src/models/concept-source.ts +0 -96
- package/src/models/concept-system-type.ts +0 -39
- package/src/models/concept-system.ts +0 -152
- package/src/models/concept.ts +0 -499
- package/src/models/dataset-color.ts +0 -88
- package/src/models/designation-relationship.ts +0 -39
- package/src/models/designation.ts +0 -297
- package/src/models/detailed-definition.ts +0 -92
- package/src/models/enum.ts +0 -60
- package/src/models/equivalence-degree.ts +0 -34
- package/src/models/figure.ts +0 -110
- package/src/models/formula.ts +0 -36
- package/src/models/gcr-metadata.ts +0 -118
- package/src/models/gcr-statistics.ts +0 -76
- package/src/models/generic-hyperedge.ts +0 -72
- package/src/models/generic-member.ts +0 -80
- package/src/models/grammar-info.ts +0 -78
- package/src/models/hyperedge-colors.ts +0 -87
- package/src/models/hyperedge-index.ts +0 -101
- package/src/models/hyperedge-member.ts +0 -121
- package/src/models/hyperedge-registry.ts +0 -145
- package/src/models/index.d.ts +0 -586
- package/src/models/locality.ts +0 -34
- package/src/models/localized-concept.ts +0 -284
- package/src/models/localized-string.ts +0 -32
- package/src/models/multiplicity.ts +0 -134
- package/src/models/non-verb-rep.ts +0 -48
- package/src/models/non-verbal-entity.ts +0 -65
- package/src/models/non-verbal-reference.ts +0 -73
- package/src/models/non-verbal-references.ts +0 -29
- package/src/models/partitive-enumeration.ts +0 -27
- package/src/models/partitive-hyperedge.ts +0 -90
- package/src/models/partitive-member.ts +0 -56
- package/src/models/plurality-marker.ts +0 -31
- package/src/models/pronunciation.ts +0 -40
- package/src/models/register.ts +0 -315
- package/src/models/registrable.ts +0 -48
- package/src/models/related-concept.ts +0 -117
- package/src/models/relation-categories.ts +0 -167
- package/src/models/relation-colors.ts +0 -90
- package/src/models/relation-loader.ts +0 -115
- package/src/models/section.ts +0 -61
- package/src/models/sequential-hyperedge.ts +0 -70
- package/src/models/shared-non-verbal-entity.ts +0 -36
- package/src/models/table.ts +0 -36
- package/src/rdf/agents-emitter.ts +0 -137
- package/src/rdf/bibliography-emitter.ts +0 -126
- package/src/rdf/bnode-id.ts +0 -55
- package/src/rdf/build-activity-emitter.ts +0 -129
- package/src/rdf/curie.ts +0 -46
- package/src/rdf/dataset-emitter.ts +0 -170
- package/src/rdf/deterministic-id.ts +0 -69
- package/src/rdf/document-writer.ts +0 -87
- package/src/rdf/gloss-concept.ts +0 -115
- package/src/rdf/gloss-designation.ts +0 -72
- package/src/rdf/gloss-detailed-definition.ts +0 -69
- package/src/rdf/gloss-localized-concept.ts +0 -79
- package/src/rdf/gloss-non-verbal-rep.ts +0 -202
- package/src/rdf/gloss-partitive-relation.ts +0 -89
- package/src/rdf/gloss-source.ts +0 -56
- package/src/rdf/group-emitter.ts +0 -133
- package/src/rdf/image-variant-emitter.ts +0 -80
- package/src/rdf/index.d.ts +0 -371
- package/src/rdf/predicates.d.ts +0 -527
- package/src/rdf/predicates.ts +0 -287
- package/src/rdf/provenance-emitter.ts +0 -87
- package/src/rdf/sections-builder.ts +0 -190
- package/src/rdf/shacl-entry.d.ts +0 -6
- package/src/rdf/version-emitter.ts +0 -97
- package/src/rdf/vocabulary-emitter.ts +0 -67
- package/src/rdf/write-turtle-sync.ts +0 -179
- package/src/reference-mention.ts +0 -114
- package/src/reference-resolver.ts +0 -361
- package/src/render-classification.ts +0 -85
- package/src/sort.ts +0 -22
- package/src/transforms/concept-to-gloss.transform.ts +0 -81
- package/src/transforms/index.d.ts +0 -26
- package/src/uuid.ts +0 -32
- package/src/v1-reader.ts +0 -66
- package/src/validators/asset-index.ts +0 -72
- package/src/validators/binary-has-part-redundancy-rule.ts +0 -67
- package/src/validators/concept-validator.ts +0 -93
- package/src/validators/delimiting-coherence-rule.ts +0 -105
- package/src/validators/external-concept-shape-rule.ts +0 -60
- package/src/validators/gcr-validator.ts +0 -76
- package/src/validators/hyperedge-coherence-rule.ts +0 -98
- package/src/validators/index.d.ts +0 -43
- package/src/validators/ref-keys.ts +0 -31
- package/src/validators/register-validator.ts +0 -18
- package/src/validators/relationship-type-rule.ts +0 -39
- package/src/validators/sourced-from-locality-rule.ts +0 -53
- package/src/validators/v3-rules.ts +0 -382
- package/src/validators/validation-error.ts +0 -19
- package/src/validators/validation-result.ts +0 -52
- package/src/validators/validation-rule.ts +0 -21
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
import { GlossaristModel } from './base.js';
|
|
2
|
-
import { Designation } from './designation.js';
|
|
3
|
-
import { DetailedDefinition } from './detailed-definition.js';
|
|
4
|
-
import { ConceptSource } from './concept-source.js';
|
|
5
|
-
import { ConceptDate } from './concept-date.js';
|
|
6
|
-
import { NonVerbRep } from './non-verb-rep.js';
|
|
7
|
-
import { RelatedConcept } from './related-concept.js';
|
|
8
|
-
|
|
9
|
-
function wrapAs<T>(
|
|
10
|
-
Cls: new (...args: never[]) => T,
|
|
11
|
-
): (item: unknown) => T {
|
|
12
|
-
return (item: unknown): T =>
|
|
13
|
-
item instanceof Cls ? item : new Cls(item as never);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const LOC_WIRE_NAMES: Readonly<Record<string, string>> = Object.freeze({
|
|
17
|
-
entryStatus: 'entry_status',
|
|
18
|
-
reviewType: 'review_type',
|
|
19
|
-
lineageSourceSimilarity: 'lineage_source_similarity',
|
|
20
|
-
reviewDate: 'review_date',
|
|
21
|
-
reviewDecisionDate: 'review_decision_date',
|
|
22
|
-
reviewDecisionEvent: 'review_decision_event',
|
|
23
|
-
reviewStatus: 'review_status',
|
|
24
|
-
reviewDecision: 'review_decision',
|
|
25
|
-
reviewDecisionNotes: 'review_decision_notes',
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export interface LocalizedConceptJson {
|
|
29
|
-
language_code?: string | null;
|
|
30
|
-
languageCode?: string | null;
|
|
31
|
-
script?: string | null;
|
|
32
|
-
system?: string | null;
|
|
33
|
-
entry_status?: string | null;
|
|
34
|
-
entryStatus?: string | null;
|
|
35
|
-
classification?: string | null;
|
|
36
|
-
review_type?: string | null;
|
|
37
|
-
reviewType?: string | null;
|
|
38
|
-
domain?: string | null;
|
|
39
|
-
release?: string | null;
|
|
40
|
-
lineage_source_similarity?: string | null;
|
|
41
|
-
lineageSourceSimilarity?: string | null;
|
|
42
|
-
review_date?: string | null;
|
|
43
|
-
reviewDate?: string | null;
|
|
44
|
-
review_decision_date?: string | null;
|
|
45
|
-
reviewDecisionDate?: string | null;
|
|
46
|
-
review_decision_event?: string | null;
|
|
47
|
-
reviewDecisionEvent?: string | null;
|
|
48
|
-
review_status?: string | null;
|
|
49
|
-
reviewStatus?: string | null;
|
|
50
|
-
review_decision?: string | null;
|
|
51
|
-
reviewDecision?: string | null;
|
|
52
|
-
review_decision_notes?: string | null;
|
|
53
|
-
reviewDecisionNotes?: string | null;
|
|
54
|
-
terms?: ReadonlyArray<unknown>;
|
|
55
|
-
definition?: ReadonlyArray<unknown>;
|
|
56
|
-
sources?: ReadonlyArray<unknown>;
|
|
57
|
-
notes?: ReadonlyArray<unknown>;
|
|
58
|
-
annotations?: ReadonlyArray<unknown>;
|
|
59
|
-
examples?: ReadonlyArray<unknown>;
|
|
60
|
-
dates?: ReadonlyArray<unknown>;
|
|
61
|
-
non_verbal_rep?: ReadonlyArray<unknown>;
|
|
62
|
-
non_verb?: ReadonlyArray<unknown>;
|
|
63
|
-
related?: ReadonlyArray<unknown>;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
type SlotName = 'definitions' | 'notes' | 'examples' | 'annotations';
|
|
67
|
-
|
|
68
|
-
export class LocalizedConcept extends GlossaristModel {
|
|
69
|
-
static get DIFF_FIELDS(): ReadonlyArray<string> {
|
|
70
|
-
return Object.freeze([
|
|
71
|
-
'entryStatus', 'classification', 'reviewType', 'domain', 'release',
|
|
72
|
-
'lineageSourceSimilarity', 'script', 'system',
|
|
73
|
-
'reviewDate', 'reviewDecisionDate', 'reviewDecisionEvent',
|
|
74
|
-
'reviewStatus', 'reviewDecision', 'reviewDecisionNotes',
|
|
75
|
-
]);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
static wireNameFor(field: string): string {
|
|
79
|
-
return LOC_WIRE_NAMES[field] ?? field;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
readonly languageCode: string | null;
|
|
83
|
-
readonly script: string | null;
|
|
84
|
-
readonly system: string | null;
|
|
85
|
-
readonly entryStatus: string | null;
|
|
86
|
-
readonly classification: string | null;
|
|
87
|
-
readonly reviewType: string | null;
|
|
88
|
-
readonly domain: string | null;
|
|
89
|
-
readonly release: string | null;
|
|
90
|
-
readonly lineageSourceSimilarity: string | null;
|
|
91
|
-
readonly reviewDate: string | null;
|
|
92
|
-
readonly reviewDecisionDate: string | null;
|
|
93
|
-
readonly reviewDecisionEvent: string | null;
|
|
94
|
-
readonly reviewStatus: string | null;
|
|
95
|
-
readonly reviewDecision: string | null;
|
|
96
|
-
readonly reviewDecisionNotes: string | null;
|
|
97
|
-
|
|
98
|
-
private readonly _rawTerms: ReadonlyArray<unknown>;
|
|
99
|
-
private readonly _rawDefinition: ReadonlyArray<unknown>;
|
|
100
|
-
private readonly _rawSources: ReadonlyArray<unknown>;
|
|
101
|
-
private readonly _rawNotes: ReadonlyArray<unknown>;
|
|
102
|
-
private readonly _rawAnnotations: ReadonlyArray<unknown>;
|
|
103
|
-
private readonly _rawExamples: ReadonlyArray<unknown>;
|
|
104
|
-
private readonly _rawDates: ReadonlyArray<unknown>;
|
|
105
|
-
private readonly _rawNonVerbal: ReadonlyArray<unknown>;
|
|
106
|
-
private readonly _rawRelated: ReadonlyArray<unknown>;
|
|
107
|
-
private _terms: ReadonlyArray<Designation> | null = null;
|
|
108
|
-
private _definitions: ReadonlyArray<DetailedDefinition> | null = null;
|
|
109
|
-
private _sources: ReadonlyArray<ConceptSource> | null = null;
|
|
110
|
-
private _notes: ReadonlyArray<DetailedDefinition> | null = null;
|
|
111
|
-
private _annotations: ReadonlyArray<DetailedDefinition> | null = null;
|
|
112
|
-
private _examples: ReadonlyArray<DetailedDefinition> | null = null;
|
|
113
|
-
private _dates: ReadonlyArray<ConceptDate> | null = null;
|
|
114
|
-
private _nonVerbal: ReadonlyArray<NonVerbRep> | null = null;
|
|
115
|
-
private _related: ReadonlyArray<RelatedConcept> | null = null;
|
|
116
|
-
|
|
117
|
-
constructor(data: LocalizedConceptJson = {}) {
|
|
118
|
-
super();
|
|
119
|
-
this.languageCode = data.language_code ?? data.languageCode ?? null;
|
|
120
|
-
this.script = data.script ?? null;
|
|
121
|
-
this.system = data.system ?? null;
|
|
122
|
-
this.entryStatus = data.entry_status ?? data.entryStatus ?? null;
|
|
123
|
-
this.classification = data.classification ?? null;
|
|
124
|
-
this.reviewType = data.review_type ?? data.reviewType ?? null;
|
|
125
|
-
this.domain = data.domain ?? null;
|
|
126
|
-
this.release = data.release ?? null;
|
|
127
|
-
this.lineageSourceSimilarity =
|
|
128
|
-
data.lineage_source_similarity ?? data.lineageSourceSimilarity ?? null;
|
|
129
|
-
this.reviewDate = data.review_date ?? data.reviewDate ?? null;
|
|
130
|
-
this.reviewDecisionDate = data.review_decision_date ?? data.reviewDecisionDate ?? null;
|
|
131
|
-
this.reviewDecisionEvent = data.review_decision_event ?? data.reviewDecisionEvent ?? null;
|
|
132
|
-
this.reviewStatus = data.review_status ?? data.reviewStatus ?? null;
|
|
133
|
-
this.reviewDecision = data.review_decision ?? data.reviewDecision ?? null;
|
|
134
|
-
this.reviewDecisionNotes = data.review_decision_notes ?? data.reviewDecisionNotes ?? null;
|
|
135
|
-
|
|
136
|
-
this._rawTerms = data.terms ?? [];
|
|
137
|
-
this._rawDefinition = data.definition ?? [];
|
|
138
|
-
this._rawSources = data.sources ?? [];
|
|
139
|
-
this._rawNotes = data.notes ?? [];
|
|
140
|
-
this._rawAnnotations = data.annotations ?? [];
|
|
141
|
-
this._rawExamples = data.examples ?? [];
|
|
142
|
-
this._rawDates = data.dates ?? [];
|
|
143
|
-
this._rawNonVerbal = data.non_verbal_rep ?? data.non_verb ?? [];
|
|
144
|
-
this._rawRelated = data.related ?? [];
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
get terms(): ReadonlyArray<Designation> {
|
|
148
|
-
return this._lazy<Designation>(
|
|
149
|
-
'_terms',
|
|
150
|
-
'_rawTerms',
|
|
151
|
-
(t) => Designation.fromData(t),
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
get definitions(): ReadonlyArray<DetailedDefinition> {
|
|
156
|
-
return this._lazy<DetailedDefinition>(
|
|
157
|
-
'_definitions',
|
|
158
|
-
'_rawDefinition',
|
|
159
|
-
wrapAs(DetailedDefinition),
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
get definition(): ReadonlyArray<DetailedDefinition> {
|
|
164
|
-
return this.definitions;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
get sources(): ReadonlyArray<ConceptSource> {
|
|
168
|
-
return this._lazy<ConceptSource>(
|
|
169
|
-
'_sources',
|
|
170
|
-
'_rawSources',
|
|
171
|
-
wrapAs(ConceptSource),
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
get notes(): ReadonlyArray<DetailedDefinition> {
|
|
176
|
-
return this._lazy<DetailedDefinition>(
|
|
177
|
-
'_notes',
|
|
178
|
-
'_rawNotes',
|
|
179
|
-
wrapAs(DetailedDefinition),
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
get annotations(): ReadonlyArray<DetailedDefinition> {
|
|
184
|
-
return this._lazy<DetailedDefinition>(
|
|
185
|
-
'_annotations',
|
|
186
|
-
'_rawAnnotations',
|
|
187
|
-
wrapAs(DetailedDefinition),
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
get examples(): ReadonlyArray<DetailedDefinition> {
|
|
192
|
-
return this._lazy<DetailedDefinition>(
|
|
193
|
-
'_examples',
|
|
194
|
-
'_rawExamples',
|
|
195
|
-
wrapAs(DetailedDefinition),
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
get dates(): ReadonlyArray<ConceptDate> {
|
|
200
|
-
return this._lazy<ConceptDate>(
|
|
201
|
-
'_dates',
|
|
202
|
-
'_rawDates',
|
|
203
|
-
wrapAs(ConceptDate),
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
get nonVerbalRep(): ReadonlyArray<NonVerbRep> {
|
|
208
|
-
return this._lazy<NonVerbRep>(
|
|
209
|
-
'_nonVerbal',
|
|
210
|
-
'_rawNonVerbal',
|
|
211
|
-
wrapAs(NonVerbRep),
|
|
212
|
-
);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
get related(): ReadonlyArray<RelatedConcept> {
|
|
216
|
-
return this._lazy<RelatedConcept>(
|
|
217
|
-
'_related',
|
|
218
|
-
'_rawRelated',
|
|
219
|
-
wrapAs(RelatedConcept),
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
get primaryDesignation(): string | null {
|
|
224
|
-
return this.terms[0]?.designation ?? null;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
get primaryDefinition(): string | null {
|
|
228
|
-
return this.definitions[0]?.content ?? null;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
private *_textSlots(): Generator<[SlotName, ReadonlyArray<DetailedDefinition>]> {
|
|
232
|
-
yield ['definitions', this.definitions];
|
|
233
|
-
yield ['notes', this.notes];
|
|
234
|
-
yield ['examples', this.examples];
|
|
235
|
-
yield ['annotations', this.annotations];
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
*walkTexts(basePath: string): Generator<{ text: string; source: string }> {
|
|
239
|
-
for (const [name, arr] of this._textSlots()) {
|
|
240
|
-
for (let i = 0; i < arr.length; i++) {
|
|
241
|
-
const item = arr[i];
|
|
242
|
-
if (!item) continue;
|
|
243
|
-
yield* item.walkTexts(`${basePath}.${name}[${i}]`);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
override toJSON(): LocalizedConceptJson {
|
|
249
|
-
const obj: LocalizedConceptJson = {};
|
|
250
|
-
if (this.languageCode) obj.language_code = this.languageCode;
|
|
251
|
-
if (this.script) obj.script = this.script;
|
|
252
|
-
if (this.system) obj.system = this.system;
|
|
253
|
-
if (this.entryStatus) obj.entry_status = this.entryStatus;
|
|
254
|
-
if (this.classification) obj.classification = this.classification;
|
|
255
|
-
if (this.reviewType) obj.review_type = this.reviewType;
|
|
256
|
-
if (this.domain) obj.domain = this.domain;
|
|
257
|
-
if (this.release) obj.release = this.release;
|
|
258
|
-
if (this.lineageSourceSimilarity != null) {
|
|
259
|
-
obj.lineage_source_similarity = this.lineageSourceSimilarity;
|
|
260
|
-
}
|
|
261
|
-
if (this.reviewDate) obj.review_date = this.reviewDate;
|
|
262
|
-
if (this.reviewDecisionDate) obj.review_decision_date = this.reviewDecisionDate;
|
|
263
|
-
if (this.reviewDecisionEvent) obj.review_decision_event = this.reviewDecisionEvent;
|
|
264
|
-
if (this.reviewStatus) obj.review_status = this.reviewStatus;
|
|
265
|
-
if (this.reviewDecision) obj.review_decision = this.reviewDecision;
|
|
266
|
-
if (this.reviewDecisionNotes) obj.review_decision_notes = this.reviewDecisionNotes;
|
|
267
|
-
|
|
268
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'terms', '_terms', '_rawTerms');
|
|
269
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'definition', '_definitions', '_rawDefinition');
|
|
270
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'notes', '_notes', '_rawNotes');
|
|
271
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'annotations', '_annotations', '_rawAnnotations');
|
|
272
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'examples', '_examples', '_rawExamples');
|
|
273
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'sources', '_sources', '_rawSources');
|
|
274
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'dates', '_dates', '_rawDates');
|
|
275
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'non_verbal_rep', '_nonVerbal', '_rawNonVerbal');
|
|
276
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'related', '_related', '_rawRelated');
|
|
277
|
-
|
|
278
|
-
return obj;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
static override fromJSON(data: LocalizedConceptJson): LocalizedConcept {
|
|
282
|
-
return new LocalizedConcept(data);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const FALLBACK_LANG = 'eng';
|
|
2
|
-
|
|
3
|
-
export type LocalizedStringHash = Readonly<Record<string, string>>;
|
|
4
|
-
|
|
5
|
-
export function fetchLocalizedString(
|
|
6
|
-
hash: LocalizedStringHash | null | undefined,
|
|
7
|
-
lang: string,
|
|
8
|
-
fallback: string | null = FALLBACK_LANG,
|
|
9
|
-
): string | null {
|
|
10
|
-
if (hash == null || typeof hash !== 'object') return null;
|
|
11
|
-
const direct = hash[lang] ?? hash[String(lang)];
|
|
12
|
-
if (direct != null) return direct;
|
|
13
|
-
if (fallback != null && fallback !== lang) {
|
|
14
|
-
return hash[fallback] ?? hash[String(fallback)] ?? null;
|
|
15
|
-
}
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function localizedStringIsEmpty(
|
|
20
|
-
hash: LocalizedStringHash | null | undefined,
|
|
21
|
-
): boolean {
|
|
22
|
-
return (
|
|
23
|
-
hash == null ||
|
|
24
|
-
(typeof hash === 'object' && Object.keys(hash).length === 0)
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function localizedStringIsPresent(
|
|
29
|
-
hash: LocalizedStringHash | null | undefined,
|
|
30
|
-
): boolean {
|
|
31
|
-
return !localizedStringIsEmpty(hash);
|
|
32
|
-
}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
// Multiplicity — ISO 704:2022 partitive multiplicity (derived view).
|
|
2
|
-
//
|
|
3
|
-
// ISO 704:2022 multiplicity is the cross product of two orthogonal
|
|
4
|
-
// dimensions (PartitivePresence × PartitiveCount). The 5 valid
|
|
5
|
-
// combinations map to the 5 ISO 704 names:
|
|
6
|
-
//
|
|
7
|
-
// required × exactly_one → compulsory
|
|
8
|
-
// optional × exactly_one → optional
|
|
9
|
-
// required × multiple → compulsory_multiple
|
|
10
|
-
// optional × multiple → optional_multiple
|
|
11
|
-
// required × at_least_one → compulsory_at_least_one
|
|
12
|
-
//
|
|
13
|
-
// (optional × at_least_one is REDUNDANT with optional × multiple —
|
|
14
|
-
// "may exist, ≥1 if it does" = "may exist in any number" — and is
|
|
15
|
-
// explicitly rejected at construction with a clear error message.)
|
|
16
|
-
//
|
|
17
|
-
// This module is the SSOT for the (presence, count) → ISO name
|
|
18
|
-
// mapping. Both MULTIPLICITY constants and MULTIPLICITY_VALUES are
|
|
19
|
-
// derived from this single table; no duplicate string literals.
|
|
20
|
-
|
|
21
|
-
import type { PartitivePresence } from './partitive-presence.js';
|
|
22
|
-
import type { PartitiveCount } from './partitive-count.js';
|
|
23
|
-
|
|
24
|
-
export type MultiplicityName =
|
|
25
|
-
| 'compulsory'
|
|
26
|
-
| 'optional'
|
|
27
|
-
| 'compulsory_multiple'
|
|
28
|
-
| 'optional_multiple'
|
|
29
|
-
| 'compulsory_at_least_one';
|
|
30
|
-
|
|
31
|
-
const NAME_BY_PAIR: Readonly<Record<string, MultiplicityName>> = Object.freeze({
|
|
32
|
-
'required:exactly_one': 'compulsory',
|
|
33
|
-
'optional:exactly_one': 'optional',
|
|
34
|
-
'required:multiple': 'compulsory_multiple',
|
|
35
|
-
'optional:multiple': 'optional_multiple',
|
|
36
|
-
'required:at_least_one': 'compulsory_at_least_one',
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const PAIR_BY_NAME: Readonly<Record<MultiplicityName, string>> = Object.freeze(
|
|
40
|
-
Object.fromEntries(
|
|
41
|
-
Object.entries(NAME_BY_PAIR).map(([pair, name]) => [name, pair]),
|
|
42
|
-
) as Record<MultiplicityName, string>,
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
export const MULTIPLICITY: Readonly<Record<Uppercase<MultiplicityName>, MultiplicityName>> =
|
|
46
|
-
Object.freeze(
|
|
47
|
-
Object.fromEntries(
|
|
48
|
-
Object.values(NAME_BY_PAIR).map((name) => [name.toUpperCase(), name]),
|
|
49
|
-
),
|
|
50
|
-
) as Readonly<Record<Uppercase<MultiplicityName>, MultiplicityName>>;
|
|
51
|
-
|
|
52
|
-
export const MULTIPLICITY_VALUES: ReadonlyArray<MultiplicityName> = Object.freeze(
|
|
53
|
-
Object.values(NAME_BY_PAIR),
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
export const DEFAULT_MULTIPLICITY: MultiplicityName = MULTIPLICITY.COMPULSORY;
|
|
57
|
-
|
|
58
|
-
export function multiplicityFromPair(
|
|
59
|
-
presence: PartitivePresence,
|
|
60
|
-
count: PartitiveCount,
|
|
61
|
-
): MultiplicityName {
|
|
62
|
-
const name = NAME_BY_PAIR[`${presence}:${count}`];
|
|
63
|
-
if (name == null) {
|
|
64
|
-
throw invalidCombinationError(presence, count);
|
|
65
|
-
}
|
|
66
|
-
return name;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Canonical error for the invalid (presence, count) combination.
|
|
71
|
-
* Single source of truth — hyperedge-member.ts delegates to this so
|
|
72
|
-
* the error string doesn't drift across the two files.
|
|
73
|
-
*/
|
|
74
|
-
export function invalidCombinationError(
|
|
75
|
-
presence: unknown,
|
|
76
|
-
count: unknown,
|
|
77
|
-
): Error {
|
|
78
|
-
return new Error(
|
|
79
|
-
`Invalid multiplicity combination: presence=${presence}, count=${count}. ` +
|
|
80
|
-
`(optional + at_least_one collapses to optional + multiple — use count=multiple.)`,
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function pairFromMultiplicity(
|
|
85
|
-
name: MultiplicityName,
|
|
86
|
-
): { presence: PartitivePresence; count: PartitiveCount } {
|
|
87
|
-
const pair = PAIR_BY_NAME[name];
|
|
88
|
-
if (pair == null) {
|
|
89
|
-
throw new Error(`Unknown multiplicity: ${JSON.stringify(name)}`);
|
|
90
|
-
}
|
|
91
|
-
const [presence, count] = pair.split(':') as [PartitivePresence, PartitiveCount];
|
|
92
|
-
return { presence, count };
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export function isValidMultiplicity(name: unknown): name is MultiplicityName {
|
|
96
|
-
return (
|
|
97
|
-
typeof name === 'string' &&
|
|
98
|
-
Object.prototype.hasOwnProperty.call(PAIR_BY_NAME, name)
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
interface MemberWithMultiplicity {
|
|
103
|
-
presence?: PartitivePresence;
|
|
104
|
-
count?: PartitiveCount;
|
|
105
|
-
multiplicity?: string;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Resolve the ISO 704 multiplicity name from any object carrying
|
|
110
|
-
* `presence` + `count`, OR a legacy object that still has a literal
|
|
111
|
-
* `multiplicity` field (pre-v4 JSON).
|
|
112
|
-
*
|
|
113
|
-
* For v4 `PartitiveMember` instances, `presence` + `count` are always
|
|
114
|
-
* set (defaults applied at construction), so the legacy branch never
|
|
115
|
-
* fires on a real instance — it exists purely to round-trip raw JSON
|
|
116
|
-
* that bypassed the model constructor.
|
|
117
|
-
*
|
|
118
|
-
* Throws on the invalid `(optional, at_least_one)` combination — the
|
|
119
|
-
* model already rejects this at construction, so reaching the throw
|
|
120
|
-
* here means the caller bypassed the model. Let the error propagate
|
|
121
|
-
* rather than silently returning 'compulsory' (which would mask the
|
|
122
|
-
* data corruption).
|
|
123
|
-
*/
|
|
124
|
-
export function resolveMultiplicity(
|
|
125
|
-
member: MemberWithMultiplicity | null | undefined,
|
|
126
|
-
): MultiplicityName | string {
|
|
127
|
-
if (member?.presence && member?.count) {
|
|
128
|
-
return multiplicityFromPair(member.presence, member.count);
|
|
129
|
-
}
|
|
130
|
-
if (typeof member?.multiplicity === 'string') {
|
|
131
|
-
return member.multiplicity;
|
|
132
|
-
}
|
|
133
|
-
return DEFAULT_MULTIPLICITY;
|
|
134
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { NonVerbalEntity } from './non-verbal-entity.js';
|
|
2
|
-
import type { NonVerbalEntityJson } from './non-verbal-entity.js';
|
|
3
|
-
import { FigureImage } from './figure.js';
|
|
4
|
-
import type { FigureImageJson } from './figure.js';
|
|
5
|
-
|
|
6
|
-
export const NON_VERBAL_TYPES: ReadonlyArray<string> = Object.freeze([
|
|
7
|
-
'image', 'table', 'formula',
|
|
8
|
-
]);
|
|
9
|
-
|
|
10
|
-
export interface NonVerbRepJson extends NonVerbalEntityJson {
|
|
11
|
-
type?: string | null;
|
|
12
|
-
images?: ReadonlyArray<FigureImageJson | FigureImage>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export class NonVerbRep extends NonVerbalEntity {
|
|
16
|
-
readonly type: string | null;
|
|
17
|
-
protected readonly _rawImages: ReadonlyArray<FigureImageJson | FigureImage>;
|
|
18
|
-
protected _images: ReadonlyArray<FigureImage> | null = null;
|
|
19
|
-
|
|
20
|
-
constructor(data: NonVerbRepJson = {}) {
|
|
21
|
-
super(data);
|
|
22
|
-
this.type = data.type ?? null;
|
|
23
|
-
this._rawImages = data.images ?? [];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
override rdfClass(): string {
|
|
27
|
-
return 'NonVerbalRepresentation';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
get images(): ReadonlyArray<FigureImage> {
|
|
31
|
-
return this._lazy<FigureImage>(
|
|
32
|
-
'_images',
|
|
33
|
-
'_rawImages',
|
|
34
|
-
(i) => (i instanceof FigureImage ? i : new FigureImage(i as FigureImageJson)),
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
override toJSON(): NonVerbRepJson {
|
|
39
|
-
const obj = super.toJSON() as NonVerbRepJson;
|
|
40
|
-
if (this.type != null) obj.type = this.type;
|
|
41
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'images', '_images', '_rawImages');
|
|
42
|
-
return obj;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
static override fromJSON(data: NonVerbRepJson): NonVerbRep {
|
|
46
|
-
return new NonVerbRep(data);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { RegistrableModel } from './registrable.js';
|
|
2
|
-
import { ConceptSource } from './concept-source.js';
|
|
3
|
-
import type { ConceptSourceJson } from './concept-source.js';
|
|
4
|
-
|
|
5
|
-
export interface NonVerbalEntityJson {
|
|
6
|
-
caption?: string | null;
|
|
7
|
-
description?: string | null;
|
|
8
|
-
alt?: string | null;
|
|
9
|
-
sources?: ReadonlyArray<ConceptSourceJson | ConceptSource>;
|
|
10
|
-
type?: string | null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export class NonVerbalEntity extends RegistrableModel {
|
|
14
|
-
readonly caption: string | null;
|
|
15
|
-
readonly description: string | null;
|
|
16
|
-
readonly alt: string | null;
|
|
17
|
-
protected readonly _rawSources: ReadonlyArray<ConceptSourceJson | ConceptSource>;
|
|
18
|
-
protected _sources: ReadonlyArray<ConceptSource> | null = null;
|
|
19
|
-
|
|
20
|
-
constructor(data: NonVerbalEntityJson = {}) {
|
|
21
|
-
super();
|
|
22
|
-
this.caption = data.caption ?? null;
|
|
23
|
-
this.description = data.description ?? null;
|
|
24
|
-
this.alt = data.alt ?? null;
|
|
25
|
-
this._rawSources = data.sources ?? [];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
get sources(): ReadonlyArray<ConceptSource> {
|
|
29
|
-
return this._lazy<ConceptSource>(
|
|
30
|
-
'_sources',
|
|
31
|
-
'_rawSources',
|
|
32
|
-
(s) => (s instanceof ConceptSource ? s : new ConceptSource(s as ConceptSourceJson)),
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Ontology class local-name. Subtypes override to return their specific
|
|
38
|
-
* class (Figure/Table/Formula). Used by the RDF emitter so a new subtype
|
|
39
|
-
* registers without editing the emitter (OCP).
|
|
40
|
-
*/
|
|
41
|
-
rdfClass(): string {
|
|
42
|
-
return 'NonVerbalEntity';
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
findById(_targetId: string): NonVerbalEntity | null {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
allIds(): string[] {
|
|
50
|
-
return [];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
override toJSON(): NonVerbalEntityJson {
|
|
54
|
-
const obj: NonVerbalEntityJson = {};
|
|
55
|
-
if (this.caption != null) obj.caption = this.caption;
|
|
56
|
-
if (this.description != null) obj.description = this.description;
|
|
57
|
-
if (this.alt != null) obj.alt = this.alt;
|
|
58
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'sources', '_sources', '_rawSources');
|
|
59
|
-
return obj;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
static override fromJSON(data: NonVerbalEntityJson): NonVerbalEntity {
|
|
63
|
-
return NonVerbalEntity.fromData(data);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { RegistrableModel } from './registrable.js';
|
|
2
|
-
|
|
3
|
-
export interface NonVerbalReferenceJson {
|
|
4
|
-
entityId?: string | null;
|
|
5
|
-
entity_id?: string | null;
|
|
6
|
-
ref?: string | null;
|
|
7
|
-
id?: string | null;
|
|
8
|
-
display?: string | null;
|
|
9
|
-
type?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Polymorphic JSON for NonVerbalReference: either a bare string (the
|
|
14
|
-
* entity id) or an object with `{ ref, display?, type? }`.
|
|
15
|
-
*/
|
|
16
|
-
export type NonVerbalReferenceInput =
|
|
17
|
-
| NonVerbalReferenceJson
|
|
18
|
-
| string
|
|
19
|
-
| NonVerbalReference;
|
|
20
|
-
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
-
type AnyCtor = new (...args: any[]) => any;
|
|
23
|
-
|
|
24
|
-
export class NonVerbalReference extends RegistrableModel {
|
|
25
|
-
readonly entityId: string | null;
|
|
26
|
-
readonly display: string | null;
|
|
27
|
-
|
|
28
|
-
constructor(data: NonVerbalReferenceJson = {}) {
|
|
29
|
-
super();
|
|
30
|
-
this.entityId = data.entityId ?? data.entity_id ?? data.ref ?? data.id ?? null;
|
|
31
|
-
this.display = data.display ?? null;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
get dedupKey(): [string, string | null] {
|
|
35
|
-
return [this.constructor.name, this.entityId];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
override toJSON(): NonVerbalReferenceJson | string {
|
|
39
|
-
if (this.display != null) {
|
|
40
|
-
return { ref: this.entityId ?? '', display: this.display };
|
|
41
|
-
}
|
|
42
|
-
return this.entityId ?? '';
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
static override fromJSON<T extends NonVerbalReference>(
|
|
46
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
|
-
this: new (...args: any[]) => T,
|
|
48
|
-
data: NonVerbalReferenceInput,
|
|
49
|
-
): T | NonVerbalReference {
|
|
50
|
-
if (data instanceof NonVerbalReference) return data;
|
|
51
|
-
if (typeof data === 'string') {
|
|
52
|
-
return new (this as new (d: NonVerbalReferenceJson) => T)({ entityId: data });
|
|
53
|
-
}
|
|
54
|
-
const entityId =
|
|
55
|
-
data.entityId ?? data.entity_id ?? data.ref ?? data.id ?? null;
|
|
56
|
-
const display = data.display ?? null;
|
|
57
|
-
const type = data.type;
|
|
58
|
-
const Self = this as unknown as { _registry(): Map<string, AnyCtor> };
|
|
59
|
-
if (type) {
|
|
60
|
-
const Cls = Self._registry().get(type);
|
|
61
|
-
if (Cls) {
|
|
62
|
-
return new (Cls as new (d: NonVerbalReferenceJson) => T)({
|
|
63
|
-
entityId: entityId ?? undefined,
|
|
64
|
-
display: display ?? undefined,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return new (this as new (d: NonVerbalReferenceJson) => T)({
|
|
69
|
-
entityId: entityId ?? undefined,
|
|
70
|
-
display: display ?? undefined,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { NonVerbalReference } from './non-verbal-reference.js';
|
|
2
|
-
import type { NonVerbalReferenceInput } from './non-verbal-reference.js';
|
|
3
|
-
|
|
4
|
-
export class FigureReference extends NonVerbalReference {
|
|
5
|
-
static override fromJSON(
|
|
6
|
-
data: NonVerbalReferenceInput,
|
|
7
|
-
): FigureReference | NonVerbalReference {
|
|
8
|
-
return NonVerbalReference.fromJSON(data) as FigureReference | NonVerbalReference;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
NonVerbalReference.register('figure', FigureReference);
|
|
12
|
-
|
|
13
|
-
export class TableReference extends NonVerbalReference {
|
|
14
|
-
static override fromJSON(
|
|
15
|
-
data: NonVerbalReferenceInput,
|
|
16
|
-
): TableReference | NonVerbalReference {
|
|
17
|
-
return NonVerbalReference.fromJSON(data) as TableReference | NonVerbalReference;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
NonVerbalReference.register('table', TableReference);
|
|
21
|
-
|
|
22
|
-
export class FormulaReference extends NonVerbalReference {
|
|
23
|
-
static override fromJSON(
|
|
24
|
-
data: NonVerbalReferenceInput,
|
|
25
|
-
): FormulaReference | NonVerbalReference {
|
|
26
|
-
return NonVerbalReference.fromJSON(data) as FormulaReference | NonVerbalReference;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
NonVerbalReference.register('formula', FormulaReference);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// PartitiveEnumeration — allowed values for PartitiveHyperedge#enumeration.
|
|
2
|
-
//
|
|
3
|
-
// closed — the encoded parts are ALL the parts of the comprehensive.
|
|
4
|
-
// Adding or removing a part would change the relationship.
|
|
5
|
-
// open — the encoded parts are SOME of the parts; others may exist
|
|
6
|
-
// but are not encoded.
|
|
7
|
-
|
|
8
|
-
export type PartitiveEnumeration = 'closed' | 'open';
|
|
9
|
-
|
|
10
|
-
export const PARTITIVE_ENUMERATION: Readonly<
|
|
11
|
-
Record<'CLOSED' | 'OPEN', PartitiveEnumeration>
|
|
12
|
-
> = Object.freeze({
|
|
13
|
-
CLOSED: 'closed',
|
|
14
|
-
OPEN: 'open',
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const PARTITIVE_ENUMERATION_VALUES: ReadonlyArray<PartitiveEnumeration> =
|
|
18
|
-
Object.freeze([PARTITIVE_ENUMERATION.CLOSED, PARTITIVE_ENUMERATION.OPEN]);
|
|
19
|
-
|
|
20
|
-
export function isValidPartitiveEnumeration(
|
|
21
|
-
value: unknown,
|
|
22
|
-
): value is PartitiveEnumeration {
|
|
23
|
-
return (
|
|
24
|
-
typeof value === 'string' &&
|
|
25
|
-
(PARTITIVE_ENUMERATION_VALUES as readonly string[]).includes(value)
|
|
26
|
-
);
|
|
27
|
-
}
|