@accordproject/concerto-vocabulary 4.2.0 → 5.0.0-beta.2
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/esm/chunk-3VH3UOGB.mjs +398 -0
- package/dist/esm/chunk-3VH3UOGB.mjs.map +7 -0
- package/dist/esm/chunk-7RW3VXN4.mjs +185 -0
- package/dist/esm/chunk-7RW3VXN4.mjs.map +7 -0
- package/dist/esm/chunk-TA74NV57.mjs +38 -0
- package/dist/esm/chunk-TA74NV57.mjs.map +7 -0
- package/dist/esm/index.mjs +14 -0
- package/dist/esm/index.mjs.map +7 -0
- package/dist/esm/vocabulary.mjs +11 -0
- package/dist/esm/vocabulary.mjs.map +7 -0
- package/dist/esm/vocabularymanager.mjs +13 -0
- package/dist/esm/vocabularymanager.mjs.map +7 -0
- package/dist/esm/yamlparser.mjs +9 -0
- package/dist/esm/yamlparser.mjs.map +7 -0
- package/dist/esm-browser/chunk-2FE6COGH.mjs +2089 -0
- package/dist/esm-browser/chunk-2FE6COGH.mjs.map +7 -0
- package/dist/esm-browser/chunk-CKXQ5OWJ.mjs +187 -0
- package/dist/esm-browser/chunk-CKXQ5OWJ.mjs.map +7 -0
- package/dist/esm-browser/chunk-DSN2E4MW.mjs +6747 -0
- package/dist/esm-browser/chunk-DSN2E4MW.mjs.map +7 -0
- package/dist/esm-browser/chunk-K2X7J5YP.mjs +70 -0
- package/dist/esm-browser/chunk-K2X7J5YP.mjs.map +7 -0
- package/dist/esm-browser/index.mjs +18 -0
- package/dist/esm-browser/index.mjs.map +7 -0
- package/dist/esm-browser/vocabulary.mjs +10 -0
- package/dist/esm-browser/vocabulary.mjs.map +7 -0
- package/dist/esm-browser/vocabularymanager.mjs +12 -0
- package/dist/esm-browser/vocabularymanager.mjs.map +7 -0
- package/dist/esm-browser/yamlparser.mjs +8 -0
- package/dist/esm-browser/yamlparser.mjs.map +7 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/vocabulary.d.ts +3 -2
- package/dist/vocabulary.js +5 -1
- package/dist/vocabulary.js.map +1 -1
- package/dist/vocabularymanager.d.ts +3 -2
- package/dist/vocabularymanager.js +6 -3
- package/dist/vocabularymanager.js.map +1 -1
- package/package.json +18 -5
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../node_modules/@accordproject/concerto-metamodel/lib/metamodel.json", "../../node_modules/@accordproject/concerto-metamodel/lib/metamodel.js", "../../node_modules/@accordproject/concerto-metamodel/lib/metamodelutil.js", "../../node_modules/@accordproject/concerto-metamodel/lib/dcsmodel.js", "../../node_modules/@accordproject/concerto-metamodel/index.js", "../../src/vocabularymanager.ts"],
|
|
4
|
+
"sourcesContent": ["{\n \"$class\": \"concerto.metamodel@1.0.0.Model\",\n \"decorators\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.Decorator\",\n \"name\": \"DotNetNamespace\",\n \"arguments\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.DecoratorString\",\n \"value\": \"AccordProject.Concerto.Metamodel\"\n }\n ]\n }\n ],\n \"namespace\": \"concerto.metamodel@1.0.0\",\n \"imports\": [],\n \"declarations\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"Position\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"line\",\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"column\",\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"offset\",\n \"isArray\": false,\n \"isOptional\": false\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"Range\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"start\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Position\"\n },\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"end\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Position\"\n },\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"source\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"TypeIdentifier\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"name\",\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"namespace\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"resolvedName\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DecoratorLiteral\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"location\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Range\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DecoratorString\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"value\",\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"DecoratorLiteral\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DecoratorNumber\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.DoubleProperty\",\n \"name\": \"value\",\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"DecoratorLiteral\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DecoratorBoolean\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.BooleanProperty\",\n \"name\": \"value\",\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"DecoratorLiteral\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DecoratorTypeReference\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"type\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"TypeIdentifier\"\n },\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.BooleanProperty\",\n \"name\": \"isArray\",\n \"isArray\": false,\n \"isOptional\": false,\n \"defaultValue\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"DecoratorLiteral\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"Decorator\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"name\",\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"arguments\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"DecoratorLiteral\"\n },\n \"isArray\": true,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"location\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Range\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"Identified\",\n \"isAbstract\": false,\n \"properties\": []\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"IdentifiedBy\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"name\",\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Identified\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"Declaration\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"name\",\n \"isArray\": false,\n \"isOptional\": false,\n \"validator\": {\n \"$class\": \"concerto.metamodel@1.0.0.StringRegexValidator\",\n \"pattern\": \"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$\",\n \"flags\": \"u\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"decorators\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Decorator\"\n },\n \"isArray\": true,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"location\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Range\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"MapKeyType\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"decorators\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Decorator\"\n },\n \"isArray\": true,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"location\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Range\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"MapValueType\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"decorators\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Decorator\"\n },\n \"isArray\": true,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"location\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Range\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"MapDeclaration\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"key\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapKeyType\"\n },\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"value\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapValueType\"\n },\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Declaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"StringMapKeyType\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapKeyType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DateTimeMapKeyType\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapKeyType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"ObjectMapKeyType\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"type\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"TypeIdentifier\"\n },\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapKeyType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"BooleanMapValueType\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapValueType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DateTimeMapValueType\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapValueType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"StringMapValueType\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapValueType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"IntegerMapValueType\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapValueType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"LongMapValueType\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapValueType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DoubleMapValueType\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapValueType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"ObjectMapValueType\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"type\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"TypeIdentifier\"\n },\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapValueType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"RelationshipMapValueType\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"type\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"TypeIdentifier\"\n },\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"MapValueType\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"EnumDeclaration\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"properties\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"EnumProperty\"\n },\n \"isArray\": true,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Declaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"EnumProperty\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"name\",\n \"isArray\": false,\n \"isOptional\": false,\n \"validator\": {\n \"$class\": \"concerto.metamodel@1.0.0.StringRegexValidator\",\n \"pattern\": \"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$\",\n \"flags\": \"u\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"decorators\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Decorator\"\n },\n \"isArray\": true,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"location\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Range\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"ConceptDeclaration\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.BooleanProperty\",\n \"name\": \"isAbstract\",\n \"isArray\": false,\n \"isOptional\": false,\n \"defaultValue\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"identified\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Identified\"\n },\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"superType\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"TypeIdentifier\"\n },\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"properties\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Property\"\n },\n \"isArray\": true,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Declaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"AssetDeclaration\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"ConceptDeclaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"ParticipantDeclaration\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"ConceptDeclaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"TransactionDeclaration\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"ConceptDeclaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"EventDeclaration\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"ConceptDeclaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"Property\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"name\",\n \"isArray\": false,\n \"isOptional\": false,\n \"validator\": {\n \"$class\": \"concerto.metamodel@1.0.0.StringRegexValidator\",\n \"pattern\": \"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$\",\n \"flags\": \"u\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.BooleanProperty\",\n \"name\": \"isArray\",\n \"isArray\": false,\n \"isOptional\": false,\n \"defaultValue\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.BooleanProperty\",\n \"name\": \"isOptional\",\n \"isArray\": false,\n \"isOptional\": false,\n \"defaultValue\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"sizeValidator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"CollectionSizeValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"decorators\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Decorator\"\n },\n \"isArray\": true,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"location\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Range\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"CollectionSizeValidator\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"minSize\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"maxSize\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"RelationshipProperty\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"type\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"TypeIdentifier\"\n },\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Property\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"ObjectProperty\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"type\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"TypeIdentifier\"\n },\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Property\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"BooleanProperty\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.BooleanProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Property\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DateTimeProperty\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Property\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"StringProperty\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"validator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"StringRegexValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"lengthValidator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"StringLengthValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Property\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"StringRegexValidator\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"pattern\",\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"flags\",\n \"isArray\": false,\n \"isOptional\": false\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"StringLengthValidator\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"minLength\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"maxLength\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DoubleProperty\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.DoubleProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"validator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"DoubleDomainValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Property\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DoubleDomainValidator\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.DoubleProperty\",\n \"name\": \"lower\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.DoubleProperty\",\n \"name\": \"upper\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"IntegerProperty\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"validator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"IntegerDomainValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Property\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"IntegerDomainValidator\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"lower\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"upper\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"LongProperty\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.LongProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"validator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"LongDomainValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Property\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"LongDomainValidator\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.LongProperty\",\n \"name\": \"lower\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.LongProperty\",\n \"name\": \"upper\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"AliasedType\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"name\",\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"aliasedName\",\n \"isArray\": false,\n \"isOptional\": false\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"Import\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"namespace\",\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"uri\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"ImportAll\",\n \"isAbstract\": false,\n \"properties\": [],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Import\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"ImportType\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"name\",\n \"isArray\": false,\n \"isOptional\": false\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Import\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"ImportTypes\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"types\",\n \"isArray\": true,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"aliasedTypes\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"AliasedType\"\n },\n \"isArray\": true,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Import\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"Model\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"namespace\",\n \"isArray\": false,\n \"isOptional\": false\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"sourceUri\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"concertoVersion\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"imports\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Import\"\n },\n \"isArray\": true,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"declarations\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Declaration\"\n },\n \"isArray\": true,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"decorators\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Decorator\"\n },\n \"isArray\": true,\n \"isOptional\": true\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"Models\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"models\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Model\"\n },\n \"isArray\": true,\n \"isOptional\": false\n }\n ]\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"ScalarDeclaration\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"namespace\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"Declaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"BooleanScalar\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.BooleanProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"ScalarDeclaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"IntegerScalar\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.IntegerProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"validator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"IntegerDomainValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"ScalarDeclaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"LongScalar\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.LongProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"validator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"LongDomainValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"ScalarDeclaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DoubleScalar\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.DoubleProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"validator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"DoubleDomainValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"ScalarDeclaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"StringScalar\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"validator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"StringRegexValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ObjectProperty\",\n \"name\": \"lengthValidator\",\n \"type\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"StringLengthValidator\"\n },\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"ScalarDeclaration\"\n }\n },\n {\n \"$class\": \"concerto.metamodel@1.0.0.ConceptDeclaration\",\n \"name\": \"DateTimeScalar\",\n \"isAbstract\": false,\n \"properties\": [\n {\n \"$class\": \"concerto.metamodel@1.0.0.StringProperty\",\n \"name\": \"defaultValue\",\n \"isArray\": false,\n \"isOptional\": true\n }\n ],\n \"superType\": {\n \"$class\": \"concerto.metamodel@1.0.0.TypeIdentifier\",\n \"name\": \"ScalarDeclaration\"\n }\n }\n ]\n}\n", "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable */\n\n'use strict';\n\n/**\n * The metamodel itself, as a CTO string\n */\nconst metaModelCto = \"/*\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n@DotNetNamespace(\\\"AccordProject.Concerto.Metamodel\\\")\\nnamespace concerto.metamodel@1.0.0\\n\\nconcept Position {\\n o Integer line\\n o Integer column\\n o Integer offset\\n}\\n\\nconcept Range {\\n o Position start\\n o Position end\\n o String source optional\\n}\\n\\nconcept TypeIdentifier {\\n o String name\\n o String namespace optional\\n o String resolvedName optional\\n}\\n\\nabstract concept DecoratorLiteral {\\n o Range location optional\\n}\\n\\nconcept DecoratorString extends DecoratorLiteral {\\n o String value\\n}\\n\\nconcept DecoratorNumber extends DecoratorLiteral {\\n o Double value\\n}\\n\\nconcept DecoratorBoolean extends DecoratorLiteral {\\n o Boolean value\\n}\\n\\nconcept DecoratorTypeReference extends DecoratorLiteral {\\n o TypeIdentifier type\\n o Boolean isArray default=false\\n}\\n\\nconcept Decorator {\\n o String name\\n o DecoratorLiteral[] arguments optional\\n o Range location optional\\n}\\n\\nconcept Identified {\\n}\\n\\nconcept IdentifiedBy extends Identified {\\n o String name\\n}\\n\\nabstract concept Declaration {\\n o String name regex=/^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$/u\\n o Decorator[] decorators optional\\n o Range location optional\\n}\\n\\nabstract concept MapKeyType {\\n o Decorator[] decorators optional\\n o Range location optional\\n}\\n\\nabstract concept MapValueType {\\n o Decorator[] decorators optional\\n o Range location optional\\n}\\n\\nconcept MapDeclaration extends Declaration {\\n o MapKeyType key\\n o MapValueType value\\n}\\n\\nconcept StringMapKeyType extends MapKeyType {}\\nconcept DateTimeMapKeyType extends MapKeyType {}\\n\\nconcept ObjectMapKeyType extends MapKeyType {\\n o TypeIdentifier type\\n}\\n\\nconcept BooleanMapValueType extends MapValueType {}\\nconcept DateTimeMapValueType extends MapValueType {}\\nconcept StringMapValueType extends MapValueType {}\\nconcept IntegerMapValueType extends MapValueType {}\\nconcept LongMapValueType extends MapValueType {}\\nconcept DoubleMapValueType extends MapValueType {}\\n\\nconcept ObjectMapValueType extends MapValueType {\\n o TypeIdentifier type\\n}\\n\\nconcept RelationshipMapValueType extends MapValueType {\\n o TypeIdentifier type\\n}\\n\\nconcept EnumDeclaration extends Declaration {\\n o EnumProperty[] properties\\n}\\n\\nconcept EnumProperty {\\n o String name regex=/^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$/u\\n o Decorator[] decorators optional\\n o Range location optional\\n}\\n\\nconcept ConceptDeclaration extends Declaration {\\n o Boolean isAbstract default=false\\n o Identified identified optional\\n o TypeIdentifier superType optional\\n o Property[] properties\\n}\\n\\nconcept AssetDeclaration extends ConceptDeclaration {\\n}\\n\\nconcept ParticipantDeclaration extends ConceptDeclaration {\\n}\\n\\nconcept TransactionDeclaration extends ConceptDeclaration {\\n}\\n\\nconcept EventDeclaration extends ConceptDeclaration {\\n}\\n\\nabstract concept Property {\\n o String name regex=/^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$/u\\n o Boolean isArray default=false\\n o Boolean isOptional default=false\\n o CollectionSizeValidator sizeValidator optional\\n o Decorator[] decorators optional\\n o Range location optional\\n}\\n\\nconcept CollectionSizeValidator {\\n o Integer minSize optional\\n o Integer maxSize optional\\n}\\n\\nconcept RelationshipProperty extends Property {\\n o TypeIdentifier type\\n}\\n\\nconcept ObjectProperty extends Property {\\n o String defaultValue optional\\n o TypeIdentifier type\\n}\\n\\nconcept BooleanProperty extends Property {\\n o Boolean defaultValue optional\\n}\\n\\nconcept DateTimeProperty extends Property {\\n}\\n\\nconcept StringProperty extends Property {\\n o String defaultValue optional\\n o StringRegexValidator validator optional\\n o StringLengthValidator lengthValidator optional\\n}\\n\\nconcept StringRegexValidator {\\n o String pattern\\n o String flags\\n}\\n\\nconcept StringLengthValidator {\\n o Integer minLength optional\\n o Integer maxLength optional\\n}\\n\\nconcept DoubleProperty extends Property {\\n o Double defaultValue optional\\n o DoubleDomainValidator validator optional\\n}\\n\\nconcept DoubleDomainValidator {\\n o Double lower optional\\n o Double upper optional\\n}\\n\\nconcept IntegerProperty extends Property {\\n o Integer defaultValue optional\\n o IntegerDomainValidator validator optional\\n}\\n\\nconcept IntegerDomainValidator {\\n o Integer lower optional\\n o Integer upper optional\\n}\\n\\nconcept LongProperty extends Property {\\n o Long defaultValue optional\\n o LongDomainValidator validator optional\\n}\\n\\nconcept LongDomainValidator {\\n o Long lower optional\\n o Long upper optional\\n}\\n\\nconcept AliasedType{\\n o String name\\n o String aliasedName\\n}\\nabstract concept Import {\\n o String namespace\\n o String uri optional\\n}\\n\\nconcept ImportAll extends Import {\\n}\\n\\nconcept ImportType extends Import {\\n o String name\\n}\\n\\nconcept ImportTypes extends Import {\\n o String[] types\\n o AliasedType[] aliasedTypes optional\\n}\\n\\nconcept Model {\\n o String namespace\\n o String sourceUri optional\\n o String concertoVersion optional\\n o Import[] imports optional\\n o Declaration[] declarations optional\\n o Decorator[] decorators optional\\n}\\n\\nconcept Models {\\n o Model[] models\\n}\\n\\nabstract concept ScalarDeclaration extends Declaration {\\n o String namespace optional\\n}\\n\\nconcept BooleanScalar extends ScalarDeclaration {\\n o Boolean defaultValue optional\\n}\\n\\nconcept IntegerScalar extends ScalarDeclaration {\\n o Integer defaultValue optional\\n o IntegerDomainValidator validator optional\\n}\\n\\nconcept LongScalar extends ScalarDeclaration {\\n o Long defaultValue optional\\n o LongDomainValidator validator optional\\n}\\n\\nconcept DoubleScalar extends ScalarDeclaration {\\n o Double defaultValue optional\\n o DoubleDomainValidator validator optional\\n}\\n\\nconcept StringScalar extends ScalarDeclaration {\\n o String defaultValue optional\\n o StringRegexValidator validator optional\\n o StringLengthValidator lengthValidator optional\\n}\\n\\nconcept DateTimeScalar extends ScalarDeclaration {\\n o String defaultValue optional\\n}\\n\";\n\nmodule.exports = metaModelCto;\n", "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use strict';\n\n/**\n * The metamodel itself, as an AST.\n * @type unknown\n */\nconst metaModelAst = require('./metamodel.json');\n\n/**\n * The namespace for the metamodel\n */\nconst MetaModelNamespace = 'concerto.metamodel@1.0.0';\n\n/**\n * The metamodel itself, as a CTO string\n */\nconst metaModelCto = require('./metamodel.js');\n\n/**\n * Find the model for a given namespace\n * @param {*} priorModels - known models\n * @param {string} namespace - the namespace\n * @return {*} the model\n */\nfunction findNamespace(priorModels, namespace) {\n return priorModels.models.find((thisModel) => thisModel.namespace === namespace);\n}\n\n/**\n * Find a declaration for a given name in a model\n * @param {*} thisModel - the model\n * @param {string} name - the declaration name\n * @return {*} the declaration\n */\nfunction findDeclaration(thisModel, name) {\n return thisModel.declarations.find((thisDecl) => thisDecl.name === name);\n}\n\n/**\n * Create a name resolution table\n * @param {*} priorModels - known models\n * @param {object} metaModel - the metamodel (JSON)\n * @return {object} mapping from a name to its namespace\n */\nfunction createNameTable(priorModels, metaModel) {\n const concertoNs = 'concerto@1.0.0';\n const table = {\n 'Concept': {namespace: concertoNs, name: 'Concept'},\n 'Asset': {namespace: concertoNs, name: 'Asset'},\n 'Participant': {namespace: concertoNs, name: 'Participant'},\n 'Transaction': {namespace: concertoNs, name: 'Transaction'},\n 'Event': {namespace: concertoNs, name: 'Event'},\n };\n\n // First list the imported names in order (overriding as we go along)\n (metaModel.imports || []).forEach((imp) => {\n const namespace = imp.namespace;\n const modelFile = findNamespace(priorModels, namespace);\n if (imp.$class === `${MetaModelNamespace}.ImportType`) {\n if (!findDeclaration(modelFile, imp.name)) {\n throw new Error(`Declaration ${imp.name} in namespace ${namespace} not found`);\n }\n table[imp.name] = {namespace, name: imp.name};\n } else if (imp.$class === `${MetaModelNamespace}.ImportTypes`) {\n // Create a map of aliased types if they exist, otherwise initialize an empty map.\n const aliasedMap = imp.aliasedTypes\n ? new Map(imp.aliasedTypes.map(({ name, aliasedName }) => [name, aliasedName]))\n : new Map();\n imp.types.forEach((type) => {\n // 'localName' is the identifier used to refer to the imported type, as it can be aliased..\n const localName = aliasedMap.get(type) || type;\n\n // Verify if the type declaration exists in the model file.\n // Here, 'type' refers to the actual declaration name within the model file that is being imported.\n if (!findDeclaration(modelFile, type)) {\n throw new Error(`Declaration ${type} in namespace ${namespace} not found`);\n }\n table[localName] = localName !== type ? {namespace, name: localName, resolvedName: type} : {namespace, name: type};\n });\n } else {\n (modelFile.declarations || []).forEach((decl) => {\n table[decl.name] = {namespace, name: decl.name};\n });\n }\n });\n\n // Then add the names local to this metaModel (overriding as we go along)\n (metaModel.declarations || []).forEach((decl) => {\n table[decl.name] = {namespace: metaModel.namespace, name: decl.name};\n });\n\n return table;\n}\n\n/**\n * Resolve a name using the name table\n * @param {string} name - the name of the type to resolve\n * @param {object} table - the name table\n * @return {string} the namespace for that name\n */\nfunction resolveName(name, table) {\n if (!table[name]) {\n throw new Error(`Name ${name} not found`);\n }\n return table[name].namespace;\n}\n\n/**\n * Name resolution for metamodel\n * @param {object} metaModel - the metamodel (JSON)\n * @param {object} table - the name table\n * @return {object} the metamodel with fully qualified names\n */\nfunction resolveTypeNames(metaModel, table) {\n // any element can have a decorator (including primitive fields) , so lets resolve those first\n (metaModel.decorators || []).forEach((decorator) => {\n resolveTypeNames(decorator, table);\n });\n\n switch (metaModel.$class) {\n case `${MetaModelNamespace}.Model`: {\n (metaModel.declarations || []).forEach((decl) => {\n resolveTypeNames(decl, table);\n });\n }\n break;\n case `${MetaModelNamespace}.EnumDeclaration`:\n case `${MetaModelNamespace}.AssetDeclaration`:\n case `${MetaModelNamespace}.ConceptDeclaration`:\n case `${MetaModelNamespace}.EventDeclaration`:\n case `${MetaModelNamespace}.TransactionDeclaration`:\n case `${MetaModelNamespace}.ParticipantDeclaration`: {\n if (metaModel.superType) {\n const name = metaModel.superType.name;\n metaModel.superType.namespace = resolveName(name, table);\n metaModel.superType.name = table[name].name;\n if (table[name]?.resolvedName) {\n metaModel.superType.resolvedName = table[name].resolvedName;\n }\n }\n (metaModel.properties || []).forEach((property) => {\n resolveTypeNames(property, table);\n });\n }\n break;\n case `${MetaModelNamespace}.MapDeclaration`: {\n resolveTypeNames(metaModel.key, table);\n resolveTypeNames(metaModel.value, table);\n }\n break;\n case `${MetaModelNamespace}.Decorator`: {\n (metaModel.arguments || []).forEach((argument) => {\n resolveTypeNames(argument, table);\n });\n }\n break;\n case `${MetaModelNamespace}.ObjectProperty`:\n case `${MetaModelNamespace}.RelationshipProperty`:\n case `${MetaModelNamespace}.DecoratorTypeReference`:\n case `${MetaModelNamespace}.ObjectMapKeyType`:\n case `${MetaModelNamespace}.ObjectMapValueType`:\n case `${MetaModelNamespace}.RelationshipMapValueType`: {\n metaModel.type.namespace = resolveName(metaModel.type.name, table);\n metaModel.type.name = table[metaModel.type.name].name;\n if (table[metaModel.type.name]?.resolvedName) {\n metaModel.type.resolvedName = table[metaModel.type.name].resolvedName;\n }\n }\n break;\n case `${MetaModelNamespace}.StringScalar`:\n case `${MetaModelNamespace}.BooleanScalar`:\n case `${MetaModelNamespace}.DateTimeScalar`:\n case `${MetaModelNamespace}.DoubleScalar`:\n case `${MetaModelNamespace}.LongScalar`:\n case `${MetaModelNamespace}.IntegerScalar`: {\n metaModel.namespace = resolveName(metaModel.name, table);\n metaModel.name = table[metaModel.name].name;\n }\n break;\n default: {\n if (!metaModel.$class) {\n throw new Error(`Unrecognized $class ${String(metaModel.$class)}`);\n }\n }\n }\n return metaModel;\n}\n\n/**\n * Resolve the namespace for names in the metamodel\n * @param {*} priorModels - known models\n * @param {object} metaModel - the MetaModel\n * @return {object} the resolved metamodel\n */\nfunction resolveLocalNames(priorModels, metaModel) {\n const result = JSON.parse(JSON.stringify(metaModel));\n const nameTable = createNameTable(priorModels, metaModel);\n // This adds the fully qualified names to the same object\n resolveTypeNames(result, nameTable);\n return result;\n}\n\n/**\n * Resolve the namespace for names in the metamodel\n * @param {*} allModels - known models\n * @return {object} the resolved metamodel\n */\nfunction resolveLocalNamesForAll(allModels) {\n const result = {\n $class: `${MetaModelNamespace}.Models`,\n models: [],\n };\n allModels.models.forEach((metaModel) => {\n const resolved = resolveLocalNames(allModels, metaModel);\n result.models.push(resolved);\n });\n return result;\n}\n\n/**\n * Return the fully qualified name for an import\n * @param {object} imp - the import\n * @return {string[]} - the fully qualified names for that import\n * @private\n */\nfunction importFullyQualifiedNames(imp) {\n const result = [];\n\n switch (imp.$class) {\n case `${MetaModelNamespace}.ImportAll`:\n result.push(`${imp.namespace}.*`);\n break;\n case `${MetaModelNamespace}.ImportType`:\n result.push(`${imp.namespace}.${imp.name}`);\n break;\n case `${MetaModelNamespace}.ImportTypes`: {\n imp.types.forEach(type => {\n result.push(`${imp.namespace}.${type}`);\n });\n }\n break;\n default:\n throw new Error(`Unrecognized imports ${imp.$class}`);\n }\n return result;\n}\n\n/**\n * Returns an object that maps from the import declarations to the URIs specified\n * @param {*} ast - the model ast\n * @return {Object} keys are import declarations, values are URIs\n * @private\n */\nfunction getExternalImports(ast) {\n const uriMap = {};\n if (ast.imports) {\n ast.imports.forEach((imp) => {\n const fqns = importFullyQualifiedNames(imp);\n if (imp.uri) {\n uriMap[fqns[0]] = imp.uri;\n }\n });\n }\n return uriMap;\n}\n\nmodule.exports = {\n metaModelAst,\n metaModelCto,\n resolveLocalNames,\n resolveLocalNamesForAll,\n importFullyQualifiedNames,\n getExternalImports,\n};\n", "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable */\n\n'use strict';\n\nconst DcsCto = \"/*\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\nnamespace org.accordproject.decoratorcommands@0.4.0\\n\\nimport concerto.metamodel@1.0.0.Decorator\\n\\n/**\\n * A reference to an existing named & versioned DecoratorCommandSet\\n */\\nconcept DecoratorCommandSetReference {\\n o String name\\n o String version\\n}\\n\\n/**\\n * Whether to upsert or append the decorator\\n */\\nenum CommandType {\\n o UPSERT\\n o APPEND\\n}\\n\\n/**\\n * Which models elements to add the decorator to. Any null\\n * elements are 'wildcards'.\\n */\\nconcept CommandTarget {\\n o String namespace optional\\n o String declaration optional\\n o String property optional\\n o String[] properties optional // property and properties are mutually exclusive\\n o String type optional\\n o MapElement mapElement optional\\n}\\n\\n/**\\n * Map Declaration elements which might be used as a target\\n */\\nenum MapElement {\\n o KEY\\n o VALUE\\n o KEY_VALUE\\n}\\n\\n/**\\n * Applies a decorator to a given target\\n */\\nconcept Command {\\n o CommandTarget target\\n o Decorator decorator\\n o CommandType type\\n o String decoratorNamespace optional\\n}\\n\\n/**\\n * A named and versioned set of commands. Includes are supported for modularity/reuse.\\n */\\nconcept DecoratorCommandSet {\\n o String name\\n o String version\\n o DecoratorCommandSetReference[] includes optional // not yet supported\\n o Command[] commands\\n}\";\nconst DcsNamespace = \"org.accordproject.decoratorcommands@0.4.0\";\nmodule.exports = {\n DcsCto,\n DcsNamespace\n};", "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use strict';\n\n/**\n * Concerto metamodel management. Concerto is a framework for defining domain\n * specific models.\n *\n * @module concerto-metamodel\n */\n\n// MetaModel handling\nconst MetaModelUtil = require('./lib/metamodelutil');\nconst { DcsCto, DcsNamespace } = require('./lib/dcsmodel');\n\n// Two details below are deliberate, and both matter to cjs-module-lexer - the\n// static analyzer Node's ESM loader uses to detect the named exports of a\n// CommonJS module. The exports are assigned individually rather than as a\n// single `module.exports = { ... }` object, and MetaModelNamespace is a local\n// binding rather than an inline string literal. Within an object literal the\n// lexer only recognises shorthand and `key: identifier` entries, so the\n// previous `MetaModelNamespace: 'concerto.metamodel@1.0.0'` halted its scan\n// and silently hid DcsCto and DcsNamespace from ESM `import { ... }`.\nconst MetaModelNamespace = /** @type {string} */ ('concerto.metamodel@1.0.0');\n\nexports.MetaModelUtil = MetaModelUtil;\nexports.MetaModelNamespace = MetaModelNamespace;\nexports.DcsCto = DcsCto;\nexports.DcsNamespace = DcsNamespace;\n", "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport YAML from 'yaml';\nimport { MetaModelNamespace } from '@accordproject/concerto-metamodel';\nimport Vocabulary from './vocabulary';\nimport { ModelUtil, ModelManager } from '@accordproject/concerto-core';\nimport { parseVocabularyYaml } from './yamlparser';\n\nconst DC_NAMESPACE = 'org.accordproject.decoratorcommands@0.4.0';\n\n/**\n * Converts a camel case string to a sentence\n * @param {string} text input\n * @returns {string} modified string\n */\nfunction camelCaseToSentence(text: string): string {\n const result = text.replace(/([A-Z]+)/g, ' $1').trim();\n return result.charAt(0).toUpperCase() + result.slice(1);\n}\n\n/**\n* A vocabulary manager for concerto models. The vocabulary manager\n* stores and provides API access to a set of vocabulary files, where each file\n* is associated with a BCP-47 language tag and a Concerto namespace.\n* @see https://datatracker.ietf.org/doc/html/rfc5646#section-2\n* @class\n* @memberof module:concerto-vocabulary\n*/\nclass VocabularyManager {\n public vocabularies: Record<string, Vocabulary>;\n public missingTermGenerator: any;\n\n /**\n * Create the VocabularyManager\n * @param {*} [options] options to configure vocabulary lookup\n * @param {*} [options.missingTermGenerator] A function to call for missing terms. The function\n * should accept namespace, locale, declarationName, propertyName as arguments\n * @constructor\n */\n constructor(options?: any) {\n this.vocabularies = {}; // key is namespace/locale, value is a Vocabulary object\n this.missingTermGenerator = options ? options.missingTermGenerator : null;\n }\n\n /**\n * Computes a term in English based on declaration and property name.\n * @param {string} namespace the namespace\n * @param {string} locale the BCP-47 locale identifier\n * @param {string} declarationName the name of a concept or enum\n * @param {string} [propertyName] the name of a property (optional)\n * @returns {string} the term or null if it does not exist\n */\n static englishMissingTermGenerator(namespace: string, locale: string, declarationName: string, propertyName?: string): string {\n if(!declarationName){\n return camelCaseToSentence(ModelUtil.parseNamespace(namespace).name);\n }\n const firstPart = propertyName ? propertyName.replace('$', '') + ' of the' : '';\n return camelCaseToSentence(firstPart + declarationName);\n }\n\n /**\n * Removes all vocabularies\n */\n clear() {\n this.vocabularies = {};\n }\n\n /**\n * Removes a vocabulary from the vocabulary manager\n * @param {string} namespace the namespace for the vocabulary\n * @param {string} locale the BCP-47 locale identifier\n */\n removeVocabulary(namespace: string, locale: string) {\n delete this.vocabularies[`${namespace}/${locale}`];\n }\n\n /**\n * Adds a vocabulary to the vocabulary manager\n * @param {string} contents the YAML string for the vocabulary\n * @param {*} [options] options to configure vocabulary parsing\n * @param {boolean} [options.enableSafeVocabParsing] When true, ensures vocabulary values are resolved correctly as strings\n * @returns {Vocabulary} the vocabulary the was added\n */\n addVocabulary(contents: any, options?: any): Vocabulary {\n if (!contents) {\n throw new Error('Vocabulary contents must be specified');\n }\n const voc = new Vocabulary(this, options?.enableSafeVocabParsing ? parseVocabularyYaml(contents) : YAML.parse(contents));\n\n if (this.vocabularies[voc.getIdentifier()]) {\n throw new Error('Vocabulary has already been added.');\n }\n this.vocabularies[voc.getIdentifier()] = voc;\n return voc;\n }\n\n /**\n * Finds the vocabulary for a requested locale, removing language\n * identifiers from the locale until the locale matches, or if no\n * vocabulary is found, null is returned\n * @param {string} requestedLocale the BCP-47 locale identifier\n * @param {Vocabulary[]} vocabularies the vocabularies to match against\n * @param {*} [options] options to configure vocabulary lookup\n * @param {*} [options.localeMatcher] Pass 'lookup' to find a general vocabulary, if available\n * @returns {Vocabulary} the most specific vocabulary, or null\n */\n static findVocabulary(requestedLocale: string, vocabularies: Vocabulary[], options?: any): Vocabulary | null {\n let locale = requestedLocale;\n let done = false;\n do {\n const voc = vocabularies.find(v => v.getLocale() === locale);\n if (voc) {\n return voc;\n }\n\n if (options?.localeMatcher !== 'lookup') {\n done = true;\n break;\n }\n\n const pos = locale.lastIndexOf('-');\n if (pos === -1) {\n done = true;\n break;\n }\n locale = locale.substring(0, pos);\n } while (!done);\n return null;\n }\n\n /**\n * Gets a vocabulary for a given namespace plus locale\n * @param {string} namespace the namespace for the vocabulary\n * @param {string} locale the BCP-47 locale identifier\n * @param {*} [options] options to configure vocabulary lookup\n * @param {*} [options.localeMatcher] Pass 'lookup' to find a general vocabulary, if available\n * @returns {Vocabulary} the vocabulary or null if no vocabulary exists for the locale\n */\n getVocabulary(namespace: string, locale: string, options?: any): Vocabulary | null {\n const loc = locale.toLowerCase();\n const voc = this.vocabularies[`${namespace}/${loc}`];\n if (voc) {\n return voc;\n }\n if (options?.localeMatcher === 'lookup') {\n const vocs = this.getVocabulariesForNamespace(namespace);\n return VocabularyManager.findVocabulary(loc, vocs, options);\n }\n return null;\n }\n\n /**\n * Gets all the vocabulary files for a given namespace\n * @param {string} namespace the namespace\n * @returns {Vocabulary[]} the array of vocabularies\n */\n getVocabulariesForNamespace(namespace: string): Vocabulary[] {\n return Object.values(this.vocabularies).filter(v => v.getNamespace() === namespace);\n }\n\n /**\n * Gets all the vocabulary files for a given locale\n * @param {string} locale the BCP-47 locale identifier\n * @returns {Vocabulary[]} the array of vocabularies\n */\n getVocabulariesForLocale(locale: string): Vocabulary[] {\n return Object.values(this.vocabularies).filter(v => v.getLocale() === locale.toLowerCase());\n }\n\n /**\n * Resolve the term for a property, looking up terms from a more general vocabulary\n * if required, and resolving properties using an object manager, allowing terms defined\n * on super types to be automatically resolved.\n * @param {ModelManager} modelManager the model manager\n * @param {string} namespace the namespace\n * @param {string} locale the BCP-47 locale identifier\n * @param {string} declarationName the name of a concept or enum\n * @param {string} [propertyName] the name of a property (optional)\n * @param {string} [identifier] the identifier of the term (optional)\n * @returns {string|number|boolean|null} the term or null if it does not exist\n */\n resolveTerm(modelManager: ModelManager, namespace: string, locale: string, declarationName: string, propertyName?: string, identifier?: string): string | number | boolean | null {\n const modelFile = modelManager.getModelFile(namespace);\n // @ts-ignore\n const classDecl = modelFile ? (modelFile as any).getType(declarationName) : null;\n const property = propertyName ? classDecl ? classDecl.getProperty(propertyName) : null : null;\n return this.getTerm(property ? property.getNamespace() : namespace, locale, property ? (property.getParent() as any).getName() : declarationName, propertyName, identifier);\n }\n\n /**\n * Resolve the terms for a property, looking up terms from a more general vocabulary\n * if required, and resolving properties using an object manager, allowing terms defined\n * on super types to be automatically resolved.\n * @param {ModelManager} modelManager the model manager\n * @param {string} namespace the namespace\n * @param {string} locale the BCP-47 locale identifier\n * @param {string} declarationName the name of a concept or enum\n * @param {string} [propertyName] the name of a property (optional)\n * @param {*} [options] options to configure term resolution\n * @param {boolean} [options.generateMissing=true] whether to synthesize missing terms\n * @returns {*} the terms or null if it does not exist\n */\n resolveTerms(modelManager: ModelManager, namespace: string, locale: string, declarationName: string, propertyName?: string, options?: any) {\n const modelFile = modelManager.getModelFile(namespace);\n // @ts-ignore\n const classDecl = modelFile ? (modelFile as any).getType(declarationName) : null;\n let property;\n if(classDecl && !classDecl.isScalarDeclaration()) {\n if(classDecl.isMapDeclaration()) {\n if(propertyName === 'KEY') {\n property = classDecl.getKey();\n } else if(propertyName === 'VALUE') {\n property = classDecl.getValue();\n }\n } else {\n property = propertyName ? classDecl ? classDecl.getProperty(propertyName) : null : null;\n }\n }\n return this.getTerms(property ? property.getNamespace() : namespace, locale, property ? (property.getParent() as any).getName() : declarationName, propertyName, options);\n }\n\n /**\n * Gets the term for a concept, enum or property, looking up terms\n * from a more general vocabulary if required\n * @param {string} namespace the namespace\n * @param {string} locale the BCP-47 locale identifier\n * @param {string} declarationName the name of a concept or enum\n * @param {string} [propertyName] the name of a property (optional)\n * @param {string} [identifier] the identifier of the term (optional)\n * @returns {string|number|boolean|null} the term or null if it does not exist\n */\n getTerm(namespace: string, locale: string, declarationName: string, propertyName?: string, identifier?: string): string | number | boolean | null {\n const voc = this.getVocabulary(namespace, locale);\n let term = null;\n if (voc) {\n term = voc.getTerm(declarationName, propertyName, identifier);\n }\n if (term != null) {\n return term;\n }\n else {\n const dashIndex = locale.lastIndexOf('-');\n if (dashIndex >= 0) {\n return this.getTerm(namespace, locale.substring(0, dashIndex), declarationName, propertyName, identifier);\n }\n else {\n return this.missingTermGenerator ? this.missingTermGenerator(namespace, locale, declarationName, propertyName) : null;\n }\n }\n }\n\n /**\n * Gets the term for a concept, enum or property, looking up terms\n * from a more general vocabulary if required\n * @param {string} namespace the namespace\n * @param {string} locale the BCP-47 locale identifier\n * @param {string} declarationName the name of a concept or enum\n * @param {string} [propertyName] the name of a property (optional)\n * @param {*} [options] options to configure term resolution\n * @param {boolean} [options.generateMissing=true] whether to synthesize missing terms\n * @returns {*} the terms or null if it does not exist\n */\n getTerms(namespace: string, locale: string, declarationName: string, propertyName?: string, options?: any): any {\n const voc = this.getVocabulary(namespace, locale);\n let term = null;\n if (voc) {\n term = voc.getElementTerms(declarationName, propertyName);\n }\n if (term != null) {\n return term;\n }\n else {\n const dashIndex = locale.lastIndexOf('-');\n if (dashIndex >= 0) {\n return this.getTerms(namespace, locale.substring(0, dashIndex), declarationName, propertyName, options);\n }\n else {\n if (options?.generateMissing === false) {\n return;\n }\n let missingKey = propertyName ? propertyName : declarationName;\n missingKey = missingKey? missingKey : 'term';\n return this.missingTermGenerator ? { [missingKey]: this.missingTermGenerator(namespace, locale, declarationName, propertyName) } : null;\n }\n }\n }\n\n /**\n * Creates a DecoractorCommandSet with @Term decorators\n * to decorate all model elements based on the vocabulary for a locale.\n * Pass the return value to the DecoratorManager.decorateModel to apply\n * the decorators to a ModelManager.\n * @param {ModelManager} modelManager - the Model Manager\n * @param {string} locale the BCP-47 locale identifier\n * @returns {*} the decorator command set used to decorate the model.\n */\n generateDecoratorCommands(modelManager: ModelManager, locale: string): any {\n const commands: any[] = [];\n\n const CLASS_COMMAND = `${DC_NAMESPACE}.Command`;\n const CLASS_TARGET = `${DC_NAMESPACE}.CommandTarget`;\n const CLASS_DECORATOR = `${MetaModelNamespace}.Decorator`;\n const CLASS_DECORATOR_STRING = `${MetaModelNamespace}.DecoratorString`;\n\n const makeCommand = (target: any, decoratorName: string, value: string) => ({\n '$class': CLASS_COMMAND,\n 'type': 'UPSERT',\n 'target': target,\n 'decorator': {\n '$class': CLASS_DECORATOR,\n 'name': decoratorName,\n 'arguments': [{ '$class': CLASS_DECORATOR_STRING, 'value': value }]\n }\n });\n\n // @ts-ignore\n (modelManager as any).getModelFiles().forEach((model: any) => {\n const namespace = model.getNamespace();\n\n const nsTerms = this.getTerms(namespace, locale, '', undefined, { generateMissing: false });\n if (nsTerms) {\n const keys = Object.keys(nsTerms);\n for (let i = 0; i < keys.length; i++) {\n const term = keys[i];\n if (term === 'term') {\n commands.push(makeCommand(\n { '$class': CLASS_TARGET, 'namespace': namespace },\n 'Term', nsTerms[term]\n ));\n } else if (term !== 'declarations' && term !== 'namespace' && term !== 'locale') {\n commands.push(makeCommand(\n { '$class': CLASS_TARGET, 'namespace': namespace },\n `Term_${term}`, nsTerms[term]\n ));\n }\n }\n }\n\n model.getAllDeclarations().forEach((decl: any) => {\n const declName = decl.getName();\n\n const declTerms = this.getTerms(namespace, locale, declName);\n if (declTerms) {\n const keys = Object.keys(declTerms);\n for (let i = 0; i < keys.length; i++) {\n const term = keys[i];\n if (term === declName) {\n commands.push(makeCommand(\n { '$class': CLASS_TARGET, 'namespace': namespace, 'declaration': declName },\n 'Term', declTerms[term]\n ));\n } else if (term !== 'properties') {\n commands.push(makeCommand(\n { '$class': CLASS_TARGET, 'namespace': namespace, 'declaration': declName },\n `Term_${term}`, declTerms[term]\n ));\n }\n }\n }\n\n let propertyNames: string[] = [];\n if (decl.getProperties) {\n propertyNames = decl.getProperties().map((p: any) => p.getName());\n } else if (decl.isMapDeclaration?.()) {\n propertyNames = ['KEY', 'VALUE'];\n } else {\n return;\n }\n\n for (let p = 0; p < propertyNames.length; p++) {\n const propertyName = propertyNames[p];\n const propertyTerms = this.resolveTerms(modelManager, namespace, locale, declName, propertyName);\n if (propertyTerms) {\n const propertyType = propertyName === 'KEY' || propertyName === 'VALUE' ? 'mapElement' : 'property';\n const keys = Object.keys(propertyTerms);\n for (let i = 0; i < keys.length; i++) {\n const term = keys[i];\n commands.push(makeCommand(\n { '$class': CLASS_TARGET, 'namespace': namespace, 'declaration': declName, [propertyType]: propertyName },\n term === propertyName ? 'Term' : `Term_${term}`, propertyTerms[term]\n ));\n }\n }\n }\n });\n });\n\n return {\n '$class': `${DC_NAMESPACE}.DecoratorCommandSet`,\n 'name': `terms-${locale}`,\n 'version': '1.0.0',\n 'commands': commands\n };\n }\n\n /**\n * Validates the terms in the vocabulary against the namespaces and declarations\n * within a ModelManager\n * @param {ModelManager} modelManager - the Model Manager\n * @param {string} locale the BCP-47 locale identifier\n * @returns {*} the result of validation\n */\n validate(modelManager: ModelManager): any {\n // missing vocabularies\n // @ts-ignore\n const missingVocabularies = (modelManager as any).getModelFiles()\n .map((m: any) => this.getVocabulariesForNamespace(m.getNamespace()).length === 0 ? m.getNamespace() : null)\n .filter((m: any) => m !== null);\n\n // additional vocabularies\n const additionalVocabularies = Object.values(this.vocabularies)\n .filter(v => !modelManager.getModelFile(v.getNamespace()));\n\n const result: any = {\n missingVocabularies,\n additionalVocabularies,\n vocabularies: {}\n };\n\n // validate the models against the vocs\n Object.values(this.vocabularies)\n .forEach(voc => {\n const vocResult: any = {\n locale: voc.getLocale(),\n namespace: voc.getNamespace(),\n missingTerms: [],\n additionalTerms: []\n };\n\n const model = modelManager.getModelFile(voc.getNamespace());\n if (model) {\n const errors = voc.validate(model);\n if (errors.missingTerms) {\n vocResult.missingTerms = vocResult.missingTerms.concat(errors.missingTerms);\n }\n if (errors.additionalTerms) {\n vocResult.additionalTerms = vocResult.additionalTerms.concat(errors.additionalTerms);\n }\n\n result.vocabularies[`${vocResult.namespace}/${vocResult.locale}`] = vocResult;\n }\n });\n return result;\n }\n}\n\nexport { VocabularyManager };\nexport default VocabularyManager;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,MACE,QAAU;AAAA,MACV,YAAc;AAAA,QACZ;AAAA,UACE,QAAU;AAAA,UACV,MAAQ;AAAA,UACR,WAAa;AAAA,YACX;AAAA,cACE,QAAU;AAAA,cACV,OAAS;AAAA,YACX;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,MACA,WAAa;AAAA,MACb,SAAW,CAAC;AAAA,MACZ,cAAgB;AAAA,QACd;AAAA,UACE,QAAU;AAAA,UACV,MAAQ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|
|
6
|
+
"names": ["require_metamodel", "MetaModelNamespace", "MetaModelNamespace"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_browser_process_shim
|
|
3
|
+
} from "./chunk-K2X7J5YP.mjs";
|
|
4
|
+
|
|
5
|
+
// src/vocabulary.ts
|
|
6
|
+
init_browser_process_shim();
|
|
7
|
+
var Vocabulary = class _Vocabulary {
|
|
8
|
+
/**
|
|
9
|
+
* Create the Vocabulary
|
|
10
|
+
* @constructor
|
|
11
|
+
* @param {VocabularyManager} vocabularyManager - the manager for this vocabulary
|
|
12
|
+
* @param {object} voc - the JSON representation of the vocabulary
|
|
13
|
+
*/
|
|
14
|
+
constructor(vocabularyManager, voc) {
|
|
15
|
+
if (!vocabularyManager) {
|
|
16
|
+
throw new Error("VocabularyManager must be specified");
|
|
17
|
+
}
|
|
18
|
+
if (!voc) {
|
|
19
|
+
throw new Error("Vocabulary object must be specified");
|
|
20
|
+
}
|
|
21
|
+
if (!voc.declarations) {
|
|
22
|
+
throw new Error("Vocabulary object must have declarations");
|
|
23
|
+
}
|
|
24
|
+
if (!voc.namespace) {
|
|
25
|
+
throw new Error("A vocabulary must specify a namespace");
|
|
26
|
+
}
|
|
27
|
+
if (!voc.locale) {
|
|
28
|
+
throw new Error("A vocabulary must specify a locale");
|
|
29
|
+
}
|
|
30
|
+
_Vocabulary.validateLocale(voc.locale);
|
|
31
|
+
this.vocabularyManager = vocabularyManager;
|
|
32
|
+
this.content = voc;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Returns the namespace for the vocabulary
|
|
36
|
+
* @returns {string} the namespace for this vocabulary
|
|
37
|
+
*/
|
|
38
|
+
getNamespace() {
|
|
39
|
+
return this.content.namespace;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Validates a locale
|
|
43
|
+
* @param {string} locale the locale to validate
|
|
44
|
+
* @throws {Error} if the locale is invalid
|
|
45
|
+
*/
|
|
46
|
+
static validateLocale(locale) {
|
|
47
|
+
new Intl.Locale(locale);
|
|
48
|
+
if (locale !== locale.toLowerCase()) {
|
|
49
|
+
throw new Error("Locale should be lowercase with dashes");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Returns the locale for the vocabulary
|
|
54
|
+
* @returns {string} the locale for this vocabulary
|
|
55
|
+
*/
|
|
56
|
+
getLocale() {
|
|
57
|
+
return this.content.locale;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns the identifier for the vocabulary, composed of the namespace plus the locale
|
|
61
|
+
* @returns {string} the identifier for this vocabulary
|
|
62
|
+
*/
|
|
63
|
+
getIdentifier() {
|
|
64
|
+
return `${this.getNamespace()}/${this.content.locale}`;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Returns all the declarations for this vocabulary
|
|
68
|
+
* @returns {Array} an array of objects
|
|
69
|
+
*/
|
|
70
|
+
getTerms() {
|
|
71
|
+
return this.content.declarations;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Gets the terms of Namespace
|
|
75
|
+
* @returns {string} the term or null if it does not exist
|
|
76
|
+
* @private
|
|
77
|
+
*/
|
|
78
|
+
getNamespaceTerms() {
|
|
79
|
+
const namespaceTerms = Object.entries(this.content).filter(([key]) => key !== "namespace" && key !== "locale" && key !== "declarations");
|
|
80
|
+
return namespaceTerms.length > 0 ? Object.fromEntries(namespaceTerms) : null;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Gets the term for a concept, enum or property
|
|
84
|
+
* @param {string} declarationName the name of a concept or enum
|
|
85
|
+
* @param {string} [propertyName] the name of a property (optional)
|
|
86
|
+
* @param {string} [identifier] the identifier of the term (optional)
|
|
87
|
+
* @returns {string|number|boolean|null} the term or null if it does not exist
|
|
88
|
+
*/
|
|
89
|
+
getTerm(declarationName, propertyName, identifier) {
|
|
90
|
+
if (!declarationName) {
|
|
91
|
+
const namespaceTerms = this.getNamespaceTerms();
|
|
92
|
+
return identifier ? namespaceTerms?.[identifier] : namespaceTerms?.term;
|
|
93
|
+
}
|
|
94
|
+
const decl = this.content.declarations.find((d) => Object.keys(d)[0] === declarationName);
|
|
95
|
+
if (!decl) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
if (!propertyName) {
|
|
99
|
+
return identifier ? decl[identifier] : decl[declarationName];
|
|
100
|
+
} else {
|
|
101
|
+
const property = decl.properties ? decl.properties.find((d) => propertyName in d) : null;
|
|
102
|
+
return property ? identifier ? property[identifier] : property[propertyName] : null;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Gets the terms for a concept, enum or property
|
|
107
|
+
* @param {string} declarationName the name of a concept or enum
|
|
108
|
+
* @param {string} [propertyName] the name of a property (optional)
|
|
109
|
+
* @returns {string} the term or null if it does not exist
|
|
110
|
+
*/
|
|
111
|
+
getElementTerms(declarationName, propertyName) {
|
|
112
|
+
if (!declarationName) {
|
|
113
|
+
return this.getNamespaceTerms();
|
|
114
|
+
}
|
|
115
|
+
const decl = this.content.declarations.find((d) => Object.keys(d)[0] === declarationName);
|
|
116
|
+
if (!decl) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
if (!propertyName) {
|
|
120
|
+
return decl;
|
|
121
|
+
} else {
|
|
122
|
+
const property = decl.properties ? decl.properties.find((d) => propertyName in d) : null;
|
|
123
|
+
return property;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Validates a vocabulary against a ModelFile, returning errors for
|
|
128
|
+
* missing and additional terms.
|
|
129
|
+
* @param {ModelFile} modelFile the model file for this vocabulary
|
|
130
|
+
* @returns {*} an object with missingTerms and additionalTerms properties
|
|
131
|
+
*/
|
|
132
|
+
validate(modelFile) {
|
|
133
|
+
const getOwnProperties = (declaration) => {
|
|
134
|
+
if (declaration.isMapDeclaration()) {
|
|
135
|
+
return [declaration.getKey(), declaration.getValue()];
|
|
136
|
+
} else {
|
|
137
|
+
return declaration.getOwnProperties?.() ? declaration.getOwnProperties?.() : [];
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
const getPropertyName = (property) => {
|
|
141
|
+
if (property.isKey?.()) {
|
|
142
|
+
return "KEY";
|
|
143
|
+
} else if (property.isValue?.()) {
|
|
144
|
+
return "VALUE";
|
|
145
|
+
} else {
|
|
146
|
+
return property.getName();
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const checkPropertyExists = (k, p) => {
|
|
150
|
+
const declaration = modelFile.getLocalType(Object.keys(k)[0]);
|
|
151
|
+
const property = Object.keys(p)[0];
|
|
152
|
+
if (declaration.isMapDeclaration()) {
|
|
153
|
+
if (property === "KEY") {
|
|
154
|
+
return true;
|
|
155
|
+
} else if (property === "VALUE") {
|
|
156
|
+
return true;
|
|
157
|
+
} else {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
return declaration.getOwnProperty(Object.keys(p)[0]);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
const result = {
|
|
165
|
+
missingTerms: modelFile.getAllDeclarations().flatMap((d) => this.getTerm(d.getName()) ? getOwnProperties(d).flatMap((p) => this.getTerm(d.getName(), getPropertyName(p)) ? null : `${d.getName()}.${getPropertyName(p)}`) : d.getName()).filter((i) => i !== null),
|
|
166
|
+
additionalTerms: this.content.declarations.flatMap((k) => modelFile.getLocalType(Object.keys(k)[0]) ? Array.isArray(k.properties) ? k.properties.flatMap((p) => checkPropertyExists(k, p) ? null : `${Object.keys(k)[0]}.${Object.keys(p)[0]}`) : null : k).filter((i) => i !== null)
|
|
167
|
+
};
|
|
168
|
+
if (!this.content.term) {
|
|
169
|
+
result.missingTerms.push("namespace");
|
|
170
|
+
}
|
|
171
|
+
return result;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Converts the object to JSON
|
|
175
|
+
* @returns {*} the contens of this vocabulary
|
|
176
|
+
*/
|
|
177
|
+
toJSON() {
|
|
178
|
+
return this.content;
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
var vocabulary_default = Vocabulary;
|
|
182
|
+
|
|
183
|
+
export {
|
|
184
|
+
Vocabulary,
|
|
185
|
+
vocabulary_default
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=chunk-CKXQ5OWJ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/vocabulary.ts"],
|
|
4
|
+
"sourcesContent": ["/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ModelFile, ClassDeclaration, Declaration, Property } from '@accordproject/concerto-core';\nimport type VocabularyManager from './vocabularymanager';\n\n/**\n* A vocabulary for a concerto model\n* @class\n* @memberof module:concerto-vocabulary\n*/\nclass Vocabulary {\n public vocabularyManager: VocabularyManager;\n public content: any;\n\n /**\n * Create the Vocabulary\n * @constructor\n * @param {VocabularyManager} vocabularyManager - the manager for this vocabulary\n * @param {object} voc - the JSON representation of the vocabulary\n */\n constructor(vocabularyManager: VocabularyManager, voc: any) {\n if(!vocabularyManager) {\n throw new Error('VocabularyManager must be specified');\n }\n if(!voc) {\n throw new Error('Vocabulary object must be specified');\n }\n\n if(!voc.declarations) {\n throw new Error('Vocabulary object must have declarations');\n }\n\n if(!voc.namespace) {\n throw new Error('A vocabulary must specify a namespace');\n }\n\n if(!voc.locale) {\n throw new Error('A vocabulary must specify a locale');\n }\n\n Vocabulary.validateLocale(voc.locale);\n\n this.vocabularyManager = vocabularyManager;\n this.content = voc;\n }\n\n /**\n * Returns the namespace for the vocabulary\n * @returns {string} the namespace for this vocabulary\n */\n getNamespace(): string {\n return this.content.namespace;\n }\n\n /**\n * Validates a locale\n * @param {string} locale the locale to validate\n * @throws {Error} if the locale is invalid\n */\n static validateLocale(locale: string) {\n // @ts-ignore\n new Intl.Locale(locale);\n if(locale !== locale.toLowerCase()) {\n throw new Error('Locale should be lowercase with dashes');\n }\n }\n\n /**\n * Returns the locale for the vocabulary\n * @returns {string} the locale for this vocabulary\n */\n getLocale(): string {\n return this.content.locale;\n }\n\n /**\n * Returns the identifier for the vocabulary, composed of the namespace plus the locale\n * @returns {string} the identifier for this vocabulary\n */\n getIdentifier(): string {\n return `${this.getNamespace()}/${this.content.locale}`;\n }\n\n /**\n * Returns all the declarations for this vocabulary\n * @returns {Array} an array of objects\n */\n getTerms(): any[] {\n return this.content.declarations;\n }\n\n /**\n * Gets the terms of Namespace\n * @returns {string} the term or null if it does not exist\n * @private\n */\n getNamespaceTerms(): any {\n const namespaceTerms = Object.entries(this.content).filter(([key]) => key !== 'namespace' && key !== 'locale' && key !== 'declarations');\n return namespaceTerms.length > 0 ? Object.fromEntries(namespaceTerms) : null;\n }\n\n /**\n * Gets the term for a concept, enum or property\n * @param {string} declarationName the name of a concept or enum\n * @param {string} [propertyName] the name of a property (optional)\n * @param {string} [identifier] the identifier of the term (optional)\n * @returns {string|number|boolean|null} the term or null if it does not exist\n */\n getTerm(declarationName?: string, propertyName?: string, identifier?: string): string | number | boolean | null {\n if(!declarationName){\n const namespaceTerms = this.getNamespaceTerms();\n return identifier ? namespaceTerms?.[identifier]:namespaceTerms?.term;\n }\n const decl = this.content.declarations.find((d: any) => Object.keys(d)[0] === declarationName);\n if(!decl) {\n return null;\n }\n if(!propertyName) {\n return identifier ? decl[identifier] : decl[declarationName];\n }\n else {\n const property = decl.properties ? decl.properties.find((d: any) => propertyName in d) : null;\n return property ? identifier ? property[identifier] : property[propertyName] : null;\n }\n }\n\n /**\n * Gets the terms for a concept, enum or property\n * @param {string} declarationName the name of a concept or enum\n * @param {string} [propertyName] the name of a property (optional)\n * @returns {string} the term or null if it does not exist\n */\n getElementTerms(declarationName: string, propertyName?: string): any {\n if(!declarationName){\n return this.getNamespaceTerms();\n }\n const decl = this.content.declarations.find((d: any) => Object.keys(d)[0] === declarationName);\n if(!decl) {\n return null;\n }\n if(!propertyName) {\n return decl;\n }\n else {\n const property = decl.properties ? decl.properties.find((d: any) => propertyName in d) : null;\n return property;\n }\n }\n\n /**\n * Validates a vocabulary against a ModelFile, returning errors for\n * missing and additional terms.\n * @param {ModelFile} modelFile the model file for this vocabulary\n * @returns {*} an object with missingTerms and additionalTerms properties\n */\n validate(modelFile: ModelFile): any {\n const getOwnProperties = (declaration: any) => {\n // ensures we have a valid return, even for scalars and map-declarations\n if(declaration.isMapDeclaration()) {\n return [declaration.getKey(), declaration.getValue()];\n } else {\n return declaration.getOwnProperties?.() ? declaration.getOwnProperties?.() : [];\n }\n };\n\n const getPropertyName = (property: any) => {\n if(property.isKey?.()) {\n return 'KEY';\n } else if(property.isValue?.()) {\n return 'VALUE';\n } else {\n return property.getName();\n }\n };\n\n const checkPropertyExists = (k: any, p: any) => {\n // only reached for keys that getLocalType has already resolved\n const declaration = modelFile.getLocalType(Object.keys(k)[0]) as ClassDeclaration;\n const property = Object.keys(p)[0];\n if(declaration.isMapDeclaration()) {\n if (property === 'KEY') {\n return true;\n } else if(property === 'VALUE') {\n return true;\n } else {\n return false;\n }\n } else {\n return declaration.getOwnProperty(Object.keys(p)[0]);\n }\n };\n\n const result = {\n missingTerms: modelFile.getAllDeclarations().flatMap( (d: Declaration) => this.getTerm(d.getName())\n ? getOwnProperties(d).flatMap( (p: Property) => this.getTerm(d.getName(), getPropertyName(p)) ? null : `${d.getName()}.${getPropertyName(p)}`)\n : d.getName() ).filter( (i: any) => i !== null),\n additionalTerms: this.content.declarations.flatMap( (k: any) => modelFile.getLocalType(Object.keys(k)[0])\n ? Array.isArray(k.properties) ? k.properties.flatMap( (p: any) => checkPropertyExists(k, p) ? null : `${Object.keys(k)[0]}.${Object.keys(p)[0]}`) : null\n : k ).filter( (i: any) => i !== null)\n };\n\n if(!this.content.term){\n result.missingTerms.push('namespace');\n }\n\n return result;\n }\n\n /**\n * Converts the object to JSON\n * @returns {*} the contens of this vocabulary\n */\n toJSON() {\n return this.content;\n }\n}\n\nexport { Vocabulary };\nexport default Vocabulary;\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA;AAsBA,IAAM,aAAN,MAAM,YAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUb,YAAY,mBAAsC,KAAU;AACxD,QAAG,CAAC,mBAAmB;AACnB,YAAM,IAAI,MAAM,qCAAqC;AAAA,IACzD;AACA,QAAG,CAAC,KAAK;AACL,YAAM,IAAI,MAAM,qCAAqC;AAAA,IACzD;AAEA,QAAG,CAAC,IAAI,cAAc;AAClB,YAAM,IAAI,MAAM,0CAA0C;AAAA,IAC9D;AAEA,QAAG,CAAC,IAAI,WAAW;AACf,YAAM,IAAI,MAAM,uCAAuC;AAAA,IAC3D;AAEA,QAAG,CAAC,IAAI,QAAQ;AACZ,YAAM,IAAI,MAAM,oCAAoC;AAAA,IACxD;AAEA,gBAAW,eAAe,IAAI,MAAM;AAEpC,SAAK,oBAAoB;AACzB,SAAK,UAAU;AAAA,EACnB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,eAAuB;AACnB,WAAO,KAAK,QAAQ;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,OAAO,eAAe,QAAgB;AAElC,QAAI,KAAK,OAAO,MAAM;AACtB,QAAG,WAAW,OAAO,YAAY,GAAG;AAChC,YAAM,IAAI,MAAM,wCAAwC;AAAA,IAC5D;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,YAAoB;AAChB,WAAO,KAAK,QAAQ;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBAAwB;AACp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