From 38eadb0b6aea7d1b69ac35483bc9f1187df4baaf Mon Sep 17 00:00:00 2001 From: Tiago Prince Sales Date: Sat, 25 Jul 2020 18:24:58 +0200 Subject: [PATCH] Extended schema to support diagrammatic data This move required changing the root element of our objects, which is now called a Project. A project contains a model and diagrams. A diagram contains shapes, lines, and labels, all of which refer to elements in the model (e.g. classes, relations, generalization sets). I managed to define a single schema for the these three elements types that are shown in diagrams. All previous tests have been adjusted to account for this new structure. --- schemas/ontouml2.schema.json | 329 +++++++++++++++++- test/howto.test.js | 17 +- test/ontouml2.test.js | 16 + test/test_models/class.all.fields.json | 99 +++--- test/test_models/class.minimum.json | 55 +-- test/test_models/class.multilingual.json | 71 ++-- test/test_models/diagram.class.json | 82 +++++ test/test_models/diagram.generalization.json | 186 ++++++++++ .../diagram.generalizationset.json | 263 ++++++++++++++ test/test_models/diagram.relation.json | 227 ++++++++++++ .../generalization.all.fields.json | 111 +++--- test/test_models/generalization.minimum.json | 37 +- .../generalizationset.all.fields.json | 237 +++++++------ .../generalizationset.minimum.json | 41 ++- test/test_models/index.js | 4 + test/test_models/literal.all.fields.json | 85 ++--- test/test_models/literal.minimum.json | 67 ++-- .../test_models/no-generalizations-in-gs.json | 43 ++- test/test_models/null-property-type.json | 7 + test/test_models/order.json | 7 + test/test_models/package.all.fields.json | 7 + test/test_models/package.minimum.json | 15 +- test/test_models/property.all.fields.json | 251 ++++++------- test/test_models/property.minimum.json | 223 ++++++------ test/test_models/property.multilingual.json | 277 ++++++++------- .../propertyassignments.all.options.json | 91 ++--- test/test_models/relation.all.fields.json | 159 +++++---- test/test_models/relation.minimum.json | 171 ++++----- test/test_models/relation.multilingual.json | 163 ++++----- 29 files changed, 2296 insertions(+), 1045 deletions(-) create mode 100644 test/test_models/diagram.class.json create mode 100644 test/test_models/diagram.generalization.json create mode 100644 test/test_models/diagram.generalizationset.json create mode 100644 test/test_models/diagram.relation.json diff --git a/schemas/ontouml2.schema.json b/schemas/ontouml2.schema.json index 0a6a722..d15584a 100644 --- a/schemas/ontouml2.schema.json +++ b/schemas/ontouml2.schema.json @@ -1,17 +1,300 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://ontouml.org/ontouml-schema/2.0/0.1.202001091222", - "title": "Root Package", - "description": "A package that contains an ontology in OntoUML 2. Mandatory fields are those defined for Package.", + "title": "Project", + "description": "A project of an ontology in OntoUML 2, which may contain both model and diagrammatic data.", "type": "object", - "allOf": [ - { + "properties": { + "type": { + "const": "Project" + }, + "id": { + "$ref": "#/definitions/id" + }, + "name": { + "$ref": "#/definitions/name" + }, + "description": { + "$ref": "#/definitions/description" + }, + "model": { "$ref": "#/definitions/Package" + }, + "diagrams": { + "description": "An array containing diagrams that depict the elements in the model.", + "oneOf": [ + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/Diagram" + } + }, + { + "type": "null" + } + ] } + }, + "additionalProperties": false, + "required": [ + "type", + "id", + "name", + "description", + "model", + "diagrams" ], "definitions": { + "Diagram": { + "type": "object", + "properties": { + "type": { + "const": "Diagram" + }, + "id": { + "$ref": "#/definitions/id" + }, + "name": { + "$ref": "#/definitions/name" + }, + "description": { + "$ref": "#/definitions/description" + }, + "owner": { + "$ref": "#/definitions/reference" + }, + "contents": { + "$ref": "#/definitions/diagramContents" + } + }, + "required": [ + "type", + "id", + "name", + "description", + "owner", + "contents" + ], + "additionalProperties": false + }, + "diagramContents": { + "description": "A non-empty nullable array of objects representing shapes, lines and labels in a diagram.", + "oneOf": [ + { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "#/definitions/DiagramElement" + } + }, + { + "type": "null" + } + ] + }, + "DiagramElement": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Shape", + "Line", + "Label" + ] + }, + "id": { + "$ref": "#/definitions/id" + }, + "source": { + "$ref": "#/definitions/reference" + }, + "field": { + "description": "A particular field of the source element used for rendering this DiagramElement. Example: \"name\" for a Label of a association.", + "$ref": "#/definitions/nullableString" + }, + "points": { + "$ref": "#/definitions/points" + }, + "font": { + "$ref": "#/definitions/font" + }, + "line": { + "$ref": "#/definitions/line" + }, + "background": { + "$ref": "#/definitions/background" + }, + "visibility": { + "$ref": "#/definitions/visibility" + }, + "elements": { + "description": "A non-empty nullable array of dependent diagram elements, i.e., of elements that can only be rendered if the container element is rendered. An example is the label of an association between two classes.", + "oneOf": [ + { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "#/definitions/DiagramElement" + } + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "required": [ + "type", + "id", + "source", + "field", + "points", + "font", + "line", + "background", + "visibility", + "elements" + ] + }, + "points": { + "description": "A list of coordinates to position the element in the diagram. The values are interpreted in reference to the top-left corner of the diagram, which is has the coordinate {\"x\": 0, \"y\":0}.", + "oneOf": [ + { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "x": { + "$ref": "#/definitions/nullableNumber" + }, + "y": { + "$ref": "#/definitions/nullableNumber" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + { + "type": "null" + } + ] + }, + "visibility": { + "description": "A field that contains flags to show/hide certain components of the diagram element. Useful for hiding the attributes and operations compartments of a class shape.", + "oneOf": [ + { + "type": "object", + "minimum": 1, + "additionalProperties": { + "type": "boolean", + "minLength": 1 + } + }, + { + "type": "null" + } + ] + }, + "background": { + "oneOf": [ + { + "type": "object", + "properties": { + "color": { + "$ref": "#/definitions/color" + }, + "transparency": { + "$ref": "#/definitions/nullableNumber" + } + }, + "required": [ + "color", + "transparency" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "line": { + "oneOf": [ + { + "type": "object", + "properties": { + "color": { + "$ref": "#/definitions/color" + }, + "transparency": { + "$ref": "#/definitions/nullableNumber" + }, + "weight": { + "$ref": "#/definitions/nullableNumber" + }, + "style": { + "$ref": "#/definitions/lineStyle" + } + }, + "required": [ + "color", + "transparency", + "weight", + "style" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "font": { + "oneOf": [ + { + "properties": { + "name": { + "$ref": "#/definitions/nullableString" + }, + "size": { + "$ref": "#/definitions/nullableNumber" + }, + "color": { + "$ref": "#/definitions/color" + } + }, + "required": [ + "name", + "size", + "color" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "color": { + "description": "The color of the lines used to draw the shape, represented in hex format: \"#ff99a3\"", + "$ref": "#/definitions/nullableString" + }, + "lineStyle": { + "description": "The style of a line. Examples: \"solid\", \"dashed\", \"dotted\"", + "$ref": "#/definitions/nullableString" + }, "Package": { - "description": "An object representing a packge element. Mandatory fields: constant \"type\": \"Package\", \"id\", \"name\", \"elements\", \"propertyAssignments\". Additional fields NOT allowed.", + "description": "An object representing a package element. Mandatory fields: constant \"type\": \"Package\", \"id\", \"name\", \"elements\", \"propertyAssignments\". Additional fields NOT allowed.", "type": "object", "properties": { "type": { @@ -27,7 +310,7 @@ "$ref": "#/definitions/description" }, "contents": { - "$ref": "#/definitions/contents" + "$ref": "#/definitions/packageContents" }, "propertyAssignments": { "$ref": "#/definitions/propertyAssignments" @@ -158,7 +441,13 @@ } }, "additionalProperties": false, - "required": ["type", "id", "name", "description", "propertyAssignments"] + "required": [ + "type", + "id", + "name", + "description", + "propertyAssignments" + ] }, "Relation": { "description": "An object representing an relation element. Mandatory fields: constant \"type\": \"Class\", \"id\", \"name\", \"stereotypes\", \"properties\", \"propertyAssignments\". The \"properties\" array must have at least two items and is not nullable. The order of these items represents their position on a equivalent predicate, e.g., in the ternary relation \"buys-product-from(buyer,product,seller)\", the order of items representing these entities must follow the order \"buyer\" (in properties[0]), \"product\" (in properties[1]), and \"seller\" (in properties[2]). Relation elements are also used to represent derivation relations, in which case they must contain the stereotype \"derivation\" and have only 2 properties, the first being a Relation element and the second a Class element. Additional fields NOT allowed. Ordered properties.", @@ -360,7 +649,11 @@ "oneOf": [ { "type": "string", - "enum": ["NONE", "SHARED", "COMPOSITE"] + "enum": [ + "NONE", + "SHARED", + "COMPOSITE" + ] }, { "type": "null" @@ -395,7 +688,7 @@ "isReadOnly" ] }, - "contents": { + "packageContents": { "description": "A non-empty nullable array of objects representing model elements. Possible object types in this array are: \"Package\", \"Class\", \"Relation\", \"Generalization\", \"GeneralizationSet\".", "oneOf": [ { @@ -487,6 +780,17 @@ } ] }, + "nullableNumber": { + "description": "A auxiliary definition for nullable number fields.", + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, "properties": { "description": "A non-empty array of Property elements representing properties exhibited by instances of the container model element. Nullable. If the container object of his field is a class, the properties in this array are the attributes of the class. Alternatively, if the container is a relation, the properties in this array are the association ends of the relation.", "oneOf": [ @@ -576,7 +880,10 @@ "$ref": "#/definitions/id" } }, - "required": ["type", "id"], + "required": [ + "type", + "id" + ], "additionalProperties": false }, { @@ -602,4 +909,4 @@ ] } } -} +} \ No newline at end of file diff --git a/test/howto.test.js b/test/howto.test.js index 8f9ef2a..ff62546 100644 --- a/test/howto.test.js +++ b/test/howto.test.js @@ -7,12 +7,19 @@ test('README tutorial test', () => { let validator = new Ajv().compile(schemas.getSchema(schemas.ONTOUML_2)); let model = { - type: 'Package', - id: 'm1', - name: 'My Model', + type: 'Project', + id: 'p1', + name: 'My Project', description: null, - contents: null, - propertyAssignments: null, + model: { + type: 'Package', + id: 'm1', + name: 'My Model', + description: null, + contents: null, + propertyAssignments: null, + }, + diagrams: null }; let isValid = validator(model); diff --git a/test/ontouml2.test.js b/test/ontouml2.test.js index f4fe1fb..4ac87cb 100644 --- a/test/ontouml2.test.js +++ b/test/ontouml2.test.js @@ -89,3 +89,19 @@ test('Order set on classes decorated with <>', () => { testOntoUML2Model(models.propertyMultilingual); testOntoUML2Model(models.relationMultilingual); }); + +test('Diagram referencing a class', () => { + testOntoUML2Model(models.diagramClass); +}); + +test('Diagram referencing a class and an association', () => { + testOntoUML2Model(models.diagramRelation); +}); + +test('Diagram referencing a class and an generalization', () => { + testOntoUML2Model(models.diagramRelation); +}); + +test('Diagram referencing a generalization set', () => { + testOntoUML2Model(models.diagramRelation); +}); diff --git a/test/test_models/class.all.fields.json b/test/test_models/class.all.fields.json index 175bb0a..c5f3bf8 100644 --- a/test/test_models/class.all.fields.json +++ b/test/test_models/class.all.fields.json @@ -1,47 +1,58 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": "Person", - "description": "Description of person.", - "stereotypes": ["kind"], - "isAbstract": true, - "isDerived": false, - "isExtensional": false, - "isPowertype": false, - "order": null, - "allowed": ["functional-complex"], - "properties": [ - { - "type": "Property", - "id": "a1", - "name": "knows", - "description": "Description of property knows.", - "propertyType": { - "type": "Class", - "id": "c1" - }, - "cardinality": null, - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": null + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to test classes.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Person", + "description": "Description of person.", + "stereotypes": [ + "kind" + ], + "isAbstract": true, + "isDerived": false, + "isExtensional": false, + "isPowertype": false, + "order": null, + "allowed": [ + "functional-complex" + ], + "properties": [ + { + "type": "Property", + "id": "a1", + "name": "knows", + "description": "Description of property knows.", + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": null, + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null + } + ], + "literals": null, + "propertyAssignments": { + "nonStandardProperty": null } - ], - "literals": null, - "propertyAssignments": { - "nonStandardProperty": null } - } - ], - "propertyAssignments": null -} + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/class.minimum.json b/test/test_models/class.minimum.json index 7ca1c8a..85b1f9e 100644 --- a/test/test_models/class.minimum.json +++ b/test/test_models/class.minimum.json @@ -1,25 +1,32 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": null, - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - } - ], - "propertyAssignments": null -} + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to test classes.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": null, + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + } + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/class.multilingual.json b/test/test_models/class.multilingual.json index d33ac3f..608eded 100644 --- a/test/test_models/class.multilingual.json +++ b/test/test_models/class.multilingual.json @@ -1,33 +1,40 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": { - "en": "Person", - "es": "Persona", - "pt-BR": "Pessoa" - }, - "description": { - "en": "Class whose instances are all people.", - "es": "Clase cuyas instancias son todas personas.", - "pt-BR": "Classe cujas instâncias são todas as pessoas." - }, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - } - ], - "propertyAssignments": null -} + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to test multilingual properties in classes.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": { + "en": "Person", + "es": "Persona", + "pt-BR": "Pessoa" + }, + "description": { + "en": "Class whose instances are all people.", + "es": "Clase cuyas instancias son todas personas.", + "pt-BR": "Classe cujas instâncias são todas as pessoas." + }, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + } + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/diagram.class.json b/test/test_models/diagram.class.json new file mode 100644 index 0000000..4189ced --- /dev/null +++ b/test/test_models/diagram.class.json @@ -0,0 +1,82 @@ +{ + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to test the representation of classes in diagrams.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Person", + "description": null, + "stereotypes": [ + "kind" + ], + "properties": null, + "literals": null, + "propertyAssignments": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + } + ], + "propertyAssignments": null + }, + "diagrams": [ + { + "type": "Diagram", + "id": "d1", + "name": "Diagram 1", + "description": "My first diagram", + "owner": { + "type": "Package", + "id": "pk1" + }, + "contents": [ + { + "type": "Shape", + "id": "s1", + "source": { + "type": "Class", + "id": "c1" + }, + "field": null, + "points": [ + { + "x": 10, + "y": 10 + } + ], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": { + "color": "#000000", + "style": "solid", + "weight": 1, + "transparency": 0 + }, + "background": { + "color": "#ff99a3", + "transparency": 0 + }, + "visibility": { + "attributes": false, + "stereotype": true + }, + "elements": null + } + ] + } + ] +} \ No newline at end of file diff --git a/test/test_models/diagram.generalization.json b/test/test_models/diagram.generalization.json new file mode 100644 index 0000000..2e07363 --- /dev/null +++ b/test/test_models/diagram.generalization.json @@ -0,0 +1,186 @@ +{ + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to test the representation of generalizations in diagrams.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Person", + "description": null, + "stereotypes": [ + "kind" + ], + "properties": null, + "literals": null, + "propertyAssignments": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Class", + "id": "c2", + "name": "Child", + "description": null, + "stereotypes": [ + "phase" + ], + "properties": null, + "literals": null, + "propertyAssignments": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Generalization", + "id": "g1", + "name": "generalization", + "description": null, + "general": { + "type": "Class", + "id": "c1" + }, + "specific": { + "type": "Class", + "id": "c2" + }, + "propertyAssignments": null + } + ], + "propertyAssignments": null + }, + "diagrams": [ + { + "type": "Diagram", + "id": "d1", + "name": "Diagram 1", + "description": "My first diagram", + "owner": { + "type": "Package", + "id": "pk1" + }, + "contents": [ + { + "type": "Shape", + "id": "s1", + "source": { + "type": "Class", + "id": "c1" + }, + "field": null, + "points": [ + { + "x": 10, + "y": 10 + } + ], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": { + "color": "#000000", + "style": "solid", + "weight": 1, + "transparency": 0 + }, + "background": { + "color": "#ff99a3", + "transparency": 0 + }, + "visibility": { + "attributes": false, + "stereotype": true + }, + "elements": null + }, + { + "type": "Shape", + "id": "s2", + "source": { + "type": "Class", + "id": "c2" + }, + "field": null, + "points": [ + { + "x": 10, + "y": 80 + } + ], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": { + "color": "#000000", + "style": "solid", + "weight": 1, + "transparency": 0 + }, + "background": { + "color": "#ff99a3", + "transparency": 0 + }, + "visibility": { + "attributes": false, + "stereotype": true + }, + "elements": null + }, + { + "type": "Line", + "id": "l1", + "source": { + "type": "Generalization", + "id": "g1" + }, + "field": null, + "points": [ + { + "x": 40, + "y": 50 + }, + { + "x": 60, + "y": 25 + } + ], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": { + "color": "#000000", + "style": "solid", + "weight": 1, + "transparency": 0 + }, + "background": { + "color": "#ff99a3", + "transparency": 0 + }, + "visibility": null, + "elements": null + } + ] + } + ] +} \ No newline at end of file diff --git a/test/test_models/diagram.generalizationset.json b/test/test_models/diagram.generalizationset.json new file mode 100644 index 0000000..35f0a1b --- /dev/null +++ b/test/test_models/diagram.generalizationset.json @@ -0,0 +1,263 @@ +{ + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to test the representation of generalization sets in diagrams.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "propertyAssignments": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Person", + "description": null, + "stereotypes": [ + "kind" + ], + "properties": null, + "literals": null, + "propertyAssignments": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Class", + "id": "c2", + "name": "Child", + "description": null, + "stereotypes": [ + "phase" + ], + "properties": null, + "literals": null, + "propertyAssignments": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Class", + "id": "c3", + "name": "Adult", + "description": null, + "stereotypes": [ + "phase" + ], + "properties": null, + "literals": null, + "propertyAssignments": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Generalization", + "id": "g1", + "name": "generalization", + "description": null, + "general": { + "type": "Class", + "id": "c1" + }, + "specific": { + "type": "Class", + "id": "c2" + }, + "propertyAssignments": null + }, + { + "type": "Generalization", + "id": "g2", + "name": "generalization", + "description": null, + "general": { + "type": "Class", + "id": "c1" + }, + "specific": { + "type": "Class", + "id": "c3" + }, + "propertyAssignments": null + }, + { + "type": "GeneralizationSet", + "id": "gs1", + "name": "set", + "description": null, + "categorizer": null, + "generalizations": [ + { + "type": "Generalization", + "id": "g1" + }, + { + "type": "Generalization", + "id": "g2" + } + ], + "isDisjoint": true, + "isComplete": false, + "propertyAssignments": null + } + ] + }, + "diagrams": [ + { + "type": "Diagram", + "id": "d1", + "name": "Diagram 1", + "description": "My first diagram", + "owner": { + "type": "Package", + "id": "pk1" + }, + "contents": [ + { + "type": "Shape", + "id": "s1", + "source": { + "type": "Class", + "id": "c1" + }, + "field": null, + "points": [ + { + "x": 10, + "y": 10 + } + ], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": { + "color": "#000000", + "style": "solid", + "weight": 1, + "transparency": 0 + }, + "background": { + "color": "#ff99a3", + "transparency": 0 + }, + "visibility": { + "attributes": false, + "stereotype": true + }, + "elements": null + }, + { + "type": "Shape", + "id": "s2", + "source": { + "type": "Class", + "id": "c2" + }, + "field": null, + "points": [ + { + "x": 10, + "y": 80 + } + ], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": { + "color": "#000000", + "style": "solid", + "weight": 1, + "transparency": 0 + }, + "background": { + "color": "#ff99a3", + "transparency": 0 + }, + "visibility": { + "attributes": false, + "stereotype": true + }, + "elements": null + }, + { + "type": "Line", + "id": "l1", + "source": { + "type": "Generalization", + "id": "g1" + }, + "field": null, + "points": [ + { + "x": 40, + "y": 50 + }, + { + "x": 60, + "y": 25 + } + ], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": { + "color": "#000000", + "style": "solid", + "weight": 1, + "transparency": 0 + }, + "background": { + "color": "#ff99a3", + "transparency": 0 + }, + "visibility": null, + "elements": null + }, + { + "type": "Line", + "id": "l2", + "source": { + "type": "Generalization", + "id": "g2" + }, + "field": null, + "points": [ + { + "x": 40, + "y": 50 + }, + { + "x": 60, + "y": 25 + } + ], + "font": null, + "line": null, + "background": null, + "visibility": null, + "elements": null + } + ] + } + ] +} \ No newline at end of file diff --git a/test/test_models/diagram.relation.json b/test/test_models/diagram.relation.json new file mode 100644 index 0000000..b57a334 --- /dev/null +++ b/test/test_models/diagram.relation.json @@ -0,0 +1,227 @@ +{ + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to test the representation of relations in diagrams.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Person", + "description": null, + "stereotypes": [ + "kind" + ], + "properties": null, + "literals": null, + "propertyAssignments": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Relation", + "id": "r1", + "name": "knows", + "description": null, + "stereotypes": [ + "material" + ], + "isAbstract": false, + "isDerived": false, + "properties": [ + { + "type": "Property", + "id": "p1", + "name": "known by", + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": "*", + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null + }, + { + "type": "Property", + "id": "p2", + "name": "known person", + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": "*", + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null + } + ], + "propertyAssignments": { + "nonStandardProperty": null + } + } + ], + "propertyAssignments": null + }, + "diagrams": [ + { + "type": "Diagram", + "id": "d1", + "name": "Diagram 1", + "description": "My first diagram", + "owner": { + "type": "Package", + "id": "pk1" + }, + "contents": [ + { + "type": "Shape", + "id": "s1", + "source": { + "type": "Class", + "id": "c1" + }, + "field": null, + "points": [ + { + "x": 10, + "y": 10 + } + ], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": { + "color": "#000000", + "style": "solid", + "weight": 1, + "transparency": 0 + }, + "background": { + "color": "#ff99a3", + "transparency": 0 + }, + "visibility": { + "attributes": false, + "stereotype": true + }, + "elements": null + }, + { + "type": "Line", + "id": "l1", + "source": { + "type": "Relation", + "id": "r1" + }, + "field": null, + "points": [ + { + "x": 60, + "y": 15 + }, + { + "x": 70, + "y": 15 + }, + { + "x": 70, + "y": 25 + }, + { + "x": 60, + "y": 25 + } + ], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": { + "color": "#000000", + "style": "solid", + "weight": 1, + "transparency": 0 + }, + "background": { + "color": "#ff99a3", + "transparency": 0 + }, + "visibility": { + "direction": true + }, + "elements": [ + { + "type": "Label", + "id": "la1", + "source": { + "type": "Relation", + "id": "r1" + }, + "field": "name", + "points": [{ + "x": 75, + "y": 18 + }], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": null, + "background": null, + "visibility": null, + "elements": null + }, + { + "type": "Label", + "id": "la12", + "source": { + "type": "Relation", + "id": "r1" + }, + "field": "stereotype", + "points": [{ + "x": 75, + "y": 22 + }], + "font": { + "name": null, + "size": 11, + "color": "#000000" + }, + "line": null, + "background": null, + "visibility": null, + "elements": null + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/test_models/generalization.all.fields.json b/test/test_models/generalization.all.fields.json index 4ba7661..9d4d77f 100644 --- a/test/test_models/generalization.all.fields.json +++ b/test/test_models/generalization.all.fields.json @@ -1,58 +1,65 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": null, - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Class", - "id": "c2", - "name": null, - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Generalization", - "id": "g1", - "name": "generalization", - "description": null, - "general": { + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to test generalizations.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { "type": "Class", - "id": "c1" + "id": "c1", + "name": null, + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null }, - "specific": { + { "type": "Class", - "id": "c2" + "id": "c2", + "name": null, + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null }, - "propertyAssignments": { - "nonStandardProperty": null + { + "type": "Generalization", + "id": "g1", + "name": "generalization", + "description": null, + "general": { + "type": "Class", + "id": "c1" + }, + "specific": { + "type": "Class", + "id": "c2" + }, + "propertyAssignments": { + "nonStandardProperty": null + } } - } - ], - "propertyAssignments": null -} + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/generalization.minimum.json b/test/test_models/generalization.minimum.json index d2da50b..6bf439b 100644 --- a/test/test_models/generalization.minimum.json +++ b/test/test_models/generalization.minimum.json @@ -1,18 +1,25 @@ { - "type": "Package", - "id": "pk1", + "type": "Project", + "id": "proj1", "name": null, "description": null, - "contents": [ - { - "type": "Generalization", - "id": "g1", - "name": null, - "description": null, - "general": null, - "specific": null, - "propertyAssignments": null - } - ], - "propertyAssignments": null -} + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Generalization", + "id": "g1", + "name": null, + "description": null, + "general": null, + "specific": null, + "propertyAssignments": null + } + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/generalizationset.all.fields.json b/test/test_models/generalizationset.all.fields.json index d4d125f..d994949 100644 --- a/test/test_models/generalizationset.all.fields.json +++ b/test/test_models/generalizationset.all.fields.json @@ -1,128 +1,135 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": null, - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Class", - "id": "c2", - "name": null, - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Class", - "id": "class3", - "name": null, - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Class", - "id": "class4", - "name": null, - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Generalization", - "id": "g1", - "name": null, - "description": null, - "general": { + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to tests all fields in a generalization set.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { "type": "Class", - "id": "c1" + "id": "c1", + "name": null, + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null }, - "specific": { + { "type": "Class", - "id": "c2" + "id": "c2", + "name": null, + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null }, - "propertyAssignments": null - }, - { - "type": "Generalization", - "id": "g2", - "name": null, - "description": null, - "general": { + { "type": "Class", - "id": "c1" + "id": "class3", + "name": null, + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null }, - "specific": { + { "type": "Class", - "id": "class3" + "id": "class4", + "name": null, + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null }, - "propertyAssignments": null - }, - { - "type": "GeneralizationSet", - "id": "gs1", - "name": "set", - "description": null, - "categorizer": { - "type": "Class", - "id": "class4" + { + "type": "Generalization", + "id": "g1", + "name": null, + "description": null, + "general": { + "type": "Class", + "id": "c1" + }, + "specific": { + "type": "Class", + "id": "c2" + }, + "propertyAssignments": null + }, + { + "type": "Generalization", + "id": "g2", + "name": null, + "description": null, + "general": { + "type": "Class", + "id": "c1" + }, + "specific": { + "type": "Class", + "id": "class3" + }, + "propertyAssignments": null }, - "generalizations": [ - { - "type": "Generalization", - "id": "g1" + { + "type": "GeneralizationSet", + "id": "gs1", + "name": "set", + "description": null, + "categorizer": { + "type": "Class", + "id": "class4" }, - { - "type": "Generalization", - "id": "g2" + "generalizations": [ + { + "type": "Generalization", + "id": "g1" + }, + { + "type": "Generalization", + "id": "g2" + } + ], + "isDisjoint": true, + "isComplete": false, + "propertyAssignments": { + "nonStandardProperty": null } - ], - "isDisjoint": true, - "isComplete": false, - "propertyAssignments": { - "nonStandardProperty": null } - } - ], - "propertyAssignments": null -} + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/generalizationset.minimum.json b/test/test_models/generalizationset.minimum.json index 161e95e..18f2e51 100644 --- a/test/test_models/generalizationset.minimum.json +++ b/test/test_models/generalizationset.minimum.json @@ -1,20 +1,27 @@ { - "type": "Package", - "id": "pk1", + "type": "Project", + "id": "proj1", "name": null, "description": null, - "contents": [ - { - "type": "GeneralizationSet", - "id": "gs1", - "name": null, - "description": null, - "categorizer": null, - "generalizations": null, - "isDisjoint": null, - "isComplete": null, - "propertyAssignments": null - } - ], - "propertyAssignments": null -} + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "GeneralizationSet", + "id": "gs1", + "name": null, + "description": null, + "categorizer": null, + "generalizations": null, + "isDisjoint": null, + "isComplete": null, + "propertyAssignments": null + } + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/index.js b/test/test_models/index.js index 0324fb6..38ec263 100644 --- a/test/test_models/index.js +++ b/test/test_models/index.js @@ -2,6 +2,10 @@ module.exports = { classMinimum: require('./class.minimum.json'), classMultilingual: require('./class.multilingual.json'), classAllFields: require('./class.all.fields.json'), + diagramClass: require('./diagram.class.json'), + diagramRelation: require('./diagram.relation.json'), + diagramGeneralization: require('./diagram.generalization.json'), + diagramGeneralizationSet: require('./diagram.generalizationset.json'), generalizationMinimum: require('./generalization.minimum.json'), generalizationAllFields: require('./generalization.all.fields.json'), generalizationSetMinimum: require('./generalizationset.minimum.json'), diff --git a/test/test_models/literal.all.fields.json b/test/test_models/literal.all.fields.json index 0f0e1ce..77e176c 100644 --- a/test/test_models/literal.all.fields.json +++ b/test/test_models/literal.all.fields.json @@ -1,40 +1,47 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": "Color", - "description": "An enumeration containing basic colors.", - "properties": null, - "literals": [ - { - "type": "Literal", - "id": "0", - "name": "Red", - "description": "Classic red. Hex Code: #FF0000 Decimal Code: rgb(255,0,0)", - "propertyAssignments": null - }, - { - "type": "Literal", - "id": "1", - "name": "Blue", - "description": "Classic blue. Hex Code: #0000FF Decimal Code: rgb(0,0,255)", - "propertyAssignments": null - } - ], - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": false, - "isDerived": false, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - } - ], - "propertyAssignments": null -} + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to tests the representation of literals.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Color", + "description": "An enumeration containing basic colors.", + "properties": null, + "literals": [ + { + "type": "Literal", + "id": "0", + "name": "Red", + "description": "Classic red. Hex Code: #FF0000 Decimal Code: rgb(255,0,0)", + "propertyAssignments": null + }, + { + "type": "Literal", + "id": "1", + "name": "Blue", + "description": "Classic blue. Hex Code: #0000FF Decimal Code: rgb(0,0,255)", + "propertyAssignments": null + } + ], + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": false, + "isDerived": false, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + } + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/literal.minimum.json b/test/test_models/literal.minimum.json index 7389771..0c8be2a 100644 --- a/test/test_models/literal.minimum.json +++ b/test/test_models/literal.minimum.json @@ -1,33 +1,40 @@ { - "type": "Package", - "id": "pk1", + "type": "Project", + "id": "proj1", "name": null, "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": null, - "description": null, - "properties": null, - "literals": [ - { - "type": "Literal", - "id": "0", - "name": null, - "description": null, - "propertyAssignments": null - } - ], - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": false, - "isDerived": false, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - } - ], - "propertyAssignments": null -} + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": null, + "description": null, + "properties": null, + "literals": [ + { + "type": "Literal", + "id": "0", + "name": null, + "description": null, + "propertyAssignments": null + } + ], + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": false, + "isDerived": false, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + } + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/no-generalizations-in-gs.json b/test/test_models/no-generalizations-in-gs.json index 0f2a5e2..90fd759 100644 --- a/test/test_models/no-generalizations-in-gs.json +++ b/test/test_models/no-generalizations-in-gs.json @@ -1,20 +1,27 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "GeneralizationSet", - "id": "gs1", - "name": null, - "description": null, - "categorizer": null, - "generalizations": null, - "isDisjoint": null, - "isComplete": null, - "propertyAssignments": null - } - ], - "propertyAssignments": null + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to tests the possibility of representing an empty generalization set.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "GeneralizationSet", + "id": "gs1", + "name": null, + "description": null, + "categorizer": null, + "generalizations": null, + "isDisjoint": null, + "isComplete": null, + "propertyAssignments": null + } + ], + "propertyAssignments": null + }, + "diagrams": null } \ No newline at end of file diff --git a/test/test_models/null-property-type.json b/test/test_models/null-property-type.json index 036515c..e8e1db4 100644 --- a/test/test_models/null-property-type.json +++ b/test/test_models/null-property-type.json @@ -1,4 +1,9 @@ { + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to tests properties without types.", + "model": { "type": "Package", "id": "pk1", "name": null, @@ -39,4 +44,6 @@ } ], "propertyAssignments": null +}, +"diagrams": null } diff --git a/test/test_models/order.json b/test/test_models/order.json index 3ecc63b..1fc8383 100644 --- a/test/test_models/order.json +++ b/test/test_models/order.json @@ -1,4 +1,9 @@ { + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to tests the representation of order in higher-order types, i.e. classes with decorated with <>.", + "model": { "type": "Package", "id": "pk1", "name": null, @@ -46,4 +51,6 @@ "propertyAssignments": null } ] +}, +"diagrams": null } \ No newline at end of file diff --git a/test/test_models/package.all.fields.json b/test/test_models/package.all.fields.json index 6cf9da9..6c70985 100644 --- a/test/test_models/package.all.fields.json +++ b/test/test_models/package.all.fields.json @@ -1,4 +1,9 @@ { + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to tests all fields in a package", + "model": { "type": "Package", "id": "pk1", "name": "Package 1", @@ -33,4 +38,6 @@ } ], "propertyAssignments": null +}, +"diagrams": null } diff --git a/test/test_models/package.minimum.json b/test/test_models/package.minimum.json index f1f9027..335b365 100644 --- a/test/test_models/package.minimum.json +++ b/test/test_models/package.minimum.json @@ -1,8 +1,15 @@ { - "type": "Package", - "id": "pk1", + "type": "Project", + "id": "proj1", "name": null, "description": null, - "contents": null, - "propertyAssignments": null + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": null, + "propertyAssignments": null + }, + "diagrams": null } \ No newline at end of file diff --git a/test/test_models/property.all.fields.json b/test/test_models/property.all.fields.json index 089d016..154444e 100644 --- a/test/test_models/property.all.fields.json +++ b/test/test_models/property.all.fields.json @@ -1,127 +1,134 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": "Person", - "description": null, - "properties": [ - { - "type": "Property", - "id": "a1", - "name": "socialName", - "description": null, - "propertyType": { - "type": "Class", - "id": "c2" + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to tests all fields in a property.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Person", + "description": null, + "properties": [ + { + "type": "Property", + "id": "a1", + "name": "socialName", + "description": null, + "propertyType": { + "type": "Class", + "id": "c2" + }, + "cardinality": "1..1", + "isDerived": false, + "isOrdered": false, + "isReadOnly": false, + "stereotypes": null, + "propertyAssignments": { + "nonStandardProperty": null + }, + "subsettedProperties": [ + { + "type": "Property", + "id": "noproperty" + } + ], + "redefinedProperties": [ + { + "type": "Property", + "id": "noproperty" + } + ], + "aggregationKind": null + } + ], + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Class", + "id": "c2", + "name": "String", + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Relation", + "id": "r1", + "name": "knows", + "description": null, + "stereotypes": [ + "material" + ], + "isAbstract": false, + "isDerived": true, + "properties": [ + { + "type": "Property", + "id": "p1", + "name": "known by", + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": null, + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": "SHARED" }, - "cardinality": "1..1", - "isDerived": false, - "isOrdered": false, - "isReadOnly": false, - "stereotypes": null, - "propertyAssignments": { - "nonStandardProperty": null - }, - "subsettedProperties": [ - { - "type": "Property", - "id": "noproperty" - } - ], - "redefinedProperties": [ - { - "type": "Property", - "id": "noproperty" - } - ], - "aggregationKind": null - } - ], - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Class", - "id": "c2", - "name": "String", - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Relation", - "id": "r1", - "name": "knows", - "description": null, - "stereotypes": [ - "material" - ], - "isAbstract": false, - "isDerived": true, - "properties": [ - { - "type": "Property", - "id": "p1", - "name": "known by", - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" - }, - "cardinality": null, - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": "SHARED" - }, - { - "type": "Property", - "id": "p2", - "name": "known person", - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" - }, - "cardinality": null, - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": "NONE" + { + "type": "Property", + "id": "p2", + "name": "known person", + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": null, + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": "NONE" + } + ], + "propertyAssignments": { + "nonStandardProperty": null } - ], - "propertyAssignments": { - "nonStandardProperty": null } - } - ], - "propertyAssignments": null + ], + "propertyAssignments": null + }, + "diagrams": null } \ No newline at end of file diff --git a/test/test_models/property.minimum.json b/test/test_models/property.minimum.json index ba6d2f7..e1cb6e4 100644 --- a/test/test_models/property.minimum.json +++ b/test/test_models/property.minimum.json @@ -1,113 +1,122 @@ { - "type": "Package", - "id": "pk1", + "type": "Project", + "id": "proj1", "name": null, "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": "Person", - "description": null, - "properties": [ - { - "type": "Property", - "id": "a1", - "name": "socialName", - "description": null, - "propertyType": { - "type": "Class", - "id": "c2" + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Person", + "description": null, + "properties": [ + { + "type": "Property", + "id": "a1", + "name": "socialName", + "description": null, + "propertyType": { + "type": "Class", + "id": "c2" + }, + "cardinality": null, + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null + } + ], + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Class", + "id": "c2", + "name": "String", + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Relation", + "id": "relation1", + "name": "knows", + "description": null, + "stereotypes": [ + "material" + ], + "isAbstract": true, + "isDerived": false, + "properties": [ + { + "type": "Property", + "id": "p1", + "name": "known by", + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": null, + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null }, - "cardinality": null, - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": null + { + "type": "Property", + "id": "p2", + "name": "known person", + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": null, + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null + } + ], + "propertyAssignments": { + "nonStandardProperty": null } - ], - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Class", - "id": "c2", - "name": "String", - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Relation", - "id": "relation1", - "name": "knows", - "description": null, - "stereotypes": ["material"], - "isAbstract": true, - "isDerived": false, - "properties": [ - { - "type": "Property", - "id": "p1", - "name": "known by", - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" - }, - "cardinality": null, - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": null - }, - { - "type": "Property", - "id": "p2", - "name": "known person", - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" - }, - "cardinality": null, - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": null - } - ], - "propertyAssignments": { - "nonStandardProperty": null } - } - ], - "propertyAssignments": null -} + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/property.multilingual.json b/test/test_models/property.multilingual.json index 44a1c18..99064b9 100644 --- a/test/test_models/property.multilingual.json +++ b/test/test_models/property.multilingual.json @@ -1,137 +1,150 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": "Person", - "description": null, - "properties": [ - { - "type": "Property", - "id": "a1", - "name": { - "en": "social name", - "es": "nombre social", - "pt-BR": "nome social" - }, - "description": null, - "propertyType": { - "type": "Class", - "id": "2" - }, - "cardinality": "1..1", - "isDerived": false, - "isOrdered": false, - "isReadOnly": false, - "stereotypes": null, - "propertyAssignments": { - "nonStandardProperty": null - }, - "subsettedProperties": [ - { - "type": "Property", - "id": "c1" - } - ], - "redefinedProperties": [ - { - "type": "Property", + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to test multilingual properties.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Person", + "description": null, + "properties": [ + { + "type": "Property", + "id": "a1", + "name": { + "en": "social name", + "es": "nombre social", + "pt-BR": "nome social" + }, + "description": null, + "propertyType": { + "type": "Class", "id": "2" - } - ], - "aggregationKind": null - } - ], - "literals": null, - "propertyAssignments": null, - "stereotypes": [ "kind" ], - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Class", - "id": "2", - "name": "String", - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": [ "datatype" ], - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Relation", - "id": "r1", - "name": "knows", - "description": null, - "properties": [ - { - "type": "Property", - "id": "p1", - "name": { - "en": "known by", - "es": "conocido por", - "pt-BR": "conhecido por" - }, - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" + }, + "cardinality": "1..1", + "isDerived": false, + "isOrdered": false, + "isReadOnly": false, + "stereotypes": null, + "propertyAssignments": { + "nonStandardProperty": null + }, + "subsettedProperties": [ + { + "type": "Property", + "id": "c1" + } + ], + "redefinedProperties": [ + { + "type": "Property", + "id": "2" + } + ], + "aggregationKind": null + } + ], + "literals": null, + "propertyAssignments": null, + "stereotypes": [ + "kind" + ], + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Class", + "id": "2", + "name": "String", + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": [ + "datatype" + ], + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Relation", + "id": "r1", + "name": "knows", + "description": null, + "properties": [ + { + "type": "Property", + "id": "p1", + "name": { + "en": "known by", + "es": "conocido por", + "pt-BR": "conhecido por" + }, + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": null, + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": "SHARED" }, - "cardinality": null, - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": "SHARED" + { + "type": "Property", + "id": "p2", + "name": { + "en": "known person", + "es": "persona conocida", + "pt-BR": "pessoa conhecida" + }, + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": null, + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": "NONE" + } + ], + "propertyAssignments": { + "nonStandardProperty": null }, - { - "type": "Property", - "id": "p2", - "name": { - "en": "known person", - "es": "persona conocida", - "pt-BR": "pessoa conhecida" - }, - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" - }, - "cardinality": null, - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": "NONE" - } - ], - "propertyAssignments": { - "nonStandardProperty": null - }, - "stereotypes": [ "material" ], - "isAbstract": false, - "isDerived": false - } - ], - "propertyAssignments": null + "stereotypes": [ + "material" + ], + "isAbstract": false, + "isDerived": false + } + ], + "propertyAssignments": null + }, + "diagrams": null } \ No newline at end of file diff --git a/test/test_models/propertyassignments.all.options.json b/test/test_models/propertyassignments.all.options.json index 99a523f..059c578 100644 --- a/test/test_models/propertyassignments.all.options.json +++ b/test/test_models/propertyassignments.all.options.json @@ -1,45 +1,52 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": null, - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": { - "a": null, - "b": true, - "c": 0, - "d": 1, - "e": "word", - "f": { - "type": "Class", - "id": "c1" - }, - "g": [ - true, - 0, - 1, - "word", - { + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to test property assignments.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": null, + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": { + "a": null, + "b": true, + "c": 0, + "d": 1, + "e": "word", + "f": { "type": "Class", "id": "c1" - } - ] - }, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - } - ], - "propertyAssignments": null -} + }, + "g": [ + true, + 0, + 1, + "word", + { + "type": "Class", + "id": "c1" + } + ] + }, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + } + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/relation.all.fields.json b/test/test_models/relation.all.fields.json index 8ca8c7c..e41eb49 100644 --- a/test/test_models/relation.all.fields.json +++ b/test/test_models/relation.all.fields.json @@ -1,81 +1,88 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": "Person", - "description": null, - "stereotypes": [ - "kind" - ], - "properties": null, - "literals": null, - "propertyAssignments": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Relation", - "id": "relation1", - "name": "knows", - "description": null, - "stereotypes": [ - "material" - ], - "isAbstract": false, - "isDerived": false, - "properties": [ - { - "type": "Property", - "id": "p1", - "name": "known by", - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to tests all fields in a relation.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Person", + "description": null, + "stereotypes": [ + "kind" + ], + "properties": null, + "literals": null, + "propertyAssignments": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Relation", + "id": "relation1", + "name": "knows", + "description": null, + "stereotypes": [ + "material" + ], + "isAbstract": false, + "isDerived": false, + "properties": [ + { + "type": "Property", + "id": "p1", + "name": "known by", + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": "*", + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null }, - "cardinality": "*", - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": null - }, - { - "type": "Property", - "id": "p2", - "name": "known person", - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" - }, - "cardinality": "*", - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": null + { + "type": "Property", + "id": "p2", + "name": "known person", + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": "*", + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null + } + ], + "propertyAssignments": { + "nonStandardProperty": null } - ], - "propertyAssignments": { - "nonStandardProperty": null } - } - ], - "propertyAssignments": null + ], + "propertyAssignments": null + }, + "diagrams": null } \ No newline at end of file diff --git a/test/test_models/relation.minimum.json b/test/test_models/relation.minimum.json index f905b46..0fe5883 100644 --- a/test/test_models/relation.minimum.json +++ b/test/test_models/relation.minimum.json @@ -1,86 +1,93 @@ { - "type": "Package", - "id": "pk1", + "type": "Project", + "id": "proj1", "name": null, "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": null, - "description": null, - "properties": null, - "literals": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Relation", - "id": "relation1", - "name": null, - "description": null, - "properties": [ - { - "type": "Property", - "id": "p1", - "name": null, - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": null, + "description": null, + "properties": null, + "literals": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null + }, + { + "type": "Relation", + "id": "relation1", + "name": null, + "description": null, + "properties": [ + { + "type": "Property", + "id": "p1", + "name": null, + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": null, + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null }, - "cardinality": null, - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": null - }, - { - "type": "Property", - "id": "p2", - "name": null, - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" - }, - "cardinality": null, - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": null - } - ], - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null - }, - { - "type": "Relation", - "id": "relation1", - "name": null, - "description": null, - "properties": null, - "propertyAssignments": null, - "stereotypes": null, - "isAbstract": null, - "isDerived": null - } - ], - "propertyAssignments": null -} + { + "type": "Property", + "id": "p2", + "name": null, + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": null, + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null + } + ], + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null + }, + { + "type": "Relation", + "id": "relation1", + "name": null, + "description": null, + "properties": null, + "propertyAssignments": null, + "stereotypes": null, + "isAbstract": null, + "isDerived": null + } + ], + "propertyAssignments": null + }, + "diagrams": null +} \ No newline at end of file diff --git a/test/test_models/relation.multilingual.json b/test/test_models/relation.multilingual.json index daab2ef..189973a 100644 --- a/test/test_models/relation.multilingual.json +++ b/test/test_models/relation.multilingual.json @@ -1,85 +1,92 @@ { - "type": "Package", - "id": "pk1", - "name": null, - "description": null, - "contents": [ - { - "type": "Class", - "id": "c1", - "name": "Person", - "description": null, - "stereotypes": [ - "kind" - ], - "properties": null, - "literals": null, - "propertyAssignments": null, - "isAbstract": null, - "isDerived": null, - "isExtensional": null, - "isPowertype": null, - "order": null, - "allowed": null - }, - { - "type": "Relation", - "id": "relation1", - "name": { - "en": "knows", - "es": "conoce", - "pt-BR": "conhece" + "type": "Project", + "id": "proj1", + "name": "My Test Project", + "description": "A project to tests multilingual properties in relations.", + "model": { + "type": "Package", + "id": "pk1", + "name": null, + "description": null, + "contents": [ + { + "type": "Class", + "id": "c1", + "name": "Person", + "description": null, + "stereotypes": [ + "kind" + ], + "properties": null, + "literals": null, + "propertyAssignments": null, + "isAbstract": null, + "isDerived": null, + "isExtensional": null, + "isPowertype": null, + "order": null, + "allowed": null }, - "description": null, - "stereotypes": [ - "material" - ], - "isAbstract": false, - "isDerived": false, - "properties": [ - { - "type": "Property", - "id": "p1", - "name": "known by", - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" - }, - "cardinality": "*", - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": null + { + "type": "Relation", + "id": "relation1", + "name": { + "en": "knows", + "es": "conoce", + "pt-BR": "conhece" }, - { - "type": "Property", - "id": "p2", - "name": "known person", - "description": null, - "propertyType": { - "type": "Class", - "id": "c1" + "description": null, + "stereotypes": [ + "material" + ], + "isAbstract": false, + "isDerived": false, + "properties": [ + { + "type": "Property", + "id": "p1", + "name": "known by", + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": "*", + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null }, - "cardinality": "*", - "isDerived": null, - "isOrdered": null, - "isReadOnly": null, - "stereotypes": null, - "propertyAssignments": null, - "subsettedProperties": null, - "redefinedProperties": null, - "aggregationKind": null + { + "type": "Property", + "id": "p2", + "name": "known person", + "description": null, + "propertyType": { + "type": "Class", + "id": "c1" + }, + "cardinality": "*", + "isDerived": null, + "isOrdered": null, + "isReadOnly": null, + "stereotypes": null, + "propertyAssignments": null, + "subsettedProperties": null, + "redefinedProperties": null, + "aggregationKind": null + } + ], + "propertyAssignments": { + "nonStandardProperty": null } - ], - "propertyAssignments": { - "nonStandardProperty": null } - } - ], - "propertyAssignments": null + ], + "propertyAssignments": null + }, + "diagrams": null } \ No newline at end of file