glossarist 0.4.49 → 0.4.51
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 +21 -0
- package/dist/index.d.ts.map +1 -0
- package/{src/index.ts → dist/index.js} +6 -66
- 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 -56
- 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/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/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 -166
- package/src/concept-parser.ts +0 -229
- package/src/concept-reader.d.ts +0 -13
- package/src/concept-serializer.ts +0 -99
- package/src/concept-writer.d.ts +0 -7
- package/src/concept-writer.ts +0 -43
- package/src/diff/canonical-json.ts +0 -29
- package/src/diff/change.ts +0 -175
- package/src/diff/collection-diff.ts +0 -197
- package/src/diff/concept-diff.ts +0 -702
- package/src/diff/diff-patch.ts +0 -260
- package/src/diff/diff-renderer.ts +0 -293
- 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 -487
- package/src/gcr-writer.d.ts +0 -22
- package/src/gcr-writer.ts +0 -97
- package/src/index.d.ts +0 -124
- package/src/managed-concept-collection.ts +0 -95
- 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 -134
- 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 -47
- 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 -192
- 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 -178
- 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 -167
- package/src/reference-mention.ts +0 -114
- package/src/reference-resolver.ts +0 -331
- package/src/render-classification.ts +0 -76
- 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 -64
- package/src/validators/asset-index.ts +0 -67
- 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 -75
- 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 -378
- 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,297 +0,0 @@
|
|
|
1
|
-
import { RegistrableModel } from './registrable.js';
|
|
2
|
-
import { ConceptSource } from './concept-source.js';
|
|
3
|
-
import type { ConceptSourceJson } from './concept-source.js';
|
|
4
|
-
import { Pronunciation } from './pronunciation.js';
|
|
5
|
-
import type { PronunciationJson } from './pronunciation.js';
|
|
6
|
-
import { GrammarInfo } from './grammar-info.js';
|
|
7
|
-
import type { GrammarInfoJson } from './grammar-info.js';
|
|
8
|
-
import { RelatedConcept } from './related-concept.js';
|
|
9
|
-
import type { RelatedConceptJson } from './related-concept.js';
|
|
10
|
-
import {
|
|
11
|
-
DesignationRelationship,
|
|
12
|
-
DESIGNATION_RELATIONSHIP_TYPES,
|
|
13
|
-
} from './designation-relationship.js';
|
|
14
|
-
import type { DesignationRelationshipJson } from './designation-relationship.js';
|
|
15
|
-
|
|
16
|
-
export type DesignationType =
|
|
17
|
-
| 'expression'
|
|
18
|
-
| 'abbreviation'
|
|
19
|
-
| 'symbol'
|
|
20
|
-
| 'letter_symbol'
|
|
21
|
-
| 'graphical symbol'
|
|
22
|
-
| 'graphical_symbol'
|
|
23
|
-
| string;
|
|
24
|
-
|
|
25
|
-
export type NormativeStatus = 'preferred' | 'deprecated' | 'admitted' | 'deprecated_' | string | null;
|
|
26
|
-
|
|
27
|
-
const SKOS_LABEL_BY_NORMATIVE_STATUS: Readonly<Record<string, string>> = Object.freeze({
|
|
28
|
-
preferred: 'prefLabel',
|
|
29
|
-
deprecated: 'hiddenLabel',
|
|
30
|
-
admitted: 'altLabel',
|
|
31
|
-
deprecated_: 'altLabel',
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export interface DesignationJson {
|
|
35
|
-
type?: DesignationType;
|
|
36
|
-
designation?: string;
|
|
37
|
-
normative_status?: NormativeStatus;
|
|
38
|
-
normativeStatus?: NormativeStatus;
|
|
39
|
-
absent?: boolean | null;
|
|
40
|
-
field_of_application?: string | null;
|
|
41
|
-
fieldOfApplication?: string | null;
|
|
42
|
-
usage_info?: string | null;
|
|
43
|
-
usageInfo?: string | null;
|
|
44
|
-
geographical_area?: string | null;
|
|
45
|
-
geographicalArea?: string | null;
|
|
46
|
-
language?: string | null;
|
|
47
|
-
script?: string | null;
|
|
48
|
-
system?: string | null;
|
|
49
|
-
international?: boolean | null;
|
|
50
|
-
term_type?: string | null;
|
|
51
|
-
termType?: string | null;
|
|
52
|
-
pronunciation?: ReadonlyArray<PronunciationJson | Pronunciation>;
|
|
53
|
-
sources?: ReadonlyArray<ConceptSourceJson | ConceptSource>;
|
|
54
|
-
related?: ReadonlyArray<DesignationRelationshipJson | DesignationRelationship | RelatedConceptJson | RelatedConcept>;
|
|
55
|
-
prefix?: string | null;
|
|
56
|
-
grammar_info?: ReadonlyArray<GrammarInfoJson | GrammarInfo>;
|
|
57
|
-
acronym?: boolean;
|
|
58
|
-
initialism?: boolean;
|
|
59
|
-
truncation?: boolean;
|
|
60
|
-
text?: string | null;
|
|
61
|
-
image?: string | null;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export class Designation extends RegistrableModel {
|
|
65
|
-
readonly designation: string;
|
|
66
|
-
readonly type: DesignationType;
|
|
67
|
-
readonly normativeStatus: NormativeStatus;
|
|
68
|
-
readonly absent: boolean | null;
|
|
69
|
-
readonly fieldOfApplication: string | null;
|
|
70
|
-
readonly usageInfo: string | null;
|
|
71
|
-
readonly geographicalArea: string | null;
|
|
72
|
-
readonly language: string | null;
|
|
73
|
-
readonly script: string | null;
|
|
74
|
-
readonly system: string | null;
|
|
75
|
-
readonly international: boolean | null;
|
|
76
|
-
readonly termType: string | null;
|
|
77
|
-
readonly pronunciations: ReadonlyArray<Pronunciation>;
|
|
78
|
-
readonly sources: ReadonlyArray<ConceptSource>;
|
|
79
|
-
readonly related: ReadonlyArray<DesignationRelationship | RelatedConcept>;
|
|
80
|
-
|
|
81
|
-
constructor(data: DesignationJson = {}) {
|
|
82
|
-
super();
|
|
83
|
-
this.designation = data.designation ?? '';
|
|
84
|
-
this.type = data.type ?? 'expression';
|
|
85
|
-
this.normativeStatus = data.normative_status ?? data.normativeStatus ?? null;
|
|
86
|
-
this.absent = data.absent ?? null;
|
|
87
|
-
this.fieldOfApplication = data.field_of_application ?? data.fieldOfApplication ?? null;
|
|
88
|
-
this.usageInfo = data.usage_info ?? data.usageInfo ?? null;
|
|
89
|
-
this.geographicalArea = data.geographical_area ?? data.geographicalArea ?? null;
|
|
90
|
-
this.language = data.language ?? null;
|
|
91
|
-
this.script = data.script ?? null;
|
|
92
|
-
this.system = data.system ?? null;
|
|
93
|
-
this.international = data.international ?? null;
|
|
94
|
-
this.termType = data.term_type ?? data.termType ?? null;
|
|
95
|
-
this.pronunciations = (data.pronunciation ?? []).map((p) =>
|
|
96
|
-
p instanceof Pronunciation ? p : new Pronunciation(p as PronunciationJson),
|
|
97
|
-
);
|
|
98
|
-
this.sources = (data.sources ?? []).map((s) =>
|
|
99
|
-
s instanceof ConceptSource ? s : new ConceptSource(s as ConceptSourceJson),
|
|
100
|
-
);
|
|
101
|
-
this.related = (data.related ?? []).map((r) => {
|
|
102
|
-
if (r instanceof DesignationRelationship || r instanceof RelatedConcept) return r;
|
|
103
|
-
const hash = r as { type?: string };
|
|
104
|
-
if (hash?.type && DESIGNATION_RELATIONSHIP_TYPES.includes(hash.type)) {
|
|
105
|
-
return DesignationRelationship.fromJSON(hash as DesignationRelationshipJson);
|
|
106
|
-
}
|
|
107
|
-
return RelatedConcept.fromJSON(hash as RelatedConceptJson);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
override toJSON(): DesignationJson {
|
|
112
|
-
const obj: DesignationJson = { type: this.type, designation: this.designation };
|
|
113
|
-
if (this.normativeStatus != null) obj.normative_status = this.normativeStatus;
|
|
114
|
-
if (this.absent != null) obj.absent = this.absent;
|
|
115
|
-
if (this.fieldOfApplication != null) obj.field_of_application = this.fieldOfApplication;
|
|
116
|
-
if (this.usageInfo != null) obj.usage_info = this.usageInfo;
|
|
117
|
-
if (this.geographicalArea != null) obj.geographical_area = this.geographicalArea;
|
|
118
|
-
if (this.language != null) obj.language = this.language;
|
|
119
|
-
if (this.script != null) obj.script = this.script;
|
|
120
|
-
if (this.system != null) obj.system = this.system;
|
|
121
|
-
if (this.international != null) obj.international = this.international;
|
|
122
|
-
if (this.termType != null) obj.term_type = this.termType;
|
|
123
|
-
if (this.pronunciations.length > 0) {
|
|
124
|
-
obj.pronunciation = this.pronunciations.map((p) => p.toJSON());
|
|
125
|
-
}
|
|
126
|
-
if (this.sources.length > 0) {
|
|
127
|
-
obj.sources = this.sources.map((s) => s.toJSON());
|
|
128
|
-
}
|
|
129
|
-
if (this.related.length > 0) {
|
|
130
|
-
obj.related = this.related.map((r) => r.toJSON() as never);
|
|
131
|
-
}
|
|
132
|
-
return obj;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/** RDF class local-name for this designation subtype. */
|
|
136
|
-
rdfClass(): string {
|
|
137
|
-
return 'Expression';
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/** SKOS label predicate URI appropriate for this designation's normative status. */
|
|
141
|
-
skosLabelPredicate(skosNs: string): string {
|
|
142
|
-
return `${skosNs}${this._skosLabelLocalName()}`;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/** SKOS-XL label predicate URI. */
|
|
146
|
-
skosxlLabelPredicate(skosxlNs: string): string {
|
|
147
|
-
return `${skosxlNs}${this._skosLabelLocalName()}`;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
protected _skosLabelLocalName(): string {
|
|
151
|
-
const statusVal = this.normativeStatus == null ? '' : String(this.normativeStatus);
|
|
152
|
-
const status = statusVal
|
|
153
|
-
.split(/[/#]/)
|
|
154
|
-
.pop() ?? '';
|
|
155
|
-
return SKOS_LABEL_BY_NORMATIVE_STATUS[status] ?? 'altLabel';
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
static identityOf(value: { type?: string; designation?: string } | null | undefined): string {
|
|
159
|
-
const v = value ?? {};
|
|
160
|
-
const type = v.type ?? 'expression';
|
|
161
|
-
const text = String(v.designation ?? '').toLowerCase().trim();
|
|
162
|
-
return `${type}|${text}`;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
override identity(): string {
|
|
166
|
-
return Designation.identityOf(this);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
static override fromJSON(data: DesignationJson): Designation {
|
|
170
|
-
return Designation.fromData(data);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export class Expression extends Designation {
|
|
175
|
-
readonly prefix: string | null;
|
|
176
|
-
readonly grammarInfo: ReadonlyArray<GrammarInfo>;
|
|
177
|
-
|
|
178
|
-
constructor(data: DesignationJson = {}) {
|
|
179
|
-
super(data);
|
|
180
|
-
this.prefix = data.prefix ?? null;
|
|
181
|
-
this.grammarInfo = (data.grammar_info ?? []).map((g) =>
|
|
182
|
-
g instanceof GrammarInfo ? g : new GrammarInfo(g as GrammarInfoJson),
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
override toJSON(): DesignationJson {
|
|
187
|
-
const obj = super.toJSON();
|
|
188
|
-
if (this.prefix != null) obj.prefix = this.prefix;
|
|
189
|
-
if (this.grammarInfo.length > 0) {
|
|
190
|
-
obj.grammar_info = this.grammarInfo.map((g) => g.toJSON());
|
|
191
|
-
}
|
|
192
|
-
return obj;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
static override fromJSON(data: DesignationJson): Expression {
|
|
196
|
-
return new Expression(data);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
Designation.register('expression', Expression);
|
|
201
|
-
|
|
202
|
-
export class Abbreviation extends Expression {
|
|
203
|
-
readonly acronym: boolean;
|
|
204
|
-
readonly initialism: boolean;
|
|
205
|
-
readonly truncation: boolean;
|
|
206
|
-
|
|
207
|
-
constructor(data: DesignationJson = {}) {
|
|
208
|
-
super(data);
|
|
209
|
-
this.acronym = data.acronym ?? false;
|
|
210
|
-
this.initialism = data.initialism ?? false;
|
|
211
|
-
this.truncation = data.truncation ?? false;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
override rdfClass(): string {
|
|
215
|
-
return 'Abbreviation';
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
override toJSON(): DesignationJson {
|
|
219
|
-
const obj = super.toJSON();
|
|
220
|
-
if (this.acronym) obj.acronym = true;
|
|
221
|
-
if (this.initialism) obj.initialism = true;
|
|
222
|
-
if (this.truncation) obj.truncation = true;
|
|
223
|
-
return obj;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
static override fromJSON(data: DesignationJson): Abbreviation {
|
|
227
|
-
return new Abbreviation(data);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
Designation.register('abbreviation', Abbreviation);
|
|
232
|
-
|
|
233
|
-
export class Symbol extends Designation {
|
|
234
|
-
override rdfClass(): string {
|
|
235
|
-
return 'Symbol';
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
static override fromJSON(data: DesignationJson): Symbol {
|
|
239
|
-
return new Symbol(data);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
Designation.register('symbol', Symbol);
|
|
244
|
-
|
|
245
|
-
export class LetterSymbol extends Symbol {
|
|
246
|
-
readonly text: string | null;
|
|
247
|
-
|
|
248
|
-
constructor(data: DesignationJson = {}) {
|
|
249
|
-
super(data);
|
|
250
|
-
this.text = data.text ?? null;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
override rdfClass(): string {
|
|
254
|
-
return 'LetterSymbol';
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
override toJSON(): DesignationJson {
|
|
258
|
-
const obj = super.toJSON();
|
|
259
|
-
if (this.text != null) obj.text = this.text;
|
|
260
|
-
return obj;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
static override fromJSON(data: DesignationJson): LetterSymbol {
|
|
264
|
-
return new LetterSymbol(data);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
Designation.register('letter_symbol', LetterSymbol);
|
|
269
|
-
|
|
270
|
-
export class GraphicalSymbol extends Symbol {
|
|
271
|
-
readonly text: string | null;
|
|
272
|
-
readonly image: string | null;
|
|
273
|
-
|
|
274
|
-
constructor(data: DesignationJson = {}) {
|
|
275
|
-
super(data);
|
|
276
|
-
this.text = data.text ?? null;
|
|
277
|
-
this.image = data.image ?? null;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
override rdfClass(): string {
|
|
281
|
-
return 'GraphicalSymbol';
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
override toJSON(): DesignationJson {
|
|
285
|
-
const obj = super.toJSON();
|
|
286
|
-
if (this.text != null) obj.text = this.text;
|
|
287
|
-
if (this.image != null) obj.image = this.image;
|
|
288
|
-
return obj;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
static override fromJSON(data: DesignationJson): GraphicalSymbol {
|
|
292
|
-
return new GraphicalSymbol(data);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
Designation.register('graphical symbol', GraphicalSymbol);
|
|
297
|
-
Designation.register('graphical_symbol', GraphicalSymbol);
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { GlossaristModel } from './base.js';
|
|
2
|
-
import { Citation } from './citation.js';
|
|
3
|
-
import { canonicalJson } from '../diff/canonical-json.js';
|
|
4
|
-
|
|
5
|
-
export interface DetailedDefinitionJson {
|
|
6
|
-
content?: string;
|
|
7
|
-
sources?: ReadonlyArray<unknown>;
|
|
8
|
-
examples?: ReadonlyArray<unknown>;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface WalkTextEntry {
|
|
12
|
-
text: string;
|
|
13
|
-
source: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export class DetailedDefinition extends GlossaristModel {
|
|
17
|
-
readonly content: string;
|
|
18
|
-
private readonly _rawSources: ReadonlyArray<unknown>;
|
|
19
|
-
private readonly _rawExamples: ReadonlyArray<unknown>;
|
|
20
|
-
private _sources: ReadonlyArray<Citation> | null = null;
|
|
21
|
-
private _examples: ReadonlyArray<DetailedDefinition> | null = null;
|
|
22
|
-
|
|
23
|
-
constructor(data: DetailedDefinitionJson = {}) {
|
|
24
|
-
super();
|
|
25
|
-
this.content = data.content ?? '';
|
|
26
|
-
this._rawSources = data.sources ?? [];
|
|
27
|
-
this._rawExamples = data.examples ?? [];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
get sources(): ReadonlyArray<Citation> {
|
|
31
|
-
return this._lazy<Citation>(
|
|
32
|
-
'_sources',
|
|
33
|
-
'_rawSources',
|
|
34
|
-
(s) => (s instanceof Citation ? s : new Citation(s as never)),
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
get examples(): ReadonlyArray<DetailedDefinition> {
|
|
39
|
-
return this._lazy<DetailedDefinition>(
|
|
40
|
-
'_examples',
|
|
41
|
-
'_rawExamples',
|
|
42
|
-
(e) =>
|
|
43
|
-
e instanceof DetailedDefinition
|
|
44
|
-
? e
|
|
45
|
-
: new DetailedDefinition(e as DetailedDefinitionJson),
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
override toJSON(): DetailedDefinitionJson {
|
|
50
|
-
const obj: DetailedDefinitionJson = { content: this.content };
|
|
51
|
-
this._serialize(obj as Record<string, unknown>, 'sources', '_sources', '_rawSources');
|
|
52
|
-
this._serialize(obj as Record<string, unknown>, 'examples', '_examples', '_rawExamples');
|
|
53
|
-
return obj;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Yield this definition's content and the content of every nested
|
|
58
|
-
* example (recursively). Each item carries `{ text, source }` where
|
|
59
|
-
* `source` is `<path>.content` rooted at the `path` argument.
|
|
60
|
-
*/
|
|
61
|
-
*walkTexts(path: string): Generator<WalkTextEntry> {
|
|
62
|
-
if (typeof this.content === 'string' && this.content.length > 0) {
|
|
63
|
-
yield { text: this.content, source: `${path}.content` };
|
|
64
|
-
}
|
|
65
|
-
const examples = this.examples;
|
|
66
|
-
for (let i = 0; i < examples.length; i++) {
|
|
67
|
-
const example = examples[i];
|
|
68
|
-
if (example) {
|
|
69
|
-
yield* example.walkTexts(`${path}.examples[${i}]`);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
static identityOf(
|
|
75
|
-
value: { toJSON?: () => unknown } | unknown | null,
|
|
76
|
-
): string {
|
|
77
|
-
if (value == null) return '';
|
|
78
|
-
if (typeof value === 'object' && value !== null && 'toJSON' in value &&
|
|
79
|
-
typeof (value as { toJSON: unknown }).toJSON === 'function') {
|
|
80
|
-
return canonicalJson((value as { toJSON: () => unknown }).toJSON());
|
|
81
|
-
}
|
|
82
|
-
return canonicalJson(value);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
override identity(): string {
|
|
86
|
-
return DetailedDefinition.identityOf(this);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
static override fromJSON(data: DetailedDefinitionJson): DetailedDefinition {
|
|
90
|
-
return new DetailedDefinition(data);
|
|
91
|
-
}
|
|
92
|
-
}
|
package/src/models/enum.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// Enum factory — produces a frozen KEY/VALUES bundle, a frozen values
|
|
2
|
-
// array, and an isValid predicate from a single `makeEnum` call.
|
|
3
|
-
//
|
|
4
|
-
// Adding a new enum means one line:
|
|
5
|
-
//
|
|
6
|
-
// export const COLOR = makeEnum('COLOR', { RED: 'red', BLUE: 'blue' });
|
|
7
|
-
//
|
|
8
|
-
// The factory returns an object that exposes both the per-value
|
|
9
|
-
// constants (COLOR.RED, COLOR.BLUE) and the VALUES list + isValid
|
|
10
|
-
// predicate. The bundle is itself frozen.
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Output of {@link makeEnum}. Captures both the original key→value
|
|
14
|
-
* pairs (so `MY_ENUM.MY_KEY` is the literal string value) and the
|
|
15
|
-
* helper properties (`name`, `VALUES`, `isValid`).
|
|
16
|
-
*/
|
|
17
|
-
export type EnumBundle<TValues extends Readonly<Record<string, string>>> = {
|
|
18
|
-
readonly name: string;
|
|
19
|
-
readonly VALUES: ReadonlyArray<TValues[keyof TValues]>;
|
|
20
|
-
readonly isValid: (value: unknown) => value is TValues[keyof TValues];
|
|
21
|
-
} & { readonly [K in keyof TValues]: TValues[K] };
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Build a frozen enum bundle.
|
|
25
|
-
*
|
|
26
|
-
* @param name Human-readable name used in error messages.
|
|
27
|
-
* @param values Object whose keys are the constant names and whose
|
|
28
|
-
* string values are the wire representations.
|
|
29
|
-
*/
|
|
30
|
-
export function makeEnum<const TValues extends Readonly<Record<string, string>>>(
|
|
31
|
-
name: string,
|
|
32
|
-
values: TValues,
|
|
33
|
-
): EnumBundle<TValues> {
|
|
34
|
-
if (typeof name !== 'string') {
|
|
35
|
-
throw new Error(`makeEnum: name must be a string, got ${typeof name}`);
|
|
36
|
-
}
|
|
37
|
-
if (typeof values !== 'object' || values === null) {
|
|
38
|
-
throw new Error(`makeEnum: values must be an object, got ${typeof values}`);
|
|
39
|
-
}
|
|
40
|
-
for (const [k, v] of Object.entries(values)) {
|
|
41
|
-
if (typeof v !== 'string') {
|
|
42
|
-
throw new Error(
|
|
43
|
-
`makeEnum(${name}): value for ${k} must be a string, got ${typeof v}`,
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const frozen = Object.freeze({ ...values });
|
|
49
|
-
const valuesArr = Object.freeze(Object.values(frozen)) as ReadonlyArray<
|
|
50
|
-
TValues[keyof TValues]
|
|
51
|
-
>;
|
|
52
|
-
const isValid = (v: unknown): v is TValues[keyof TValues] =>
|
|
53
|
-
typeof v === 'string' && (valuesArr as readonly string[]).includes(v);
|
|
54
|
-
|
|
55
|
-
return Object.assign(Object.create(null) as object, frozen, {
|
|
56
|
-
name,
|
|
57
|
-
VALUES: valuesArr,
|
|
58
|
-
isValid,
|
|
59
|
-
}) as EnumBundle<TValues>;
|
|
60
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// EquivalenceDegree — ISO 704:2022 §7.7.3 cross-language equivalence.
|
|
2
|
-
//
|
|
3
|
-
// full — equivalent intension across languages (default)
|
|
4
|
-
// partial — overlapping but not identical intension
|
|
5
|
-
// none — no corresponding concept in this language
|
|
6
|
-
// directional — monodirectional equivalence (see equivalence_note)
|
|
7
|
-
|
|
8
|
-
export type EquivalenceDegree =
|
|
9
|
-
| 'full'
|
|
10
|
-
| 'partial'
|
|
11
|
-
| 'none'
|
|
12
|
-
| 'directional';
|
|
13
|
-
|
|
14
|
-
export const EQUIVALENCE_DEGREE: Readonly<Record<Uppercase<EquivalenceDegree>, EquivalenceDegree>> = Object.freeze({
|
|
15
|
-
FULL: 'full',
|
|
16
|
-
PARTIAL: 'partial',
|
|
17
|
-
NONE: 'none',
|
|
18
|
-
DIRECTIONAL: 'directional',
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export const EQUIVALENCE_DEGREE_VALUES: ReadonlyArray<EquivalenceDegree> =
|
|
22
|
-
Object.freeze(Object.values(EQUIVALENCE_DEGREE));
|
|
23
|
-
|
|
24
|
-
export const DEFAULT_EQUIVALENCE_DEGREE: EquivalenceDegree =
|
|
25
|
-
EQUIVALENCE_DEGREE.FULL;
|
|
26
|
-
|
|
27
|
-
export function isValidEquivalenceDegree(value: unknown): value is EquivalenceDegree {
|
|
28
|
-
return (
|
|
29
|
-
typeof value === 'string' &&
|
|
30
|
-
(EQUIVALENCE_DEGREE_VALUES as readonly string[]).includes(value)
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default EQUIVALENCE_DEGREE;
|
package/src/models/figure.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { SharedNonVerbalEntity } from './shared-non-verbal-entity.js';
|
|
2
|
-
import type { SharedNonVerbalEntityJson } from './shared-non-verbal-entity.js';
|
|
3
|
-
import { NonVerbalEntity } from './non-verbal-entity.js';
|
|
4
|
-
|
|
5
|
-
export interface FigureImageJson {
|
|
6
|
-
src?: string | null;
|
|
7
|
-
format?: string | null;
|
|
8
|
-
role?: string | null;
|
|
9
|
-
width?: number | string | null;
|
|
10
|
-
height?: number | string | null;
|
|
11
|
-
scale?: number | string | null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export class FigureImage {
|
|
15
|
-
readonly src: string | null;
|
|
16
|
-
readonly format: string | null;
|
|
17
|
-
readonly role: string | null;
|
|
18
|
-
readonly width: number | string | null;
|
|
19
|
-
readonly height: number | string | null;
|
|
20
|
-
readonly scale: number | string | null;
|
|
21
|
-
|
|
22
|
-
constructor(data: FigureImageJson = {}) {
|
|
23
|
-
this.src = data.src ?? null;
|
|
24
|
-
this.format = data.format ?? null;
|
|
25
|
-
this.role = data.role ?? null;
|
|
26
|
-
this.width = data.width ?? null;
|
|
27
|
-
this.height = data.height ?? null;
|
|
28
|
-
this.scale = data.scale ?? null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
toJSON(): FigureImageJson {
|
|
32
|
-
const obj: FigureImageJson = {};
|
|
33
|
-
if (this.src != null) obj.src = this.src;
|
|
34
|
-
if (this.format != null) obj.format = this.format;
|
|
35
|
-
if (this.role != null) obj.role = this.role;
|
|
36
|
-
if (this.width != null) obj.width = this.width;
|
|
37
|
-
if (this.height != null) obj.height = this.height;
|
|
38
|
-
if (this.scale != null) obj.scale = this.scale;
|
|
39
|
-
return obj;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
static fromJSON(data: FigureImageJson): FigureImage {
|
|
43
|
-
return new FigureImage(data);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface FigureJson extends SharedNonVerbalEntityJson {
|
|
48
|
-
images?: ReadonlyArray<FigureImageJson>;
|
|
49
|
-
subfigures?: ReadonlyArray<FigureJson | Figure>;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export class Figure extends SharedNonVerbalEntity {
|
|
53
|
-
protected readonly _rawImages: ReadonlyArray<FigureImageJson | FigureImage>;
|
|
54
|
-
protected readonly _rawSubfigures: ReadonlyArray<FigureJson | Figure>;
|
|
55
|
-
protected _images: ReadonlyArray<FigureImage> | null = null;
|
|
56
|
-
protected _subfigures: ReadonlyArray<Figure> | null = null;
|
|
57
|
-
|
|
58
|
-
constructor(data: FigureJson = {}) {
|
|
59
|
-
super(data);
|
|
60
|
-
this._rawImages = data.images ?? [];
|
|
61
|
-
this._rawSubfigures = data.subfigures ?? [];
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
override rdfClass(): string {
|
|
65
|
-
return 'Figure';
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
get images(): ReadonlyArray<FigureImage> {
|
|
69
|
-
return this._lazy<FigureImage>(
|
|
70
|
-
'_images',
|
|
71
|
-
'_rawImages',
|
|
72
|
-
(i) => (i instanceof FigureImage ? i : new FigureImage(i as FigureImageJson)),
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
get subfigures(): ReadonlyArray<Figure> {
|
|
77
|
-
return this._lazy<Figure>(
|
|
78
|
-
'_subfigures',
|
|
79
|
-
'_rawSubfigures',
|
|
80
|
-
(s) => (s instanceof Figure ? s : new Figure(s as FigureJson)),
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
override findById(targetId: string): this | null {
|
|
85
|
-
if (this.id === targetId) return this;
|
|
86
|
-
for (const sub of this.subfigures) {
|
|
87
|
-
const found = sub.findById(targetId);
|
|
88
|
-
if (found) return found as this;
|
|
89
|
-
}
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
override allIds(): string[] {
|
|
94
|
-
const ids = this.id != null ? [this.id] : [];
|
|
95
|
-
return [...ids, ...this.subfigures.flatMap((s) => s.allIds())];
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
override toJSON(): FigureJson {
|
|
99
|
-
const obj = super.toJSON() as FigureJson;
|
|
100
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'images', '_images', '_rawImages');
|
|
101
|
-
this._serialize(obj as unknown as Record<string, unknown>, 'subfigures', '_subfigures', '_rawSubfigures');
|
|
102
|
-
return obj;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
static override fromJSON(data: FigureJson): Figure {
|
|
106
|
-
return new Figure(data);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
NonVerbalEntity.register('figure', Figure);
|
package/src/models/formula.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { SharedNonVerbalEntity } from './shared-non-verbal-entity.js';
|
|
2
|
-
import type { SharedNonVerbalEntityJson } from './shared-non-verbal-entity.js';
|
|
3
|
-
import { NonVerbalEntity } from './non-verbal-entity.js';
|
|
4
|
-
|
|
5
|
-
export interface FormulaJson extends SharedNonVerbalEntityJson {
|
|
6
|
-
expression?: string | null;
|
|
7
|
-
notation?: string | null;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export class Formula extends SharedNonVerbalEntity {
|
|
11
|
-
readonly expression: string | null;
|
|
12
|
-
readonly notation: string | null;
|
|
13
|
-
|
|
14
|
-
constructor(data: FormulaJson = {}) {
|
|
15
|
-
super(data);
|
|
16
|
-
this.expression = data.expression ?? null;
|
|
17
|
-
this.notation = data.notation ?? null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
override rdfClass(): string {
|
|
21
|
-
return 'Formula';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
override toJSON(): FormulaJson {
|
|
25
|
-
const obj = super.toJSON() as FormulaJson;
|
|
26
|
-
if (this.expression != null) obj.expression = this.expression;
|
|
27
|
-
if (this.notation != null) obj.notation = this.notation;
|
|
28
|
-
return obj;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
static override fromJSON(data: FormulaJson): Formula {
|
|
32
|
-
return new Formula(data);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
NonVerbalEntity.register('formula', Formula);
|