From e83fc0deea08320a8c8c71b1e7862856dd13cd8c Mon Sep 17 00:00:00 2001 From: "Dr. Asis Hallab" Date: Thu, 25 Nov 2021 10:00:52 -0600 Subject: [PATCH 01/21] Added JSON sources --- isa_1_0_core/assay_schema.json | 77 +++++++++++++ isa_1_0_core/comment_schema.json | 16 +++ isa_1_0_core/data_schema.json | 39 +++++++ isa_1_0_core/factor_schema.json | 23 ++++ isa_1_0_core/factor_value_schema.json | 29 +++++ isa_1_0_core/investigation_schema.json | 49 ++++++++ isa_1_0_core/material_attribute_schema.json | 13 +++ .../material_attribute_value_schema.json | 29 +++++ isa_1_0_core/material_schema.json | 36 ++++++ isa_1_0_core/ontology_annotation_schema.json | 31 +++++ .../ontology_source_reference_schema.json | 20 ++++ isa_1_0_core/organization_schema.json | 12 ++ isa_1_0_core/person_schema.json | 30 +++++ .../process_parameter_value_schema.json | 28 +++++ isa_1_0_core/process_schema.json | 76 +++++++++++++ isa_1_0_core/protocol_parameter_schema.json | 19 ++++ isa_1_0_core/protocol_schema.json | 59 ++++++++++ isa_1_0_core/publication_schema.json | 23 ++++ isa_1_0_core/sample_schema.json | 35 ++++++ isa_1_0_core/source_schema.json | 22 ++++ isa_1_0_core/study_schema.json | 106 ++++++++++++++++++ 21 files changed, 772 insertions(+) create mode 100644 isa_1_0_core/assay_schema.json create mode 100644 isa_1_0_core/comment_schema.json create mode 100644 isa_1_0_core/data_schema.json create mode 100644 isa_1_0_core/factor_schema.json create mode 100644 isa_1_0_core/factor_value_schema.json create mode 100644 isa_1_0_core/investigation_schema.json create mode 100644 isa_1_0_core/material_attribute_schema.json create mode 100644 isa_1_0_core/material_attribute_value_schema.json create mode 100644 isa_1_0_core/material_schema.json create mode 100644 isa_1_0_core/ontology_annotation_schema.json create mode 100644 isa_1_0_core/ontology_source_reference_schema.json create mode 100644 isa_1_0_core/organization_schema.json create mode 100644 isa_1_0_core/person_schema.json create mode 100644 isa_1_0_core/process_parameter_value_schema.json create mode 100644 isa_1_0_core/process_schema.json create mode 100644 isa_1_0_core/protocol_parameter_schema.json create mode 100644 isa_1_0_core/protocol_schema.json create mode 100644 isa_1_0_core/publication_schema.json create mode 100644 isa_1_0_core/sample_schema.json create mode 100644 isa_1_0_core/source_schema.json create mode 100644 isa_1_0_core/study_schema.json diff --git a/isa_1_0_core/assay_schema.json b/isa_1_0_core/assay_schema.json new file mode 100644 index 0000000..c6f16b4 --- /dev/null +++ b/isa_1_0_core/assay_schema.json @@ -0,0 +1,77 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Assay JSON Schema", + "name": "Assay JSON Schema", + "description": "JSON Schema describing an Assay", + "@context": { + "@base": "http://purl.org/isaterms/", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "type": "object", + "properties": { + "@id": { "type": "string", "format": "uri" }, + "filename" : { "type" : "string" }, + "measurementType" : { + "$ref": "ontology_annotation_schema.json#" + }, + "technologyType" : { + "type" : "object", + "properties": { + "ontologyAnnotation" : { + "$ref": "ontology_annotation_schema.json#" + } + } + }, + "technologyPlatform" : { "type" : "string"}, + "dataFiles" : { + "type": "array", + "items" : { + "$ref": "data_schema.json#" + } + }, + "materials": { + "type": "object", + "properties": { + "samples": { + "type": "array", + "items": { + "$ref": "sample_schema.json#" + } + }, + "otherMaterials": { + "type": "array", + "items": { + "$ref": "material_schema.json#" + } + } + } + }, + "characteristicCategories": { + "description": "List of all the characteristics categories (or material attributes) defined in the study, used to avoid duplication of their declaration when each material_attribute_value is created. ", + "type": "array", + "items": { + "$ref": "material_attribute_schema.json#" + } + }, + "unitCategories": { + "description": "List of all the unitsdefined in the study, used to avoid duplication of their declaration when each value is created. ", + "type": "array", + "items": { + "$ref": "ontology_annotation_schema.json#" + } + }, + "processSequence": { + "type": "array", + "items" : { + "$ref" : "process_schema.json#" + } + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/comment_schema.json b/isa_1_0_core/comment_schema.json new file mode 100644 index 0000000..1ff9c12 --- /dev/null +++ b/isa_1_0_core/comment_schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "ISA comment schema - it corresponds to ISA Comment[] construct", + "description": "JSON-schema representing a comment in the ISA model", + "type": "object", + "properties": { + "@id": { "type": "string", "format": "uri" }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/data_schema.json b/isa_1_0_core/data_schema.json new file mode 100644 index 0000000..f12c2ee --- /dev/null +++ b/isa_1_0_core/data_schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "ISA data schema", + "description": "JSON-schema representing a data file in the ISA model", + "type": "object", + "properties": { + "@id": { "type": "string", "format": "uri" }, + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Raw Data File", + "Derived Data File", + "Image File", + "Acquisition Parameter Data File", + "Derived Spectral Data File", + "Protein Assignment File", + "Raw Spectral Data File", + "Peptide Assignment File", + "Array Data File", + "Derived Array Data File", + "Post Translational Modification Assignment File", + "Derived Array Data Matrix File", + "Free Induction Decay Data File", + "Metabolite Assignment File", + "Array Data Matrix File" + ] + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/factor_schema.json b/isa_1_0_core/factor_schema.json new file mode 100644 index 0000000..cb3f960 --- /dev/null +++ b/isa_1_0_core/factor_schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "ISA factor schema", + "name": "ISA factor schema", + "description": "JSON-schema representing a factor value in the ISA model", + "type": "object", + "properties": { + "@id": { "type": "string", "format": "uri" }, + "factorName": { + "type": "string" + }, + "factorType": { + "$ref": "ontology_annotation_schema.json#" + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} diff --git a/isa_1_0_core/factor_value_schema.json b/isa_1_0_core/factor_value_schema.json new file mode 100644 index 0000000..5b6ff6f --- /dev/null +++ b/isa_1_0_core/factor_value_schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "ISA factor value schema", + "description": "JSON-schema representing a factor value in the ISA model", + "type": "object", + "properties": { + "@id": { "type": "string", "format": "uri" }, + "category" : { + "$ref": "factor_schema.json#" + }, + "value": { + "anyOf" : [ + { "$ref": "ontology_annotation_schema.json#"}, + { "type": "string"}, + { "type": "number"} + ] + }, + "unit": { + "$ref": "ontology_annotation_schema.json#" + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/investigation_schema.json b/isa_1_0_core/investigation_schema.json new file mode 100644 index 0000000..d039db2 --- /dev/null +++ b/isa_1_0_core/investigation_schema.json @@ -0,0 +1,49 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA investigation schema", + "description" : "JSON-schema representing an investigation in the ISA model", + "type" : "object", + "properties" : { + "@id": { "type": "string", "format": "uri" }, + "filename": { "type" : "string"}, + "identifier" : { "type" : "string" }, + "title" : { "type" : "string"}, + "description" : { "type" : "string"}, + "submissionDate" : { "type" : "string", "format" : "date-time"}, + "publicReleaseDate" : { "type" : "string", "format" : "date-time"}, + "ontologySourceReferences" : { + "type" : "array", + "items" : { + "$ref": "ontology_source_reference_schema.json#" + } + }, + "publications" : { + "type" : "array", + "items" : { + "$ref": "publication_schema.json#" + + } + }, + "people" : { + "type" : "array", + "items" : { + "$ref": "person_schema.json#" + + } + }, + "studies" : { + "type" : "array", + "items" : { + "$ref": "study_schema.json#" + + } + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/material_attribute_schema.json b/isa_1_0_core/material_attribute_schema.json new file mode 100644 index 0000000..4b6d0f9 --- /dev/null +++ b/isa_1_0_core/material_attribute_schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA material attribute schema", + "description" : "JSON-schema representing a characteristics category (what appears between the brackets in Charactersitics[]) in the ISA model", + "type" : "object", + "properties" : { + "@id": { "type": "string", "format": "uri" }, + "characteristicType": { + "$ref": "ontology_annotation_schema.json#" + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/material_attribute_value_schema.json b/isa_1_0_core/material_attribute_value_schema.json new file mode 100644 index 0000000..e4c6c69 --- /dev/null +++ b/isa_1_0_core/material_attribute_value_schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA material attribute schema", + "description" : "JSON-schema representing a material attribute (or characteristic) value in the ISA model", + "type" : "object", + "properties" : { + "@id": { "type": "string", "format": "uri" }, + "category" : { + "$ref": "material_attribute_schema.json#" + }, + "value": { + "anyOf" : [ + { "$ref": "ontology_annotation_schema.json#"}, + { "type": "string"}, + { "type": "number"} + ] + }, + "unit": { + "$ref": "ontology_annotation_schema.json#" + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/material_schema.json b/isa_1_0_core/material_schema.json new file mode 100644 index 0000000..2613116 --- /dev/null +++ b/isa_1_0_core/material_schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA material node schema", + "description" : "JSON-schema representing a material node in the ISA model, which is not a source or a sample (as they have specific schemas) - this will correspond to 'Extract Name', 'Labeled Extract Name'", + "type" : "object", + "properties" : { + "@id": { "type": "string", "format": "uri" }, + "name" : { "type" : "string" }, + "type": { + "type": "string", + "enum": [ + "Extract Name", + "Labeled Extract Name" + ] + }, + "characteristics" : { + "type" : "array", + "items" : { + "$ref": "material_attribute_value_schema.json#" + } + }, + "derivesFrom": { + "type" : "array", + "items" : { + "$ref": "material_schema.json#" + } + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/ontology_annotation_schema.json b/isa_1_0_core/ontology_annotation_schema.json new file mode 100644 index 0000000..083e7d2 --- /dev/null +++ b/isa_1_0_core/ontology_annotation_schema.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA ontology reference schema", + "name" : "ISA ontology reference schema", + "description" : "JSON-schema representing an ontology reference or annotation in the ISA model (for fields that are required to be ontology annotations)", + "type" : "object", + "properties" : { + "@id": { "type": "string", "format": "uri" }, + "annotationValue": { + "anyOf": [ + { "type": "string" }, + { "type": "number"} + ] + }, + "termSource" : { + "type" : "string", + "description" : "The abbreviated ontology name. It should correspond to one of the sources as specified in the ontologySourceReference section of the Investigation." + }, + "termAccession" : { + "type" : "string", + "format" : "uri" + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/ontology_source_reference_schema.json b/isa_1_0_core/ontology_source_reference_schema.json new file mode 100644 index 0000000..8fb7619 --- /dev/null +++ b/isa_1_0_core/ontology_source_reference_schema.json @@ -0,0 +1,20 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA ontology source reference schema", + "name" : "ISA ontology source reference schema", + "description" : "JSON-schema representing an ontology reference in the ISA model", + "type" : "object", + "properties" : { + "description" : { "type" : "string" }, + "file" : { "type" : "string" }, + "name": {"type": "string"}, + "version": { "type": "string"}, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/organization_schema.json b/isa_1_0_core/organization_schema.json new file mode 100644 index 0000000..e71aab1 --- /dev/null +++ b/isa_1_0_core/organization_schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA organization schema", + "description" : "JSON-schema representing an organization in the ISA model v1.0", + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/person_schema.json b/isa_1_0_core/person_schema.json new file mode 100644 index 0000000..389860e --- /dev/null +++ b/isa_1_0_core/person_schema.json @@ -0,0 +1,30 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA person schema", + "description" : "JSON-schema representing a person in the ISA model", + "type" : "object", + "properties" : { + "@id": { "type": "string", "format": "uri" }, + "lastName" : { "type" : "string"}, + "firstName" : { "type" : "string"}, + "midInitials" : { "type" : "string" }, + "email" : { "type" : "string", "format" : "email"}, + "phone" : { "type": "string"}, + "fax" : { "type" : "string" }, + "address" : { "type" : "string" }, + "affiliation" : { "type" : "string" }, + "roles" : { + "type" : "array", + "items" : { + "$ref": "ontology_annotation_schema.json#" + } + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/process_parameter_value_schema.json b/isa_1_0_core/process_parameter_value_schema.json new file mode 100644 index 0000000..8e992dd --- /dev/null +++ b/isa_1_0_core/process_parameter_value_schema.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA process parameter value schema", + "description" : "JSON-schema representing a Parameter Value (associated with a Protocol REF) in the ISA model", + "type" : "object", + "properties" : { + "category" : { + "$ref": "protocol_parameter_schema.json#" + }, + "value": { + "anyOf" : [ + { "$ref": "ontology_annotation_schema.json#"}, + { "type": "string"}, + { "type": "number"} + ] + }, + "unit": { + "$ref": "ontology_annotation_schema.json#" + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/process_schema.json b/isa_1_0_core/process_schema.json new file mode 100644 index 0000000..35b6889 --- /dev/null +++ b/isa_1_0_core/process_schema.json @@ -0,0 +1,76 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "ISA process or protocol application schema, corresponds to 'Protocol REF' columns in the study and assay files", + "description": "JSON-schema representing a protocol application in the ISA model", + "type": "object", + "properties": { + "@id": { "type": "string", "format": "uri" }, + "name": { + "type": "string" + }, + "executesProtocol": { + "$ref": "protocol_schema.json#" + }, + "parameterValues": { + "type": "array", + "items": { + "$ref" : "process_parameter_value_schema.json#" + } + }, + "performer": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "previousProcess" : { + "$ref" : "process_schema.json#" + }, + "nextProcess": { + "$ref" : "process_schema.json#" + }, + "inputs" : { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "source_schema.json#" + }, + { + "$ref": "sample_schema.json#" + }, + { + "$ref": "data_schema.json#" + }, + { + "$ref": "material_schema.json#" + } + ] + } + }, + "outputs" : { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "sample_schema.json#" + }, + { + "$ref": "data_schema.json#" + }, + { + "$ref": "material_schema.json#" + } + ] + } + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/protocol_parameter_schema.json b/isa_1_0_core/protocol_parameter_schema.json new file mode 100644 index 0000000..48037fc --- /dev/null +++ b/isa_1_0_core/protocol_parameter_schema.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA protocol parameter schema", + "description" : "JSON-schema representing a parameter for a protocol (category declared in the investigation file) in the ISA model", + "type" : "object", + "properties" : { + "@id": { "type": "string", "format": "uri" }, + "parameterName": { + "$ref": "ontology_annotation_schema.json#" + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/protocol_schema.json b/isa_1_0_core/protocol_schema.json new file mode 100644 index 0000000..3ae3328 --- /dev/null +++ b/isa_1_0_core/protocol_schema.json @@ -0,0 +1,59 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "ISA protocol schema", + "name": "ISA protocol schema", + "description": "JSON-schema representing a protocol in the ISA model", + "type": "object", + "properties": { + "@id": { "type": "string", "format": "uri" }, + "name": { + "type": "string" + }, + "protocolType": { + "$ref": "ontology_annotation_schema.json#" + }, + "description": { + "type": "string" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "version": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "$ref": "protocol_parameter_schema.json#" + } + }, + "components": { + "type": "array", + "items": { + "type": "object", + "properties": { + "componentName": { + "type": "string" + }, + "componentType": { + "$ref": "ontology_annotation_schema.json#" + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + } + } + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/publication_schema.json b/isa_1_0_core/publication_schema.json new file mode 100644 index 0000000..fca7651 --- /dev/null +++ b/isa_1_0_core/publication_schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA investigation schema", + "name" : "ISA investigation schema", + "description" : "JSON-schema representing an investigation in the ISA model", + "type" : "object", + "properties" : { + "pubMedID" : { "type" : "string" }, + "doi" : { "type" : "string"}, + "authorList" : { "type" : "string" }, + "title" : { "type" : "string" }, + "status" : { + "$ref": "ontology_annotation_schema.json#" + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} diff --git a/isa_1_0_core/sample_schema.json b/isa_1_0_core/sample_schema.json new file mode 100644 index 0000000..f144125 --- /dev/null +++ b/isa_1_0_core/sample_schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA sample schema", + "description" : "JSON-schema representing a sample in the ISA model. A sample represents a major output resulting from a protocol application other than the special case outputs of Extract or a Labeled Extract.", + "type": "object", + "properties" : { + "@id": { "type": "string", "format": "uri" }, + "name" : { "type" : "string" }, + "characteristics" : { + "type" : "array", + "items" : { + "$ref": "material_attribute_value_schema.json#" + } + }, + "factorValues" : { + "type" : "array", + "items" : { + "$ref" : "factor_value_schema.json#" + } + }, + "derivesFrom": { + "type" : "array", + "items" : { + "$ref": "source_schema.json#" + } + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/source_schema.json b/isa_1_0_core/source_schema.json new file mode 100644 index 0000000..360ee3a --- /dev/null +++ b/isa_1_0_core/source_schema.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title" : "ISA source schema", + "description" : "JSON-schema representing a source in the ISA model. Sources are considered as the starting biological material used in a study.", + "properties" : { + "@id": { "type": "string", "format": "uri" }, + "name" : { "type" : "string" }, + "characteristics" : { + "type" : "array", + "items" : { + "$ref": "material_attribute_value_schema.json#" + } + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/isa_1_0_core/study_schema.json b/isa_1_0_core/study_schema.json new file mode 100644 index 0000000..1ce3b01 --- /dev/null +++ b/isa_1_0_core/study_schema.json @@ -0,0 +1,106 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Study JSON Schema", + "description": "JSON Schema describing an Study", + "@context": { + "@base": "http://purl.org/isaterms/", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "type": "object", + "properties": { + "@id": { "type": "string", "format": "uri" }, + "filename" : { "type" : "string"}, + "identifier" : { "type" : "string" }, + "title" : { "type" : "string"}, + "description" : { "type" : "string"}, + "submissionDate" : { "type" : "string", "format" : "date-time"}, + "publicReleaseDate" : { "type" : "string", "format" : "date-time"}, + "publications" : { + "type" : "array", + "items" : { + "$ref": "publication_schema.json#" + } + }, + "people" : { + "type" : "array", + "items" : { + "$ref": "person_schema.json#" + + } + }, + "studyDesignDescriptors":{ + "type": "array", + "items" : { + "$ref": "ontology_annotation_schema.json#" + } + }, + "protocols" : { + "type": "array", + "items" : { + "$ref": "protocol_schema.json#" + } + }, + "materials": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "source_schema.json#" + } + }, + "samples": { + "type": "array", + "items": { + "$ref": "sample_schema.json#" + } + }, + "otherMaterials": { + "type": "array", + "items": { + "$ref": "material_schema.json#" + } + } + } + }, + "processSequence": { + "type": "array", + "items" : { + "$ref" : "process_schema.json#" + } + }, + "assays" : { + "type": "array", + "items" : { + "$ref": "assay_schema.json#" + } + }, + "factors": { + "type": "array", + "items": { + "$ref": "factor_schema.json#" + } + }, + "characteristicCategories": { + "description": "List of all the characteristics categories (or material attributes) defined in the study, used to avoid duplication of their declaration when each material_attribute_value is created. ", + "type": "array", + "items": { + "$ref": "material_attribute_schema.json#" + } + }, + "unitCategories": { + "description": "List of all the unitsdefined in the study, used to avoid duplication of their declaration when each value is created. ", + "type": "array", + "items": { + "$ref": "ontology_annotation_schema.json#" + } + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } + }, + "additionalProperties": false +} \ No newline at end of file From 37fca852911314825f87551470f9f4ceb0877fef Mon Sep 17 00:00:00 2001 From: "Dr. Asis Hallab" Date: Thu, 25 Nov 2021 10:03:45 -0600 Subject: [PATCH 02/21] Added scafold of utils --- utils.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 utils.js diff --git a/utils.js b/utils.js new file mode 100644 index 0000000..8268ff7 --- /dev/null +++ b/utils.js @@ -0,0 +1,17 @@ +const processProperties = function(props) { + +} + +const processAssociation = function(assocProp) { + +} + +const processScalar = function(scalarProp) { + +} + +module.exports = { + processProperties, + processAssociation, + processScalar +} From f35a8a4a12d93c7bca869ab855a38135e5d851e7 Mon Sep 17 00:00:00 2001 From: "Dr. Asis Hallab" Date: Thu, 25 Nov 2021 10:47:37 -0600 Subject: [PATCH 03/21] Got props parsed --- test.js | 4 ++++ utils.js | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 test.js diff --git a/test.js b/test.js new file mode 100644 index 0000000..845babe --- /dev/null +++ b/test.js @@ -0,0 +1,4 @@ +const i = require('./isa_1_0_core/investigation_schema.json') +const u = require('./utils.js') + +u.processProperties(i.properties); diff --git a/utils.js b/utils.js index 8268ff7..9dc3532 100644 --- a/utils.js +++ b/utils.js @@ -1,17 +1,72 @@ -const processProperties = function(props) { +const processProperties = function(propertiesObj) { + const props = Object.entries(propertiesObj); + let zendroAttributes = props.reduce( + (a, p) => { + const propName = p[0]; + const propDef = p[1]; + let def; + // identify type: association or scalar + // and invoke handler + if (propDef.type === "array") { + def = processArray(propDef); + } else if (!propDef.type || propDef.type === "object") { + def = processAssociation(p); + } else { + def = processScalar(p); + } + return Object.assign(a, def); + }, {}); + // Manually add an 'id' field: + zendroAttributes["id"] = "String"; + console.log({ + zendroAttributes + }); + return zendroAttributes; +} +const mapIsaTypeToZendroType = { + "string": "String", + "date-time": "DateTime", + "number": "Float", + "email": "String", + "uri": "String" } -const processAssociation = function(assocProp) { +const recognizeIsaType = function(propDef) { + if (!propDef.format) { + return mapIsaTypeToZendroType[propDef.type]; + } else { + return mapIsaTypeToZendroType[propDef.format]; + } +} +const processArray = function(arrayProp) { + // are you a scalar array? + // if scalar, you'll become a Zendro "array-field", e.g. "[String]" + // if object, you'll become a Zendro association } -const processScalar = function(scalarProp) { +const processAssociation = function(assocProp) { + console.log(assocProp); + // "proper Zendro assoc definition" + // - need to split ISA union assocs (anyOf, oneOf, allOf) into separate + // associations. +} +const processScalar = function(scalarProp) { + console.log(`Processing scalar ${scalarProp[0]}`); + if (scalarProp[0] !== "@id") { + const result = { + [scalarProp[0]]: recognizeIsaType(scalarProp[1]) + } + console.log(result) + return result + } } module.exports = { processProperties, + processArray, processAssociation, processScalar } From e073168cc5a59ecbe3744cc21a88edc751e3fc31 Mon Sep 17 00:00:00 2001 From: Terazus Date: Mon, 29 Nov 2021 03:45:53 -0800 Subject: [PATCH 04/21] Added a package.json + eslint config file --- .eslintrc.js | 14 ++++++++++++++ package.json | 11 +++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .eslintrc.js create mode 100644 package.json diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..92cb9c9 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,14 @@ +module.exports = { + root: true, + env: { + node: true, + es6: true, + }, + 'extends': [ + 'eslint:recommended' + ], + parserOptions: { + parser: 'babel-eslint', + ecmaVersion: 11 + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..6819600 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "isa2zendro", + "license": "MIT", + "repository": "https://github.com/Zendro-dev/ISA_Schema_to_Zendro_Definition", + "devDependencies": { + "eslint": "^6.7.2" + }, + "scripts": { + "lint": "eslint utils.js" + } +} From 352954eb8fc4c765c1eb5bc55d763b91078ef40a Mon Sep 17 00:00:00 2001 From: Terazus Date: Wed, 1 Dec 2021 06:19:22 -0800 Subject: [PATCH 05/21] prepared json schema logic for array and assocations --- test.js | 14 ++++++- utils.js | 126 +++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 97 insertions(+), 43 deletions(-) diff --git a/test.js b/test.js index 845babe..77134ac 100644 --- a/test.js +++ b/test.js @@ -1,4 +1,14 @@ -const i = require('./isa_1_0_core/investigation_schema.json') +const fs = require('fs') const u = require('./utils.js') -u.processProperties(i.properties); +let OUTPUT = {} + +fs.readdir("./isa_1_0_core/", (err, files) => { + files.forEach(file => { + console.log(`PROCESSING FILE ${file}`) + let schemaName = u.getSchemaName(file) + let i = require(`./isa_1_0_core/${file}`) + OUTPUT[schemaName] = u.processProperties(i.properties, schemaName) + }); + // console.log(u.relationMapping) +}); diff --git a/utils.js b/utils.js index 9dc3532..b3928b8 100644 --- a/utils.js +++ b/utils.js @@ -1,29 +1,5 @@ -const processProperties = function(propertiesObj) { - const props = Object.entries(propertiesObj); - let zendroAttributes = props.reduce( - (a, p) => { - const propName = p[0]; - const propDef = p[1]; - let def; - // identify type: association or scalar - // and invoke handler - if (propDef.type === "array") { - def = processArray(propDef); - } else if (!propDef.type || propDef.type === "object") { - def = processAssociation(p); - } else { - def = processScalar(p); - } - return Object.assign(a, def); - }, {}); - // Manually add an 'id' field: - zendroAttributes["id"] = "String"; - console.log({ - zendroAttributes - }); - return zendroAttributes; -} - +let PARENT; +let relationMapping = {}; const mapIsaTypeToZendroType = { "string": "String", "date-time": "DateTime", @@ -32,41 +8,109 @@ const mapIsaTypeToZendroType = { "uri": "String" } +const processProperties = function(propertiesObj, parentName) { + PARENT = getSchemaName(parentName); + const props = Object.entries(propertiesObj); + let zendroAttributes = { model: PARENT, "storageType": "sql", attributes: {}, associations: {} } + props.forEach(prop => { + const propDef = prop[1]; + let def; + if (propDef.type === "array") { + def = processArray(prop); + Object.assign(zendroAttributes.associations, def) + } + else if (!propDef.type || propDef.type === "object") { + def = processAssociation(prop); + Object.assign(zendroAttributes.associations, def) + } + else { + def = processScalar(prop); + Object.assign(zendroAttributes.attributes, def) + } + }); + + // Manually add an 'id' field: + zendroAttributes.attributes["id"] = "String"; + console.log('--- ' + PARENT + ' ---') + console.log(zendroAttributes); + return zendroAttributes; +} + const recognizeIsaType = function(propDef) { - if (!propDef.format) { - return mapIsaTypeToZendroType[propDef.type]; - } else { - return mapIsaTypeToZendroType[propDef.format]; - } + return !propDef.format ? mapIsaTypeToZendroType[propDef.type] : mapIsaTypeToZendroType[propDef.format] } const processArray = function(arrayProp) { + // SEE PROTOCOL, PROCESS + console.log(`Processing array ${JSON.stringify(arrayProp[0])}`) + const items = arrayProp[1].items + if (items['$ref']) { + // This is a reference to another schema. Most relationships will go through here. + console.log(`Found reference to another schema ${items['$ref']}`) + return processAssociation(arrayProp, 'array') + } + else if (items.types && items.types === 'object') { + // This is a reference to a nested object + console.log(`Found reference to another object ${items.type}`) + processAssociation(arrayProp, 'array') + } + else if (items['anyOf']) { + // This is a reference to multiples schemas or objects + console.log(`Found reference to multiple objects ${items['anyOf']}`) + processAssociation(arrayProp, 'array') + } + else { + // This is a scalar + console.log(`Found scalar ${items.type}`) + return `[${recognizeIsaType(arrayProp)}]` + } // are you a scalar array? // if scalar, you'll become a Zendro "array-field", e.g. "[String]" - // if object, you'll become a Zendro association + // if object, you'll become a Zendro association } -const processAssociation = function(assocProp) { - console.log(assocProp); - // "proper Zendro assoc definition" - // - need to split ISA union assocs (anyOf, oneOf, allOf) into separate - // associations. +const processAssociation = function(assocProp, from) { + console.log(`Processing association ${JSON.stringify(assocProp[0])}`) + const references = 'items' in assocProp[1] ? assocProp[1].items : assocProp[1] + let schemaName = ""; + if (Object.keys(references).includes('$ref')) { + // there is a single reference to another schema + schemaName = getSchemaName(references['$ref']) + schemaName in relationMapping ? relationMapping[schemaName].push(PARENT) : relationMapping[schemaName] = [PARENT] + } + else if (Object.keys(references).includes('anyOf')) { + // there are multiple references (we don't use oneOf and allOf in ISA) + // for loop with a recursive call ? + } + else if (Object.keys(references).includes('type') && references.type === 'object'){ + // this is a nested reference + } + return {[assocProp[0]]: { + type: from === 'array' ? 'to_many' : 'to_one', + target: schemaName, + targetStorageType: "sql", + targetKey: null, + keyIn: null, + label: null + }} } const processScalar = function(scalarProp) { console.log(`Processing scalar ${scalarProp[0]}`); if (scalarProp[0] !== "@id") { - const result = { - [scalarProp[0]]: recognizeIsaType(scalarProp[1]) - } + const result = { [scalarProp[0]]: recognizeIsaType(scalarProp[1]) } console.log(result) return result } } +function getSchemaName(string) { return string.replace('_schema.json', '').replace("#", '')} + module.exports = { processProperties, processArray, processAssociation, - processScalar + processScalar, + getSchemaName, + relationMapping } From 6ab22010362f18dd0264c4d938f4faa9792a423c Mon Sep 17 00:00:00 2001 From: Terazus Date: Wed, 1 Dec 2021 06:25:12 -0800 Subject: [PATCH 06/21] added more comments for guidance --- test.js | 2 +- utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test.js b/test.js index 77134ac..6713e2c 100644 --- a/test.js +++ b/test.js @@ -10,5 +10,5 @@ fs.readdir("./isa_1_0_core/", (err, files) => { let i = require(`./isa_1_0_core/${file}`) OUTPUT[schemaName] = u.processProperties(i.properties, schemaName) }); - // console.log(u.relationMapping) + // we now need to process reverse relationships from u.relationMapping }); diff --git a/utils.js b/utils.js index b3928b8..bc5b36f 100644 --- a/utils.js +++ b/utils.js @@ -41,7 +41,6 @@ const recognizeIsaType = function(propDef) { } const processArray = function(arrayProp) { - // SEE PROTOCOL, PROCESS console.log(`Processing array ${JSON.stringify(arrayProp[0])}`) const items = arrayProp[1].items if (items['$ref']) { @@ -83,7 +82,8 @@ const processAssociation = function(assocProp, from) { // for loop with a recursive call ? } else if (Object.keys(references).includes('type') && references.type === 'object'){ - // this is a nested reference + // this is a nested reference aka a reference to an object not contained in its own schema + // we need to create a new schema for that field that will end up in a separate file. } return {[assocProp[0]]: { type: from === 'array' ? 'to_many' : 'to_one', From 2a49ef6a3323280fb8ecfa9f3099ce46643ce89d Mon Sep 17 00:00:00 2001 From: Terazus Date: Wed, 1 Dec 2021 06:40:21 -0800 Subject: [PATCH 07/21] simplfied processAssociation input params --- utils.js | 51 +++++++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/utils.js b/utils.js index bc5b36f..fc756ea 100644 --- a/utils.js +++ b/utils.js @@ -14,19 +14,11 @@ const processProperties = function(propertiesObj, parentName) { let zendroAttributes = { model: PARENT, "storageType": "sql", attributes: {}, associations: {} } props.forEach(prop => { const propDef = prop[1]; - let def; - if (propDef.type === "array") { - def = processArray(prop); - Object.assign(zendroAttributes.associations, def) - } + if (propDef.type === "array") Object.assign(zendroAttributes.associations, processArray(prop)) else if (!propDef.type || propDef.type === "object") { - def = processAssociation(prop); - Object.assign(zendroAttributes.associations, def) - } - else { - def = processScalar(prop); - Object.assign(zendroAttributes.attributes, def) + Object.assign(zendroAttributes.associations, processAssociation(prop)) } + else Object.assign(zendroAttributes.attributes, processScalar(prop)) }); // Manually add an 'id' field: @@ -43,34 +35,25 @@ const recognizeIsaType = function(propDef) { const processArray = function(arrayProp) { console.log(`Processing array ${JSON.stringify(arrayProp[0])}`) const items = arrayProp[1].items - if (items['$ref']) { - // This is a reference to another schema. Most relationships will go through here. - console.log(`Found reference to another schema ${items['$ref']}`) - return processAssociation(arrayProp, 'array') - } - else if (items.types && items.types === 'object') { - // This is a reference to a nested object - console.log(`Found reference to another object ${items.type}`) - processAssociation(arrayProp, 'array') - } - else if (items['anyOf']) { - // This is a reference to multiples schemas or objects - console.log(`Found reference to multiple objects ${items['anyOf']}`) - processAssociation(arrayProp, 'array') - } - else { + if (items['$ref'] || (items.types && items.types === 'object') || (items['anyOf'])) { + console.log(`Found multiple references ${items['$ref']}`) + return processAssociation(arrayProp) + } else { // This is a scalar - console.log(`Found scalar ${items.type}`) + console.log(`Found multiple scalars ${items.type}`) return `[${recognizeIsaType(arrayProp)}]` } - // are you a scalar array? - // if scalar, you'll become a Zendro "array-field", e.g. "[String]" - // if object, you'll become a Zendro association } -const processAssociation = function(assocProp, from) { +const processAssociation = function(assocProp) { console.log(`Processing association ${JSON.stringify(assocProp[0])}`) - const references = 'items' in assocProp[1] ? assocProp[1].items : assocProp[1] + let to_many = false, + references; + if ('items' in assocProp[1]) { + to_many = true + references = assocProp[1].items + } + else references = assocProp[1] let schemaName = ""; if (Object.keys(references).includes('$ref')) { // there is a single reference to another schema @@ -86,7 +69,7 @@ const processAssociation = function(assocProp, from) { // we need to create a new schema for that field that will end up in a separate file. } return {[assocProp[0]]: { - type: from === 'array' ? 'to_many' : 'to_one', + type: to_many ? 'to_many' : 'to_one', target: schemaName, targetStorageType: "sql", targetKey: null, From 80413bfe7b65f9f8026dfdcdc7a849e3b69e8e1b Mon Sep 17 00:00:00 2001 From: Terazus Date: Wed, 1 Dec 2021 06:59:01 -0800 Subject: [PATCH 08/21] fixed scalars in assay --- test.js | 5 ++--- utils.js | 12 ++++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/test.js b/test.js index 6713e2c..f38c442 100644 --- a/test.js +++ b/test.js @@ -1,14 +1,13 @@ const fs = require('fs') const u = require('./utils.js') -let OUTPUT = {} - fs.readdir("./isa_1_0_core/", (err, files) => { + let output = {} files.forEach(file => { console.log(`PROCESSING FILE ${file}`) let schemaName = u.getSchemaName(file) let i = require(`./isa_1_0_core/${file}`) - OUTPUT[schemaName] = u.processProperties(i.properties, schemaName) + output[schemaName] = u.processProperties(i.properties, schemaName) }); // we now need to process reverse relationships from u.relationMapping }); diff --git a/utils.js b/utils.js index fc756ea..499236c 100644 --- a/utils.js +++ b/utils.js @@ -14,7 +14,11 @@ const processProperties = function(propertiesObj, parentName) { let zendroAttributes = { model: PARENT, "storageType": "sql", attributes: {}, associations: {} } props.forEach(prop => { const propDef = prop[1]; - if (propDef.type === "array") Object.assign(zendroAttributes.associations, processArray(prop)) + if (propDef.type === "array") { + const def = processArray(prop); + if (def[1] === 'objects') Object.assign(zendroAttributes.associations, def[0]) + else Object.assign(zendroAttributes.attributes, def[0]) + } else if (!propDef.type || propDef.type === "object") { Object.assign(zendroAttributes.associations, processAssociation(prop)) } @@ -37,11 +41,11 @@ const processArray = function(arrayProp) { const items = arrayProp[1].items if (items['$ref'] || (items.types && items.types === 'object') || (items['anyOf'])) { console.log(`Found multiple references ${items['$ref']}`) - return processAssociation(arrayProp) + return [processAssociation(arrayProp), 'objects'] } else { // This is a scalar console.log(`Found multiple scalars ${items.type}`) - return `[${recognizeIsaType(arrayProp)}]` + return [`[${recognizeIsaType(arrayProp)}]`, 'scalars'] } } @@ -61,7 +65,7 @@ const processAssociation = function(assocProp) { schemaName in relationMapping ? relationMapping[schemaName].push(PARENT) : relationMapping[schemaName] = [PARENT] } else if (Object.keys(references).includes('anyOf')) { - // there are multiple references (we don't use oneOf and allOf in ISA) + // there are multiple types and or references (we don't use oneOf and allOf in ISA) // for loop with a recursive call ? } else if (Object.keys(references).includes('type') && references.type === 'object'){ From e25ff38f15a16831a285d917c28ae247ce7a577a Mon Sep 17 00:00:00 2001 From: Terazus Date: Wed, 1 Dec 2021 07:18:19 -0800 Subject: [PATCH 09/21] made output local --- test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.js b/test.js index f38c442..d392171 100644 --- a/test.js +++ b/test.js @@ -5,8 +5,8 @@ fs.readdir("./isa_1_0_core/", (err, files) => { let output = {} files.forEach(file => { console.log(`PROCESSING FILE ${file}`) - let schemaName = u.getSchemaName(file) - let i = require(`./isa_1_0_core/${file}`) + const schemaName = u.getSchemaName(file), + i = require(`./isa_1_0_core/${file}`) output[schemaName] = u.processProperties(i.properties, schemaName) }); // we now need to process reverse relationships from u.relationMapping From b6b9f4acb06b964c07af8dbb7ecd5ca3d6df2d3c Mon Sep 17 00:00:00 2001 From: Terazus Date: Wed, 1 Dec 2021 07:19:00 -0800 Subject: [PATCH 10/21] simplified process association function --- utils.js | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/utils.js b/utils.js index 499236c..9721c1d 100644 --- a/utils.js +++ b/utils.js @@ -51,14 +51,9 @@ const processArray = function(arrayProp) { const processAssociation = function(assocProp) { console.log(`Processing association ${JSON.stringify(assocProp[0])}`) - let to_many = false, - references; - if ('items' in assocProp[1]) { - to_many = true - references = assocProp[1].items - } - else references = assocProp[1] - let schemaName = ""; + let to_many = 'items' in assocProp[1], + references = 'items' in assocProp[1] ? assocProp[1] : assocProp[1].items, + schemaName = ""; if (Object.keys(references).includes('$ref')) { // there is a single reference to another schema schemaName = getSchemaName(references['$ref']) @@ -72,14 +67,7 @@ const processAssociation = function(assocProp) { // this is a nested reference aka a reference to an object not contained in its own schema // we need to create a new schema for that field that will end up in a separate file. } - return {[assocProp[0]]: { - type: to_many ? 'to_many' : 'to_one', - target: schemaName, - targetStorageType: "sql", - targetKey: null, - keyIn: null, - label: null - }} + return {[assocProp[0]]: relationTemplate(to_many, schemaName)} } const processScalar = function(scalarProp) { @@ -93,6 +81,17 @@ const processScalar = function(scalarProp) { function getSchemaName(string) { return string.replace('_schema.json', '').replace("#", '')} +function relationTemplate(toMany, schemaName) { + return { + type: toMany ? 'to_many' : 'to_one', + target: schemaName, + targetStorageType: "sql", + targetKey: null, + keyIn: null, + label: null + } +} + module.exports = { processProperties, processArray, From e0de0011f236ee2fedd11d621072e2425bf99116 Mon Sep 17 00:00:00 2001 From: Terazus Date: Thu, 2 Dec 2021 05:42:34 -0800 Subject: [PATCH 11/21] fixed logic error in processAssociation --- utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.js b/utils.js index 9721c1d..f99e5da 100644 --- a/utils.js +++ b/utils.js @@ -52,7 +52,7 @@ const processArray = function(arrayProp) { const processAssociation = function(assocProp) { console.log(`Processing association ${JSON.stringify(assocProp[0])}`) let to_many = 'items' in assocProp[1], - references = 'items' in assocProp[1] ? assocProp[1] : assocProp[1].items, + references = 'items' in assocProp[1] ? assocProp[1].items : assocProp[1], schemaName = ""; if (Object.keys(references).includes('$ref')) { // there is a single reference to another schema From 544e07f2562785e7c28f626ce73a9f1e4bac1d76 Mon Sep 17 00:00:00 2001 From: coeit Date: Thu, 2 Dec 2021 16:37:33 +0100 Subject: [PATCH 12/21] wip: processAssociations Co-authored-by: Dominique Co-authored-by: Asis Hallab --- test.js | 21 +- test_out.txt | 1068 ++++++++++++++++++++++++++++++++++++++++++++++++++ utils.js | 128 +++--- 3 files changed, 1153 insertions(+), 64 deletions(-) create mode 100644 test_out.txt diff --git a/test.js b/test.js index d392171..f3221fe 100644 --- a/test.js +++ b/test.js @@ -1,13 +1,14 @@ -const fs = require('fs') -const u = require('./utils.js') +const fs = require("fs"); +const u = require("./utils.js"); fs.readdir("./isa_1_0_core/", (err, files) => { - let output = {} - files.forEach(file => { - console.log(`PROCESSING FILE ${file}`) - const schemaName = u.getSchemaName(file), - i = require(`./isa_1_0_core/${file}`) - output[schemaName] = u.processProperties(i.properties, schemaName) - }); - // we now need to process reverse relationships from u.relationMapping + let output = {}; + files.forEach((file) => { + console.log(`PROCESSING FILE ${file}`); + const schemaName = u.getSchemaName(file), + i = require(`./isa_1_0_core/${file}`); + output[schemaName] = u.processProperties(i.properties, schemaName); + }); + console.log(u.relationMapping); + // we now need to process reverse relationships from u.relationMapping }); diff --git a/test_out.txt b/test_out.txt new file mode 100644 index 0000000..81cad0d --- /dev/null +++ b/test_out.txt @@ -0,0 +1,1068 @@ +PROCESSING FILE assay_schema.json +Processing scalar @id +Processing scalar filename +{ filename: 'String' } +Processing association "measurementType" +Processing association "technologyType" +Processing scalar technologyPlatform +{ technologyPlatform: 'String' } +Processing array "dataFiles" +Found multiple references data_schema.json# +Processing association "dataFiles" +Processing association "materials" +Processing array "characteristicCategories" +Found multiple references material_attribute_schema.json# +Processing association "characteristicCategories" +Processing array "unitCategories" +Found multiple references ontology_annotation_schema.json# +Processing association "unitCategories" +Processing array "processSequence" +Found multiple references process_schema.json# +Processing association "processSequence" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- assay --- +{ + model: 'assay', + storageType: 'sql', + attributes: { filename: 'String', technologyPlatform: 'String', id: 'String' }, + associations: { + measurementType: { + type: 'to_one', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + technologyType: { + type: 'to_one', + target: '', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + dataFiles: { + type: 'to_many', + target: 'data', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + materials: { + type: 'to_one', + target: '', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + characteristicCategories: { + type: 'to_many', + target: 'material_attribute', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + unitCategories: { + type: 'to_many', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + processSequence: { + type: 'to_many', + target: 'process', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE comment_schema.json +Processing scalar @id +Processing scalar name +{ name: 'String' } +Processing scalar value +{ value: 'String' } +--- comment --- +{ + model: 'comment', + storageType: 'sql', + attributes: { name: 'String', value: 'String', id: 'String' }, + associations: {} +} +PROCESSING FILE data_schema.json +Processing scalar @id +Processing scalar name +{ name: 'String' } +Processing scalar type +{ type: 'String' } +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- data --- +{ + model: 'data', + storageType: 'sql', + attributes: { name: 'String', type: 'String', id: 'String' }, + associations: { + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE factor_schema.json +Processing scalar @id +Processing scalar factorName +{ factorName: 'String' } +Processing association "factorType" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- factor --- +{ + model: 'factor', + storageType: 'sql', + attributes: { factorName: 'String', id: 'String' }, + associations: { + factorType: { + type: 'to_one', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE factor_value_schema.json +Processing scalar @id +Processing association "category" +Processing association "value" +Processing association "unit" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- factor_value --- +{ + model: 'factor_value', + storageType: 'sql', + attributes: { id: 'String' }, + associations: { + category: { + type: 'to_one', + target: 'factor', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + value: { + type: 'to_one', + target: '', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + unit: { + type: 'to_one', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE investigation_schema.json +Processing scalar @id +Processing scalar filename +{ filename: 'String' } +Processing scalar identifier +{ identifier: 'String' } +Processing scalar title +{ title: 'String' } +Processing scalar description +{ description: 'String' } +Processing scalar submissionDate +{ submissionDate: 'DateTime' } +Processing scalar publicReleaseDate +{ publicReleaseDate: 'DateTime' } +Processing array "ontologySourceReferences" +Found multiple references ontology_source_reference_schema.json# +Processing association "ontologySourceReferences" +Processing array "publications" +Found multiple references publication_schema.json# +Processing association "publications" +Processing array "people" +Found multiple references person_schema.json# +Processing association "people" +Processing array "studies" +Found multiple references study_schema.json# +Processing association "studies" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- investigation --- +{ + model: 'investigation', + storageType: 'sql', + attributes: { + filename: 'String', + identifier: 'String', + title: 'String', + description: 'String', + submissionDate: 'DateTime', + publicReleaseDate: 'DateTime', + id: 'String' + }, + associations: { + ontologySourceReferences: { + type: 'to_many', + target: 'ontology_source_reference', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + publications: { + type: 'to_many', + target: 'publication', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + people: { + type: 'to_many', + target: 'person', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + studies: { + type: 'to_many', + target: 'study', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE material_attribute_schema.json +Processing scalar @id +Processing association "characteristicType" +--- material_attribute --- +{ + model: 'material_attribute', + storageType: 'sql', + attributes: { id: 'String' }, + associations: { + characteristicType: { + type: 'to_one', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE material_attribute_value_schema.json +Processing scalar @id +Processing association "category" +Processing association "value" +Processing association "unit" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- material_attribute_value --- +{ + model: 'material_attribute_value', + storageType: 'sql', + attributes: { id: 'String' }, + associations: { + category: { + type: 'to_one', + target: 'material_attribute', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + value: { + type: 'to_one', + target: '', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + unit: { + type: 'to_one', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE material_schema.json +Processing scalar @id +Processing scalar name +{ name: 'String' } +Processing scalar type +{ type: 'String' } +Processing array "characteristics" +Found multiple references material_attribute_value_schema.json# +Processing association "characteristics" +Processing array "derivesFrom" +Found multiple references material_schema.json# +Processing association "derivesFrom" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- material --- +{ + model: 'material', + storageType: 'sql', + attributes: { name: 'String', type: 'String', id: 'String' }, + associations: { + characteristics: { + type: 'to_many', + target: 'material_attribute_value', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + derivesFrom: { + type: 'to_many', + target: 'material', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE ontology_annotation_schema.json +Processing scalar @id +Processing association "annotationValue" +Processing scalar termSource +{ termSource: 'String' } +Processing scalar termAccession +{ termAccession: 'String' } +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- ontology_annotation --- +{ + model: 'ontology_annotation', + storageType: 'sql', + attributes: { termSource: 'String', termAccession: 'String', id: 'String' }, + associations: { + annotationValue: { + type: 'to_one', + target: '', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE ontology_source_reference_schema.json +Processing scalar description +{ description: 'String' } +Processing scalar file +{ file: 'String' } +Processing scalar name +{ name: 'String' } +Processing scalar version +{ version: 'String' } +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- ontology_source_reference --- +{ + model: 'ontology_source_reference', + storageType: 'sql', + attributes: { + description: 'String', + file: 'String', + name: 'String', + version: 'String', + id: 'String' + }, + associations: { + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE organization_schema.json +Processing scalar name +{ name: 'String' } +--- organization --- +{ + model: 'organization', + storageType: 'sql', + attributes: { name: 'String', id: 'String' }, + associations: {} +} +PROCESSING FILE person_schema.json +Processing scalar @id +Processing scalar lastName +{ lastName: 'String' } +Processing scalar firstName +{ firstName: 'String' } +Processing scalar midInitials +{ midInitials: 'String' } +Processing scalar email +{ email: 'String' } +Processing scalar phone +{ phone: 'String' } +Processing scalar fax +{ fax: 'String' } +Processing scalar address +{ address: 'String' } +Processing scalar affiliation +{ affiliation: 'String' } +Processing array "roles" +Found multiple references ontology_annotation_schema.json# +Processing association "roles" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- person --- +{ + model: 'person', + storageType: 'sql', + attributes: { + lastName: 'String', + firstName: 'String', + midInitials: 'String', + email: 'String', + phone: 'String', + fax: 'String', + address: 'String', + affiliation: 'String', + id: 'String' + }, + associations: { + roles: { + type: 'to_many', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE process_parameter_value_schema.json +Processing association "category" +Processing association "value" +Processing association "unit" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- process_parameter_value --- +{ + model: 'process_parameter_value', + storageType: 'sql', + attributes: { id: 'String' }, + associations: { + category: { + type: 'to_one', + target: 'protocol_parameter', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + value: { + type: 'to_one', + target: '', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + unit: { + type: 'to_one', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE process_schema.json +Processing scalar @id +Processing scalar name +{ name: 'String' } +Processing association "executesProtocol" +Processing array "parameterValues" +Found multiple references process_parameter_value_schema.json# +Processing association "parameterValues" +Processing scalar performer +{ performer: 'String' } +Processing scalar date +{ date: 'DateTime' } +Processing association "previousProcess" +Processing association "nextProcess" +Processing array "inputs" +Found multiple references undefined +Processing association "inputs" +Processing array "outputs" +Found multiple references undefined +Processing association "outputs" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- process --- +{ + model: 'process', + storageType: 'sql', + attributes: { + name: 'String', + performer: 'String', + date: 'DateTime', + id: 'String' + }, + associations: { + executesProtocol: { + type: 'to_one', + target: 'protocol', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + parameterValues: { + type: 'to_many', + target: 'process_parameter_value', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + previousProcess: { + type: 'to_one', + target: 'process', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + nextProcess: { + type: 'to_one', + target: 'process', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + inputs: { + type: 'to_many', + target: '', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + outputs: { + type: 'to_many', + target: '', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE protocol_parameter_schema.json +Processing scalar @id +Processing association "parameterName" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- protocol_parameter --- +{ + model: 'protocol_parameter', + storageType: 'sql', + attributes: { id: 'String' }, + associations: { + parameterName: { + type: 'to_one', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE protocol_schema.json +Processing scalar @id +Processing scalar name +{ name: 'String' } +Processing association "protocolType" +Processing scalar description +{ description: 'String' } +Processing scalar uri +{ uri: 'String' } +Processing scalar version +{ version: 'String' } +Processing array "parameters" +Found multiple references protocol_parameter_schema.json# +Processing association "parameters" +Processing array "components" +Found multiple scalars object +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- protocol --- +{ + model: 'protocol', + storageType: 'sql', + attributes: { + '0': '[', + '1': 'u', + '2': 'n', + '3': 'd', + '4': 'e', + '5': 'f', + '6': 'i', + '7': 'n', + '8': 'e', + '9': 'd', + '10': ']', + name: 'String', + description: 'String', + uri: 'String', + version: 'String', + id: 'String' + }, + associations: { + protocolType: { + type: 'to_one', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + parameters: { + type: 'to_many', + target: 'protocol_parameter', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE publication_schema.json +Processing scalar pubMedID +{ pubMedID: 'String' } +Processing scalar doi +{ doi: 'String' } +Processing scalar authorList +{ authorList: 'String' } +Processing scalar title +{ title: 'String' } +Processing association "status" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- publication --- +{ + model: 'publication', + storageType: 'sql', + attributes: { + pubMedID: 'String', + doi: 'String', + authorList: 'String', + title: 'String', + id: 'String' + }, + associations: { + status: { + type: 'to_one', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE sample_schema.json +Processing scalar @id +Processing scalar name +{ name: 'String' } +Processing array "characteristics" +Found multiple references material_attribute_value_schema.json# +Processing association "characteristics" +Processing array "factorValues" +Found multiple references factor_value_schema.json# +Processing association "factorValues" +Processing array "derivesFrom" +Found multiple references source_schema.json# +Processing association "derivesFrom" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- sample --- +{ + model: 'sample', + storageType: 'sql', + attributes: { name: 'String', id: 'String' }, + associations: { + characteristics: { + type: 'to_many', + target: 'material_attribute_value', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + factorValues: { + type: 'to_many', + target: 'factor_value', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + derivesFrom: { + type: 'to_many', + target: 'source', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE source_schema.json +Processing scalar @id +Processing scalar name +{ name: 'String' } +Processing array "characteristics" +Found multiple references material_attribute_value_schema.json# +Processing association "characteristics" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- source --- +{ + model: 'source', + storageType: 'sql', + attributes: { name: 'String', id: 'String' }, + associations: { + characteristics: { + type: 'to_many', + target: 'material_attribute_value', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} +PROCESSING FILE study_schema.json +Processing scalar @id +Processing scalar filename +{ filename: 'String' } +Processing scalar identifier +{ identifier: 'String' } +Processing scalar title +{ title: 'String' } +Processing scalar description +{ description: 'String' } +Processing scalar submissionDate +{ submissionDate: 'DateTime' } +Processing scalar publicReleaseDate +{ publicReleaseDate: 'DateTime' } +Processing array "publications" +Found multiple references publication_schema.json# +Processing association "publications" +Processing array "people" +Found multiple references person_schema.json# +Processing association "people" +Processing array "studyDesignDescriptors" +Found multiple references ontology_annotation_schema.json# +Processing association "studyDesignDescriptors" +Processing array "protocols" +Found multiple references protocol_schema.json# +Processing association "protocols" +Processing association "materials" +Processing array "processSequence" +Found multiple references process_schema.json# +Processing association "processSequence" +Processing array "assays" +Found multiple references assay_schema.json# +Processing association "assays" +Processing array "factors" +Found multiple references factor_schema.json# +Processing association "factors" +Processing array "characteristicCategories" +Found multiple references material_attribute_schema.json# +Processing association "characteristicCategories" +Processing array "unitCategories" +Found multiple references ontology_annotation_schema.json# +Processing association "unitCategories" +Processing array "comments" +Found multiple references comment_schema.json# +Processing association "comments" +--- study --- +{ + model: 'study', + storageType: 'sql', + attributes: { + filename: 'String', + identifier: 'String', + title: 'String', + description: 'String', + submissionDate: 'DateTime', + publicReleaseDate: 'DateTime', + id: 'String' + }, + associations: { + publications: { + type: 'to_many', + target: 'publication', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + people: { + type: 'to_many', + target: 'person', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + studyDesignDescriptors: { + type: 'to_many', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + protocols: { + type: 'to_many', + target: 'protocol', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + materials: { + type: 'to_one', + target: '', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + processSequence: { + type: 'to_many', + target: 'process', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + assays: { + type: 'to_many', + target: 'assay', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + factors: { + type: 'to_many', + target: 'factor', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + characteristicCategories: { + type: 'to_many', + target: 'material_attribute', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + unitCategories: { + type: 'to_many', + target: 'ontology_annotation', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + }, + comments: { + type: 'to_many', + target: 'comment', + targetStorageType: 'sql', + targetKey: null, + keyIn: null, + label: null + } + } +} diff --git a/utils.js b/utils.js index f99e5da..051062b 100644 --- a/utils.js +++ b/utils.js @@ -1,95 +1,115 @@ let PARENT; let relationMapping = {}; const mapIsaTypeToZendroType = { - "string": "String", + string: "String", "date-time": "DateTime", - "number": "Float", - "email": "String", - "uri": "String" -} + number: "Float", + email: "String", + uri: "String", +}; -const processProperties = function(propertiesObj, parentName) { +const processProperties = function (propertiesObj, parentName) { PARENT = getSchemaName(parentName); const props = Object.entries(propertiesObj); - let zendroAttributes = { model: PARENT, "storageType": "sql", attributes: {}, associations: {} } - props.forEach(prop => { + let zendroAttributes = { + model: PARENT, + storageType: "sql", + attributes: {}, + associations: {}, + }; + props.forEach((prop) => { const propDef = prop[1]; if (propDef.type === "array") { const def = processArray(prop); - if (def[1] === 'objects') Object.assign(zendroAttributes.associations, def[0]) - else Object.assign(zendroAttributes.attributes, def[0]) - } - else if (!propDef.type || propDef.type === "object") { - Object.assign(zendroAttributes.associations, processAssociation(prop)) - } - else Object.assign(zendroAttributes.attributes, processScalar(prop)) + if (def[1] === "objects") { + Object.assign(zendroAttributes.associations, def[0]); + } else Object.assign(zendroAttributes.attributes, def[0]); + } else if (!propDef.type || propDef.type === "object") { + let [associations, foreignKeys] = processAssociation(prop); + Object.assign(zendroAttributes.associations, associations); + Object.assign(zendroAttributes.attributes, { [foreignKeys]: "String" }); + } else Object.assign(zendroAttributes.attributes, processScalar(prop)); }); // Manually add an 'id' field: zendroAttributes.attributes["id"] = "String"; - console.log('--- ' + PARENT + ' ---') + console.log("--- " + PARENT + " ---"); console.log(zendroAttributes); return zendroAttributes; -} +}; -const recognizeIsaType = function(propDef) { - return !propDef.format ? mapIsaTypeToZendroType[propDef.type] : mapIsaTypeToZendroType[propDef.format] -} +const recognizeIsaType = function (propDef) { + return !propDef.format + ? mapIsaTypeToZendroType[propDef.type] + : mapIsaTypeToZendroType[propDef.format]; +}; -const processArray = function(arrayProp) { - console.log(`Processing array ${JSON.stringify(arrayProp[0])}`) - const items = arrayProp[1].items - if (items['$ref'] || (items.types && items.types === 'object') || (items['anyOf'])) { - console.log(`Found multiple references ${items['$ref']}`) - return [processAssociation(arrayProp), 'objects'] +const processArray = function (arrayProp) { + console.log(`Processing array ${JSON.stringify(arrayProp[0])}`); + const items = arrayProp[1].items; + if ( + items["$ref"] || + (items.types && items.types === "object") || + items["anyOf"] + ) { + console.log(`Found multiple references ${items["$ref"]}`); + return [processAssociation(arrayProp), "objects"]; } else { // This is a scalar - console.log(`Found multiple scalars ${items.type}`) - return [`[${recognizeIsaType(arrayProp)}]`, 'scalars'] + console.log(`Found multiple scalars ${items.type}`); + return [`[${recognizeIsaType(arrayProp)}]`, "scalars"]; } -} +}; -const processAssociation = function(assocProp) { - console.log(`Processing association ${JSON.stringify(assocProp[0])}`) - let to_many = 'items' in assocProp[1], - references = 'items' in assocProp[1] ? assocProp[1].items : assocProp[1], - schemaName = ""; - if (Object.keys(references).includes('$ref')) { +const processAssociation = function (assocProp) { + console.log(`Processing association ${JSON.stringify(assocProp[0])}`); + const to_many = "items" in assocProp[1], + references = "items" in assocProp[1] ? assocProp[1].items : assocProp[1], + schemaName = ""; + if (Object.keys(references).includes("$ref")) { // there is a single reference to another schema - schemaName = getSchemaName(references['$ref']) - schemaName in relationMapping ? relationMapping[schemaName].push(PARENT) : relationMapping[schemaName] = [PARENT] - } - else if (Object.keys(references).includes('anyOf')) { + schemaName = getSchemaName(references["$ref"]); + schemaName in relationMapping + ? relationMapping[schemaName].push(PARENT) + : (relationMapping[schemaName] = [PARENT]); + } else if (Object.keys(references).includes("anyOf")) { // there are multiple types and or references (we don't use oneOf and allOf in ISA) // for loop with a recursive call ? - } - else if (Object.keys(references).includes('type') && references.type === 'object'){ + } else if ( + Object.keys(references).includes("type") && + references.type === "object" + ) { // this is a nested reference aka a reference to an object not contained in its own schema // we need to create a new schema for that field that will end up in a separate file. } - return {[assocProp[0]]: relationTemplate(to_many, schemaName)} -} + const foreignKeyName = to_many ? "_ids" : "_id"; + return [ + { [assocProp[0]]: relationTemplate(to_many, schemaName) }, + foreignKeyName, + ]; +}; -const processScalar = function(scalarProp) { +const processScalar = function (scalarProp) { console.log(`Processing scalar ${scalarProp[0]}`); if (scalarProp[0] !== "@id") { - const result = { [scalarProp[0]]: recognizeIsaType(scalarProp[1]) } - console.log(result) - return result + const result = { [scalarProp[0]]: recognizeIsaType(scalarProp[1]) }; + console.log(result); + return result; } -} +}; -function getSchemaName(string) { return string.replace('_schema.json', '').replace("#", '')} +function getSchemaName(string) { + return string.replace("_schema.json", "").replace("#", ""); +} function relationTemplate(toMany, schemaName) { return { - type: toMany ? 'to_many' : 'to_one', + type: toMany ? "to_many" : "to_one", target: schemaName, targetStorageType: "sql", targetKey: null, keyIn: null, - label: null - } + }; } module.exports = { @@ -98,5 +118,5 @@ module.exports = { processAssociation, processScalar, getSchemaName, - relationMapping -} + relationMapping, +}; From fae9fdb6fd838f3af9a892f59a68213af8ae7bd6 Mon Sep 17 00:00:00 2001 From: coeit Date: Thu, 2 Dec 2021 17:55:32 +0100 Subject: [PATCH 13/21] chore: add notes --- notes.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 notes.md diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..6e880a7 --- /dev/null +++ b/notes.md @@ -0,0 +1,23 @@ +# TODO LIST: + +- in protocol schema manualy create the "components" relationship and the corresponding file. + +``` +component model +"properties": { + "componentName": { + "type": "string" + }, + "componentType": { + "$ref": "ontology_annotation_schema.json#" + }, + "comments" : { + "type": "array", + "items": { + "$ref": "comment_schema.json#" + } + } +} +``` + +- manually curate `x_to_many` relations From 29feda241480ba9b65e13942ce8233ab852801d6 Mon Sep 17 00:00:00 2001 From: coeit Date: Thu, 2 Dec 2021 17:56:00 +0100 Subject: [PATCH 14/21] feat: handle foreignKeys --- utils.js | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/utils.js b/utils.js index 051062b..ffc54ae 100644 --- a/utils.js +++ b/utils.js @@ -21,13 +21,16 @@ const processProperties = function (propertiesObj, parentName) { const propDef = prop[1]; if (propDef.type === "array") { const def = processArray(prop); - if (def[1] === "objects") { - Object.assign(zendroAttributes.associations, def[0]); - } else Object.assign(zendroAttributes.attributes, def[0]); + if (def && def[1] === "objects") { + Object.assign(zendroAttributes.associations, def[0][0]); + Object.assign(zendroAttributes.attributes, { + [prop[0] + "_fk"]: "[String]", + }); + } else if (def) Object.assign(zendroAttributes.attributes, def[0]); } else if (!propDef.type || propDef.type === "object") { - let [associations, foreignKeys] = processAssociation(prop); + let [associations, foreignKey] = processAssociation(prop); Object.assign(zendroAttributes.associations, associations); - Object.assign(zendroAttributes.attributes, { [foreignKeys]: "String" }); + Object.assign(zendroAttributes.attributes, { [foreignKey]: "[String]" }); } else Object.assign(zendroAttributes.attributes, processScalar(prop)); }); @@ -47,23 +50,20 @@ const recognizeIsaType = function (propDef) { const processArray = function (arrayProp) { console.log(`Processing array ${JSON.stringify(arrayProp[0])}`); const items = arrayProp[1].items; - if ( - items["$ref"] || - (items.types && items.types === "object") || - items["anyOf"] - ) { + if (items["$ref"] || items["anyOf"]) { console.log(`Found multiple references ${items["$ref"]}`); return [processAssociation(arrayProp), "objects"]; - } else { + } else if (!items.type) { // This is a scalar console.log(`Found multiple scalars ${items.type}`); return [`[${recognizeIsaType(arrayProp)}]`, "scalars"]; } + return null; }; const processAssociation = function (assocProp) { console.log(`Processing association ${JSON.stringify(assocProp[0])}`); - const to_many = "items" in assocProp[1], + let to_many = "items" in assocProp[1], references = "items" in assocProp[1] ? assocProp[1].items : assocProp[1], schemaName = ""; if (Object.keys(references).includes("$ref")) { @@ -75,14 +75,8 @@ const processAssociation = function (assocProp) { } else if (Object.keys(references).includes("anyOf")) { // there are multiple types and or references (we don't use oneOf and allOf in ISA) // for loop with a recursive call ? - } else if ( - Object.keys(references).includes("type") && - references.type === "object" - ) { - // this is a nested reference aka a reference to an object not contained in its own schema - // we need to create a new schema for that field that will end up in a separate file. } - const foreignKeyName = to_many ? "_ids" : "_id"; + const foreignKeyName = assocProp[0] + "_fk"; return [ { [assocProp[0]]: relationTemplate(to_many, schemaName) }, foreignKeyName, From 06799af317301772ec4a309ff1764bba5bc67daa Mon Sep 17 00:00:00 2001 From: "Dr. Asis Hallab" Date: Thu, 2 Dec 2021 11:19:39 -0600 Subject: [PATCH 15/21] Implemented habndling of 'anyOf' associations --- utils.js | 55 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/utils.js b/utils.js index 051062b..57ef84c 100644 --- a/utils.js +++ b/utils.js @@ -7,16 +7,17 @@ const mapIsaTypeToZendroType = { email: "String", uri: "String", }; +let zendroAttributes = { + model: PARENT, + storageType: "sql", + attributes: {}, + associations: {}, +}; const processProperties = function (propertiesObj, parentName) { PARENT = getSchemaName(parentName); + zendroAttributes.model = PARENT; const props = Object.entries(propertiesObj); - let zendroAttributes = { - model: PARENT, - storageType: "sql", - attributes: {}, - associations: {}, - }; props.forEach((prop) => { const propDef = prop[1]; if (propDef.type === "array") { @@ -63,7 +64,7 @@ const processArray = function (arrayProp) { const processAssociation = function (assocProp) { console.log(`Processing association ${JSON.stringify(assocProp[0])}`); - const to_many = "items" in assocProp[1], + let to_many = "items" in assocProp[1], references = "items" in assocProp[1] ? assocProp[1].items : assocProp[1], schemaName = ""; if (Object.keys(references).includes("$ref")) { @@ -73,8 +74,40 @@ const processAssociation = function (assocProp) { ? relationMapping[schemaName].push(PARENT) : (relationMapping[schemaName] = [PARENT]); } else if (Object.keys(references).includes("anyOf")) { + const no_refs = references.anyOf.every(element => Object.keys(element)[0] !== "$ref"); + console.log(`\n\nanyOf case for field '${assocProp[0]}' to_many? '${to_many}' no_refs? ${no_refs}:\n${JSON.stringify(references)}\n\n`); + if (no_refs) { + const attrType = to_many ? "[String]" : "String" + zendroAttributes.attributes[assocProp[0]] = attrType; + } else { + const refs = references.anyOf.filter(element => Object.keys(element)[0] === "$ref"); + let ref_assocs = refs.map(r => { + const target = getSchemaName(r["$ref"]); + const assocName = `${assocProp[0]}_${target}`; + const targetKey = `${target}_id`; + const keyIn = to_many ? zendroAttributes.model : target; + console.error(`keyIn: ${keyIn}`); + const assocDef = relationTemplate(to_many, target, targetKey, keyIn); + zendroAttributes.associations[assocName] = assocDef; + console.error(`anyOf - assoc '${assocName}':\n` + JSON.stringify(zendroAttributes.associations[assocName])); + // Add foreign-key if on the to-one end: + if (to_many) { + zendroAttributes.attributes[targetKey] = 'String'; + //console.error("anyOf - FK:\n" + JSON.stringify(zendroAttributes.attributes)); + } + }) + } + // assocPorps = {} + // How do I know, whether this is type array or not + //if (to_many) {} else {} + // skip non $ref, except when there is no $ref use a string // there are multiple types and or references (we don't use oneOf and allOf in ISA) // for loop with a recursive call ? + // For each entry in references we need one association, except no $ref + //return [ + // { [assocProp[0]]: relationTemplate(to_many, schemaName) }, + // foreignKeyName, + //]; } else if ( Object.keys(references).includes("type") && references.type === "object" @@ -102,13 +135,15 @@ function getSchemaName(string) { return string.replace("_schema.json", "").replace("#", ""); } -function relationTemplate(toMany, schemaName) { +function relationTemplate(toMany, schemaName, targetKey, keysIn) { return { type: toMany ? "to_many" : "to_one", target: schemaName, targetStorageType: "sql", - targetKey: null, - keyIn: null, + implementation: "foreignkeys", + reverseAssociation: "TO-DO", + targetKey, + keysIn }; } From 1b08fff0717f6f0d71125d7a7c6c772137726aaa Mon Sep 17 00:00:00 2001 From: Philippe Rocca-Serra Date: Mon, 6 Dec 2021 18:35:12 +0100 Subject: [PATCH 16/21] fixes by Dom --- utils.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/utils.js b/utils.js index 41aa44c..e62a961 100644 --- a/utils.js +++ b/utils.js @@ -30,8 +30,10 @@ const processProperties = function (propertiesObj, parentName) { } else if (def) Object.assign(zendroAttributes.attributes, def[0]); } else if (!propDef.type || propDef.type === "object") { let [associations, foreignKey] = processAssociation(prop); - Object.assign(zendroAttributes.associations, associations); - Object.assign(zendroAttributes.attributes, { [foreignKey]: "[String]" }); + if (associations && foreignKey) { + Object.assign(zendroAttributes.associations, associations); + Object.assign(zendroAttributes.attributes, { [foreignKey]: "[String]" }); + } } else Object.assign(zendroAttributes.attributes, processScalar(prop)); }); @@ -68,7 +70,7 @@ const processAssociation = function (assocProp) { let to_many = "items" in assocProp[1], references = "items" in assocProp[1] ? assocProp[1].items : assocProp[1], schemaName = ""; - const keyIn = to_many ? zendroAttributes.model : target; + if (Object.keys(references).includes("$ref")) { // there is a single reference to another schema schemaName = getSchemaName(references["$ref"]); @@ -90,6 +92,7 @@ const processAssociation = function (assocProp) { const refs = references.anyOf.filter(element => Object.keys(element)[0] === "$ref"); let ref_assocs = refs.map(r => { const target = getSchemaName(r["$ref"]); + const keyIn = to_many ? zendroAttributes.model : target; const assocName = `${assocProp[0]}_${target}`; const targetKey = `${target}_id`; console.error(`keyIn: ${keyIn}`); @@ -99,7 +102,7 @@ const processAssociation = function (assocProp) { // Add foreign-key if on the to-one end: if (to_many) { zendroAttributes.attributes[targetKey] = 'String'; - //console.error("anyOf - FK:\n" + JSON.stringify(zendroAttributes.attributes)); + //console.error("anyOf - FK:\n" + JSON.stringify(zendroAttributes.attributes)) } }) } @@ -110,6 +113,7 @@ const processAssociation = function (assocProp) { // there are multiple types and or references (we don't use oneOf and allOf in ISA) // for loop with a recursive call ? } + return [null, null] }; const processScalar = function (scalarProp) { From 4be329012630db3f9dda4b8fcb1da34b8fa200b5 Mon Sep 17 00:00:00 2001 From: Terazus Date: Tue, 7 Dec 2021 04:39:43 -0800 Subject: [PATCH 17/21] Added a VERBOSE variable for controlling console output --- utils.js => src/utils.js | 36 +++++++++++++++++++++++++----------- test.js | 11 ++++++----- 2 files changed, 31 insertions(+), 16 deletions(-) rename utils.js => src/utils.js (83%) diff --git a/utils.js b/src/utils.js similarity index 83% rename from utils.js rename to src/utils.js index e62a961..6f5c31d 100644 --- a/utils.js +++ b/src/utils.js @@ -13,6 +13,7 @@ let zendroAttributes = { attributes: {}, associations: {}, }; +let VERBOSE = true; const processProperties = function (propertiesObj, parentName) { PARENT = getSchemaName(parentName); @@ -39,8 +40,8 @@ const processProperties = function (propertiesObj, parentName) { // Manually add an 'id' field: zendroAttributes.attributes["id"] = "String"; - console.log("--- " + PARENT + " ---"); - console.log(zendroAttributes); + if (VERBOSE) console.log("--- " + PARENT + " ---"); + if (VERBOSE) console.log(zendroAttributes); return zendroAttributes; }; @@ -51,22 +52,22 @@ const recognizeIsaType = function (propDef) { }; const processArray = function (arrayProp) { - console.log(`Processing array ${JSON.stringify(arrayProp[0])}`); + if (VERBOSE) console.log(`Processing array ${JSON.stringify(arrayProp[0])}`); const items = arrayProp[1].items; // TODO handle 'anyOf' separately if (items["$ref"] || items["anyOf"]) { - console.log(`Found multiple references ${items["$ref"]}`); + if (VERBOSE) console.log(`Found multiple references ${items["$ref"]}`); return [processAssociation(arrayProp), "objects"]; } else if (!items.type) { // This is a scalar - console.log(`Found multiple scalars ${items.type}`); + if (VERBOSE) console.log(`Found multiple scalars ${items.type}`); return [`[${recognizeIsaType(arrayProp)}]`, "scalars"]; } return null; }; const processAssociation = function (assocProp) { - console.log(`Processing association ${JSON.stringify(assocProp[0])}`); + if (VERBOSE) console.log(`Processing association ${JSON.stringify(assocProp[0])}`); let to_many = "items" in assocProp[1], references = "items" in assocProp[1] ? assocProp[1].items : assocProp[1], schemaName = ""; @@ -82,8 +83,11 @@ const processAssociation = function (assocProp) { { [assocProp[0]]: relationTemplate(to_many, schemaName, "To-Do-Key", "To-Do-keyIn") }, foreignKeyName, ]; - } else if (Object.keys(references).includes("anyOf")) { - const no_refs = references.anyOf.every(element => Object.keys(element)[0] !== "$ref"); + } + + else if (Object.keys(references).includes("anyOf")) { + processAnyOf(assocProp); + /*const no_refs = references.anyOf.every(element => Object.keys(element)[0] !== "$ref"); console.log(`\n\nanyOf case for field '${assocProp[0]}' to_many? '${to_many}' no_refs? ${no_refs}:\n${JSON.stringify(references)}\n\n`); if (no_refs) { const attrType = to_many ? "[String]" : "String" @@ -111,16 +115,21 @@ const processAssociation = function (assocProp) { //if (to_many) {} else {} // skip non $ref, except when there is no $ref use a string // there are multiple types and or references (we don't use oneOf and allOf in ISA) - // for loop with a recursive call ? + // for loop with a recursive call ?*/ } return [null, null] }; +function processAnyOf(anyOfProp) { + console.log(`Processing anyOf ${JSON.stringify(anyOfProp)}`); + // TODO +} + const processScalar = function (scalarProp) { - console.log(`Processing scalar ${scalarProp[0]}`); + if (VERBOSE) console.log(`Processing scalar ${scalarProp[0]}`); if (scalarProp[0] !== "@id") { const result = { [scalarProp[0]]: recognizeIsaType(scalarProp[1]) }; - console.log(result); + if (VERBOSE) console.log(result); return result; } }; @@ -141,6 +150,10 @@ function relationTemplate(toMany, schemaName, targetKey, keysIn) { }; } +function setVerbose(bool) { + VERBOSE = bool; +} + module.exports = { processProperties, processArray, @@ -148,4 +161,5 @@ module.exports = { processScalar, getSchemaName, relationMapping, + setVerbose }; diff --git a/test.js b/test.js index f3221fe..61795ff 100644 --- a/test.js +++ b/test.js @@ -1,14 +1,15 @@ const fs = require("fs"); -const u = require("./utils.js"); +const utils = require("./src/utils.js"); fs.readdir("./isa_1_0_core/", (err, files) => { let output = {}; + utils.setVerbose(false) files.forEach((file) => { - console.log(`PROCESSING FILE ${file}`); - const schemaName = u.getSchemaName(file), + // console.log(`PROCESSING FILE ${file}`); + const schemaName = utils.getSchemaName(file), i = require(`./isa_1_0_core/${file}`); - output[schemaName] = u.processProperties(i.properties, schemaName); + output[schemaName] = utils.processProperties(i.properties, schemaName); }); - console.log(u.relationMapping); + // console.log(utils.relationMapping); // we now need to process reverse relationships from u.relationMapping }); From af1b7b6c1e834362fb66a68fe9549b5ae4bb80ad Mon Sep 17 00:00:00 2001 From: Terazus Date: Tue, 7 Dec 2021 06:23:36 -0800 Subject: [PATCH 18/21] refactored and output the code, including process inputs/outputs and reverseRelations --- package.json | 5 +- src/index.js | 37 + .../isa_1_0_core}/assay_schema.json | 0 .../isa_1_0_core}/comment_schema.json | 0 .../isa_1_0_core}/data_schema.json | 0 .../isa_1_0_core}/factor_schema.json | 0 .../isa_1_0_core}/factor_value_schema.json | 0 .../isa_1_0_core}/investigation_schema.json | 0 .../material_attribute_schema.json | 0 .../material_attribute_value_schema.json | 0 .../isa_1_0_core}/material_schema.json | 0 .../ontology_annotation_schema.json | 0 .../ontology_source_reference_schema.json | 0 .../isa_1_0_core}/organization_schema.json | 0 .../isa_1_0_core}/person_schema.json | 0 .../process_parameter_value_schema.json | 0 .../isa_1_0_core}/process_schema.json | 0 .../protocol_parameter_schema.json | 0 .../isa_1_0_core}/protocol_schema.json | 0 .../isa_1_0_core}/publication_schema.json | 0 .../isa_1_0_core}/sample_schema.json | 0 .../isa_1_0_core}/source_schema.json | 0 .../isa_1_0_core}/study_schema.json | 0 src/output/assay.json | 73 ++ src/output/comment.json | 75 ++ src/output/data.json | 76 ++ src/output/factor.json | 87 ++ src/output/factor_value.json | 117 ++ src/output/investigation.json | 162 +++ src/output/material.json | 192 +++ src/output/material_attribute.json | 172 +++ src/output/material_attribute_value.json | 172 +++ src/output/ontology_annotation.json | 195 +++ src/output/ontology_source_reference.json | 197 +++ src/output/organization.json | 197 +++ src/output/person.json | 215 ++++ src/output/process.json | 327 +++++ src/output/process_parameter_value.json | 215 ++++ src/output/protocol.json | 358 ++++++ src/output/protocol_parameter.json | 337 ++++++ src/output/publication.json | 371 ++++++ src/output/reverseRelations.json | 109 ++ src/output/sample.json | 381 ++++++ src/output/source.json | 381 ++++++ src/output/study.json | 421 +++++++ src/utils.js | 115 +- test.js | 15 - test_out.txt | 1068 ----------------- 48 files changed, 4961 insertions(+), 1109 deletions(-) create mode 100644 src/index.js rename {isa_1_0_core => src/isa_1_0_core}/assay_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/comment_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/data_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/factor_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/factor_value_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/investigation_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/material_attribute_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/material_attribute_value_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/material_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/ontology_annotation_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/ontology_source_reference_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/organization_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/person_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/process_parameter_value_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/process_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/protocol_parameter_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/protocol_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/publication_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/sample_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/source_schema.json (100%) rename {isa_1_0_core => src/isa_1_0_core}/study_schema.json (100%) create mode 100644 src/output/assay.json create mode 100644 src/output/comment.json create mode 100644 src/output/data.json create mode 100644 src/output/factor.json create mode 100644 src/output/factor_value.json create mode 100644 src/output/investigation.json create mode 100644 src/output/material.json create mode 100644 src/output/material_attribute.json create mode 100644 src/output/material_attribute_value.json create mode 100644 src/output/ontology_annotation.json create mode 100644 src/output/ontology_source_reference.json create mode 100644 src/output/organization.json create mode 100644 src/output/person.json create mode 100644 src/output/process.json create mode 100644 src/output/process_parameter_value.json create mode 100644 src/output/protocol.json create mode 100644 src/output/protocol_parameter.json create mode 100644 src/output/publication.json create mode 100644 src/output/reverseRelations.json create mode 100644 src/output/sample.json create mode 100644 src/output/source.json create mode 100644 src/output/study.json delete mode 100644 test.js delete mode 100644 test_out.txt diff --git a/package.json b/package.json index 6819600..8e11a4b 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,9 @@ "eslint": "^6.7.2" }, "scripts": { - "lint": "eslint utils.js" + "lint": "eslint utils.js", + "exec:silent": "node src/index.js", + "exec": "node src/index.js", + "exec:verbose": "node src/index.js mode=verbose" } } diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..45095e3 --- /dev/null +++ b/src/index.js @@ -0,0 +1,37 @@ +const fs = require("fs"); +const utils = require("./utils.js"); + +if (require.main === module) { + const params = parseParams(); + if (params.verbose) utils.setVerbose(true) + else utils.setVerbose(false) + fs.readdir("./src/isa_1_0_core/", (err, files) => { + let output = {}; + files.forEach((file) => { + // console.log(`PROCESSING FILE ${file}`); + const schemaName = utils.getSchemaName(file), + i = require(`./isa_1_0_core/${file}`); + output[schemaName] = utils.processProperties(i.properties, schemaName); + utils.writeToFile({ + name: schemaName, + value: output[schemaName] + }) + }); + utils.writeToFile({ + name: "reverseRelations", + value: utils.relationMapping + }) + }); +} + +function parseParams() { + const args = process.argv.slice(2); + let params = { + verbose: false + } + args.forEach((arg) => { + const split = arg.split("="); + if (split[0] === "mode" && split[1] === "verbose") params.verbose = true + }); + return params; +} diff --git a/isa_1_0_core/assay_schema.json b/src/isa_1_0_core/assay_schema.json similarity index 100% rename from isa_1_0_core/assay_schema.json rename to src/isa_1_0_core/assay_schema.json diff --git a/isa_1_0_core/comment_schema.json b/src/isa_1_0_core/comment_schema.json similarity index 100% rename from isa_1_0_core/comment_schema.json rename to src/isa_1_0_core/comment_schema.json diff --git a/isa_1_0_core/data_schema.json b/src/isa_1_0_core/data_schema.json similarity index 100% rename from isa_1_0_core/data_schema.json rename to src/isa_1_0_core/data_schema.json diff --git a/isa_1_0_core/factor_schema.json b/src/isa_1_0_core/factor_schema.json similarity index 100% rename from isa_1_0_core/factor_schema.json rename to src/isa_1_0_core/factor_schema.json diff --git a/isa_1_0_core/factor_value_schema.json b/src/isa_1_0_core/factor_value_schema.json similarity index 100% rename from isa_1_0_core/factor_value_schema.json rename to src/isa_1_0_core/factor_value_schema.json diff --git a/isa_1_0_core/investigation_schema.json b/src/isa_1_0_core/investigation_schema.json similarity index 100% rename from isa_1_0_core/investigation_schema.json rename to src/isa_1_0_core/investigation_schema.json diff --git a/isa_1_0_core/material_attribute_schema.json b/src/isa_1_0_core/material_attribute_schema.json similarity index 100% rename from isa_1_0_core/material_attribute_schema.json rename to src/isa_1_0_core/material_attribute_schema.json diff --git a/isa_1_0_core/material_attribute_value_schema.json b/src/isa_1_0_core/material_attribute_value_schema.json similarity index 100% rename from isa_1_0_core/material_attribute_value_schema.json rename to src/isa_1_0_core/material_attribute_value_schema.json diff --git a/isa_1_0_core/material_schema.json b/src/isa_1_0_core/material_schema.json similarity index 100% rename from isa_1_0_core/material_schema.json rename to src/isa_1_0_core/material_schema.json diff --git a/isa_1_0_core/ontology_annotation_schema.json b/src/isa_1_0_core/ontology_annotation_schema.json similarity index 100% rename from isa_1_0_core/ontology_annotation_schema.json rename to src/isa_1_0_core/ontology_annotation_schema.json diff --git a/isa_1_0_core/ontology_source_reference_schema.json b/src/isa_1_0_core/ontology_source_reference_schema.json similarity index 100% rename from isa_1_0_core/ontology_source_reference_schema.json rename to src/isa_1_0_core/ontology_source_reference_schema.json diff --git a/isa_1_0_core/organization_schema.json b/src/isa_1_0_core/organization_schema.json similarity index 100% rename from isa_1_0_core/organization_schema.json rename to src/isa_1_0_core/organization_schema.json diff --git a/isa_1_0_core/person_schema.json b/src/isa_1_0_core/person_schema.json similarity index 100% rename from isa_1_0_core/person_schema.json rename to src/isa_1_0_core/person_schema.json diff --git a/isa_1_0_core/process_parameter_value_schema.json b/src/isa_1_0_core/process_parameter_value_schema.json similarity index 100% rename from isa_1_0_core/process_parameter_value_schema.json rename to src/isa_1_0_core/process_parameter_value_schema.json diff --git a/isa_1_0_core/process_schema.json b/src/isa_1_0_core/process_schema.json similarity index 100% rename from isa_1_0_core/process_schema.json rename to src/isa_1_0_core/process_schema.json diff --git a/isa_1_0_core/protocol_parameter_schema.json b/src/isa_1_0_core/protocol_parameter_schema.json similarity index 100% rename from isa_1_0_core/protocol_parameter_schema.json rename to src/isa_1_0_core/protocol_parameter_schema.json diff --git a/isa_1_0_core/protocol_schema.json b/src/isa_1_0_core/protocol_schema.json similarity index 100% rename from isa_1_0_core/protocol_schema.json rename to src/isa_1_0_core/protocol_schema.json diff --git a/isa_1_0_core/publication_schema.json b/src/isa_1_0_core/publication_schema.json similarity index 100% rename from isa_1_0_core/publication_schema.json rename to src/isa_1_0_core/publication_schema.json diff --git a/isa_1_0_core/sample_schema.json b/src/isa_1_0_core/sample_schema.json similarity index 100% rename from isa_1_0_core/sample_schema.json rename to src/isa_1_0_core/sample_schema.json diff --git a/isa_1_0_core/source_schema.json b/src/isa_1_0_core/source_schema.json similarity index 100% rename from isa_1_0_core/source_schema.json rename to src/isa_1_0_core/source_schema.json diff --git a/isa_1_0_core/study_schema.json b/src/isa_1_0_core/study_schema.json similarity index 100% rename from isa_1_0_core/study_schema.json rename to src/isa_1_0_core/study_schema.json diff --git a/src/output/assay.json b/src/output/assay.json new file mode 100644 index 0000000..462e845 --- /dev/null +++ b/src/output/assay.json @@ -0,0 +1,73 @@ +{ + "model": "assay", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/comment.json b/src/output/comment.json new file mode 100644 index 0000000..7bfd1aa --- /dev/null +++ b/src/output/comment.json @@ -0,0 +1,75 @@ +{ + "model": "comment", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/data.json b/src/output/data.json new file mode 100644 index 0000000..e381820 --- /dev/null +++ b/src/output/data.json @@ -0,0 +1,76 @@ +{ + "model": "data", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/factor.json b/src/output/factor.json new file mode 100644 index 0000000..fc52109 --- /dev/null +++ b/src/output/factor.json @@ -0,0 +1,87 @@ +{ + "model": "factor", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/factor_value.json b/src/output/factor_value.json new file mode 100644 index 0000000..9637197 --- /dev/null +++ b/src/output/factor_value.json @@ -0,0 +1,117 @@ +{ + "model": "factor_value", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "factor", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/investigation.json b/src/output/investigation.json new file mode 100644 index 0000000..b348849 --- /dev/null +++ b/src/output/investigation.json @@ -0,0 +1,162 @@ +{ + "model": "investigation", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "factor", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/material.json b/src/output/material.json new file mode 100644 index 0000000..f9ed241 --- /dev/null +++ b/src/output/material.json @@ -0,0 +1,192 @@ +{ + "model": "material", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/material_attribute.json b/src/output/material_attribute.json new file mode 100644 index 0000000..e755523 --- /dev/null +++ b/src/output/material_attribute.json @@ -0,0 +1,172 @@ +{ + "model": "material_attribute", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "factor", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/material_attribute_value.json b/src/output/material_attribute_value.json new file mode 100644 index 0000000..5f43a16 --- /dev/null +++ b/src/output/material_attribute_value.json @@ -0,0 +1,172 @@ +{ + "model": "material_attribute_value", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/ontology_annotation.json b/src/output/ontology_annotation.json new file mode 100644 index 0000000..58f9887 --- /dev/null +++ b/src/output/ontology_annotation.json @@ -0,0 +1,195 @@ +{ + "model": "ontology_annotation", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/ontology_source_reference.json b/src/output/ontology_source_reference.json new file mode 100644 index 0000000..098141a --- /dev/null +++ b/src/output/ontology_source_reference.json @@ -0,0 +1,197 @@ +{ + "model": "ontology_source_reference", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/organization.json b/src/output/organization.json new file mode 100644 index 0000000..0b2257a --- /dev/null +++ b/src/output/organization.json @@ -0,0 +1,197 @@ +{ + "model": "organization", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/person.json b/src/output/person.json new file mode 100644 index 0000000..af1dd79 --- /dev/null +++ b/src/output/person.json @@ -0,0 +1,215 @@ +{ + "model": "person", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String", + "lastName": "String", + "firstName": "String", + "midInitials": "String", + "email": "String", + "phone": "String", + "fax": "String", + "address": "String", + "affiliation": "String", + "roles_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "roles": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/process.json b/src/output/process.json new file mode 100644 index 0000000..6fa9760 --- /dev/null +++ b/src/output/process.json @@ -0,0 +1,327 @@ +{ + "model": "process", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String", + "lastName": "String", + "firstName": "String", + "midInitials": "String", + "email": "String", + "phone": "String", + "fax": "String", + "address": "String", + "affiliation": "String", + "roles_fk": "[String]", + "executesProtocol_fk": "[String]", + "parameterValues_fk": "[String]", + "performer": "String", + "date": "DateTime", + "previousProcess_fk": "[String]", + "nextProcess_fk": "[String]", + "inputs_source_fk": "[String]", + "inputs_sample_fk": "[String]", + "inputs_data_fk": "[String]", + "inputs_material_fk": "[String]", + "outputs_sample_fk": "[String]", + "outputs_data_fk": "[String]", + "outputs_material_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "roles": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "executesProtocol": { + "type": "to_one", + "target": "protocol", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameterValues": { + "type": "to_many", + "target": "process_parameter_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "previousProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "nextProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "inputs_source": { + "type": "to_one", + "target": "source", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "source_id", + "keysIn": "source" + }, + "inputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "inputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "inputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "outputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "outputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "outputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + } + } +} \ No newline at end of file diff --git a/src/output/process_parameter_value.json b/src/output/process_parameter_value.json new file mode 100644 index 0000000..80f4c16 --- /dev/null +++ b/src/output/process_parameter_value.json @@ -0,0 +1,215 @@ +{ + "model": "process_parameter_value", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String", + "lastName": "String", + "firstName": "String", + "midInitials": "String", + "email": "String", + "phone": "String", + "fax": "String", + "address": "String", + "affiliation": "String", + "roles_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "roles": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/protocol.json b/src/output/protocol.json new file mode 100644 index 0000000..c8f24b8 --- /dev/null +++ b/src/output/protocol.json @@ -0,0 +1,358 @@ +{ + "model": "protocol", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String", + "lastName": "String", + "firstName": "String", + "midInitials": "String", + "email": "String", + "phone": "String", + "fax": "String", + "address": "String", + "affiliation": "String", + "roles_fk": "[String]", + "executesProtocol_fk": "[String]", + "parameterValues_fk": "[String]", + "performer": "String", + "date": "DateTime", + "previousProcess_fk": "[String]", + "nextProcess_fk": "[String]", + "inputs_source_fk": "[String]", + "inputs_sample_fk": "[String]", + "inputs_data_fk": "[String]", + "inputs_material_fk": "[String]", + "outputs_sample_fk": "[String]", + "outputs_data_fk": "[String]", + "outputs_material_fk": "[String]", + "parameterName_fk": "[String]", + "protocolType_fk": "[String]", + "uri": "String", + "parameters_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "roles": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "executesProtocol": { + "type": "to_one", + "target": "protocol", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameterValues": { + "type": "to_many", + "target": "process_parameter_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "previousProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "nextProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "inputs_source": { + "type": "to_one", + "target": "source", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "source_id", + "keysIn": "source" + }, + "inputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "inputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "inputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "outputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "outputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "outputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "parameterName": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "protocolType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameters": { + "type": "to_many", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/protocol_parameter.json b/src/output/protocol_parameter.json new file mode 100644 index 0000000..dd3da4f --- /dev/null +++ b/src/output/protocol_parameter.json @@ -0,0 +1,337 @@ +{ + "model": "protocol_parameter", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String", + "lastName": "String", + "firstName": "String", + "midInitials": "String", + "email": "String", + "phone": "String", + "fax": "String", + "address": "String", + "affiliation": "String", + "roles_fk": "[String]", + "executesProtocol_fk": "[String]", + "parameterValues_fk": "[String]", + "performer": "String", + "date": "DateTime", + "previousProcess_fk": "[String]", + "nextProcess_fk": "[String]", + "inputs_source_fk": "[String]", + "inputs_sample_fk": "[String]", + "inputs_data_fk": "[String]", + "inputs_material_fk": "[String]", + "outputs_sample_fk": "[String]", + "outputs_data_fk": "[String]", + "outputs_material_fk": "[String]", + "parameterName_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "roles": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "executesProtocol": { + "type": "to_one", + "target": "protocol", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameterValues": { + "type": "to_many", + "target": "process_parameter_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "previousProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "nextProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "inputs_source": { + "type": "to_one", + "target": "source", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "source_id", + "keysIn": "source" + }, + "inputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "inputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "inputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "outputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "outputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "outputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "parameterName": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/publication.json b/src/output/publication.json new file mode 100644 index 0000000..d28ebaa --- /dev/null +++ b/src/output/publication.json @@ -0,0 +1,371 @@ +{ + "model": "publication", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String", + "lastName": "String", + "firstName": "String", + "midInitials": "String", + "email": "String", + "phone": "String", + "fax": "String", + "address": "String", + "affiliation": "String", + "roles_fk": "[String]", + "executesProtocol_fk": "[String]", + "parameterValues_fk": "[String]", + "performer": "String", + "date": "DateTime", + "previousProcess_fk": "[String]", + "nextProcess_fk": "[String]", + "inputs_source_fk": "[String]", + "inputs_sample_fk": "[String]", + "inputs_data_fk": "[String]", + "inputs_material_fk": "[String]", + "outputs_sample_fk": "[String]", + "outputs_data_fk": "[String]", + "outputs_material_fk": "[String]", + "parameterName_fk": "[String]", + "protocolType_fk": "[String]", + "uri": "String", + "parameters_fk": "[String]", + "pubMedID": "String", + "doi": "String", + "authorList": "String", + "status_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "roles": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "executesProtocol": { + "type": "to_one", + "target": "protocol", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameterValues": { + "type": "to_many", + "target": "process_parameter_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "previousProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "nextProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "inputs_source": { + "type": "to_one", + "target": "source", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "source_id", + "keysIn": "source" + }, + "inputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "inputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "inputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "outputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "outputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "outputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "parameterName": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "protocolType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameters": { + "type": "to_many", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "status": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/reverseRelations.json b/src/output/reverseRelations.json new file mode 100644 index 0000000..ff3a76b --- /dev/null +++ b/src/output/reverseRelations.json @@ -0,0 +1,109 @@ +{ + "ontology_annotation": [ + "assay", + "assay", + "factor", + "factor_value", + "factor_value", + "material_attribute", + "material_attribute_value", + "material_attribute_value", + "person", + "process_parameter_value", + "process_parameter_value", + "protocol_parameter", + "protocol", + "publication", + "study", + "study" + ], + "data": [ + "assay", + "process", + "process" + ], + "material_attribute": [ + "assay", + "material_attribute_value", + "study" + ], + "process": [ + "assay", + "process", + "process", + "study" + ], + "comment": [ + "assay", + "data", + "factor", + "factor_value", + "investigation", + "material_attribute_value", + "material", + "ontology_annotation", + "ontology_source_reference", + "person", + "process_parameter_value", + "process", + "protocol_parameter", + "protocol", + "publication", + "sample", + "source", + "study" + ], + "factor": [ + "factor_value", + "study" + ], + "ontology_source_reference": [ + "investigation" + ], + "publication": [ + "investigation", + "study" + ], + "person": [ + "investigation", + "study" + ], + "study": [ + "investigation" + ], + "material_attribute_value": [ + "material", + "sample", + "source" + ], + "material": [ + "material", + "process", + "process" + ], + "protocol_parameter": [ + "process_parameter_value", + "protocol" + ], + "protocol": [ + "process", + "study" + ], + "process_parameter_value": [ + "process" + ], + "source": [ + "process", + "sample" + ], + "sample": [ + "process", + "process" + ], + "factor_value": [ + "sample" + ], + "assay": [ + "study" + ] +} \ No newline at end of file diff --git a/src/output/sample.json b/src/output/sample.json new file mode 100644 index 0000000..8ec0fed --- /dev/null +++ b/src/output/sample.json @@ -0,0 +1,381 @@ +{ + "model": "sample", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String", + "lastName": "String", + "firstName": "String", + "midInitials": "String", + "email": "String", + "phone": "String", + "fax": "String", + "address": "String", + "affiliation": "String", + "roles_fk": "[String]", + "executesProtocol_fk": "[String]", + "parameterValues_fk": "[String]", + "performer": "String", + "date": "DateTime", + "previousProcess_fk": "[String]", + "nextProcess_fk": "[String]", + "inputs_source_fk": "[String]", + "inputs_sample_fk": "[String]", + "inputs_data_fk": "[String]", + "inputs_material_fk": "[String]", + "outputs_sample_fk": "[String]", + "outputs_data_fk": "[String]", + "outputs_material_fk": "[String]", + "parameterName_fk": "[String]", + "protocolType_fk": "[String]", + "uri": "String", + "parameters_fk": "[String]", + "pubMedID": "String", + "doi": "String", + "authorList": "String", + "status_fk": "[String]", + "factorValues_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "source", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "roles": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "executesProtocol": { + "type": "to_one", + "target": "protocol", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameterValues": { + "type": "to_many", + "target": "process_parameter_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "previousProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "nextProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "inputs_source": { + "type": "to_one", + "target": "source", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "source_id", + "keysIn": "source" + }, + "inputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "inputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "inputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "outputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "outputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "outputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "parameterName": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "protocolType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameters": { + "type": "to_many", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "status": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorValues": { + "type": "to_many", + "target": "factor_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/source.json b/src/output/source.json new file mode 100644 index 0000000..19f05ad --- /dev/null +++ b/src/output/source.json @@ -0,0 +1,381 @@ +{ + "model": "source", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String", + "lastName": "String", + "firstName": "String", + "midInitials": "String", + "email": "String", + "phone": "String", + "fax": "String", + "address": "String", + "affiliation": "String", + "roles_fk": "[String]", + "executesProtocol_fk": "[String]", + "parameterValues_fk": "[String]", + "performer": "String", + "date": "DateTime", + "previousProcess_fk": "[String]", + "nextProcess_fk": "[String]", + "inputs_source_fk": "[String]", + "inputs_sample_fk": "[String]", + "inputs_data_fk": "[String]", + "inputs_material_fk": "[String]", + "outputs_sample_fk": "[String]", + "outputs_data_fk": "[String]", + "outputs_material_fk": "[String]", + "parameterName_fk": "[String]", + "protocolType_fk": "[String]", + "uri": "String", + "parameters_fk": "[String]", + "pubMedID": "String", + "doi": "String", + "authorList": "String", + "status_fk": "[String]", + "factorValues_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "source", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "roles": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "executesProtocol": { + "type": "to_one", + "target": "protocol", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameterValues": { + "type": "to_many", + "target": "process_parameter_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "previousProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "nextProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "inputs_source": { + "type": "to_one", + "target": "source", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "source_id", + "keysIn": "source" + }, + "inputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "inputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "inputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "outputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "outputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "outputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "parameterName": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "protocolType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameters": { + "type": "to_many", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "status": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorValues": { + "type": "to_many", + "target": "factor_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/output/study.json b/src/output/study.json new file mode 100644 index 0000000..5c5ac10 --- /dev/null +++ b/src/output/study.json @@ -0,0 +1,421 @@ +{ + "model": "study", + "storageType": "sql", + "attributes": { + "filename": "String", + "measurementType_fk": "[String]", + "technologyType": "String", + "technologyPlatform": "String", + "dataFiles_fk": "[String]", + "materials": "String", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "processSequence_fk": "[String]", + "comments_fk": "[String]", + "id": "String", + "name": "String", + "value": "String", + "type": "String", + "factorName": "String", + "factorType_fk": "[String]", + "category_fk": "[String]", + "value_fk": "[String]", + "unit_fk": "[String]", + "identifier": "String", + "title": "String", + "description": "String", + "submissionDate": "DateTime", + "publicReleaseDate": "DateTime", + "ontologySourceReferences_fk": "[String]", + "publications_fk": "[String]", + "people_fk": "[String]", + "studies_fk": "[String]", + "characteristicType_fk": "[String]", + "characteristics_fk": "[String]", + "derivesFrom_fk": "[String]", + "annotationValue": "String", + "termSource": "String", + "termAccession": "String", + "file": "String", + "version": "String", + "lastName": "String", + "firstName": "String", + "midInitials": "String", + "email": "String", + "phone": "String", + "fax": "String", + "address": "String", + "affiliation": "String", + "roles_fk": "[String]", + "executesProtocol_fk": "[String]", + "parameterValues_fk": "[String]", + "performer": "String", + "date": "DateTime", + "previousProcess_fk": "[String]", + "nextProcess_fk": "[String]", + "inputs_source_fk": "[String]", + "inputs_sample_fk": "[String]", + "inputs_data_fk": "[String]", + "inputs_material_fk": "[String]", + "outputs_sample_fk": "[String]", + "outputs_data_fk": "[String]", + "outputs_material_fk": "[String]", + "parameterName_fk": "[String]", + "protocolType_fk": "[String]", + "uri": "String", + "parameters_fk": "[String]", + "pubMedID": "String", + "doi": "String", + "authorList": "String", + "status_fk": "[String]", + "factorValues_fk": "[String]", + "studyDesignDescriptors_fk": "[String]", + "protocols_fk": "[String]", + "assays_fk": "[String]", + "factors_fk": "[String]" + }, + "associations": { + "measurementType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "dataFiles": { + "type": "to_many", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicCategories": { + "type": "to_many", + "target": "material_attribute", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "unitCategories": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "processSequence": { + "type": "to_many", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "category": { + "type": "to_one", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "value": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "ontology_annotation_id", + "keysIn": "ontology_annotation" + }, + "unit": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "ontologySourceReferences": { + "type": "to_many", + "target": "ontology_source_reference", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "publications": { + "type": "to_many", + "target": "publication", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "people": { + "type": "to_many", + "target": "person", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studies": { + "type": "to_many", + "target": "study", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristicType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "characteristics": { + "type": "to_many", + "target": "material_attribute_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "derivesFrom": { + "type": "to_many", + "target": "source", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "roles": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "executesProtocol": { + "type": "to_one", + "target": "protocol", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameterValues": { + "type": "to_many", + "target": "process_parameter_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "previousProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "nextProcess": { + "type": "to_one", + "target": "process", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "inputs_source": { + "type": "to_one", + "target": "source", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "source_id", + "keysIn": "source" + }, + "inputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "inputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "inputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "outputs_sample": { + "type": "to_one", + "target": "sample", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "sample_id", + "keysIn": "sample" + }, + "outputs_data": { + "type": "to_one", + "target": "data", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "data_id", + "keysIn": "data" + }, + "outputs_material": { + "type": "to_one", + "target": "material", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "material_id", + "keysIn": "material" + }, + "parameterName": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "protocolType": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "parameters": { + "type": "to_many", + "target": "protocol_parameter", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "status": { + "type": "to_one", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factorValues": { + "type": "to_many", + "target": "factor_value", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "studyDesignDescriptors": { + "type": "to_many", + "target": "ontology_annotation", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "protocols": { + "type": "to_many", + "target": "protocol", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "assays": { + "type": "to_many", + "target": "assay", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + }, + "factors": { + "type": "to_many", + "target": "factor", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" + } + } +} \ No newline at end of file diff --git a/src/utils.js b/src/utils.js index 6f5c31d..1b03d36 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,5 +1,13 @@ -let PARENT; -let relationMapping = {}; +const fs = require('fs'); +let PARENT, + VERBOSE = true, + relationMapping = {}, + zendroAttributes = { + model: PARENT, + storageType: "sql", + attributes: {}, + associations: {}, + }; const mapIsaTypeToZendroType = { string: "String", "date-time": "DateTime", @@ -7,13 +15,6 @@ const mapIsaTypeToZendroType = { email: "String", uri: "String", }; -let zendroAttributes = { - model: PARENT, - storageType: "sql", - attributes: {}, - associations: {}, -}; -let VERBOSE = true; const processProperties = function (propertiesObj, parentName) { PARENT = getSchemaName(parentName); @@ -21,6 +22,8 @@ const processProperties = function (propertiesObj, parentName) { const props = Object.entries(propertiesObj); props.forEach((prop) => { const propDef = prop[1]; + + // PROCESS ARRAYS if (propDef.type === "array") { const def = processArray(prop); if (def && def[1] === "objects") { @@ -28,20 +31,39 @@ const processProperties = function (propertiesObj, parentName) { Object.assign(zendroAttributes.attributes, { [prop[0] + "_fk"]: "[String]", }); - } else if (def) Object.assign(zendroAttributes.attributes, def[0]); - } else if (!propDef.type || propDef.type === "object") { + } + else if (def && def[1] === "scalars") Object.assign(zendroAttributes.attributes, def[0]); + else if (def && def[1] === "multiples") { + def[0].forEach(definition => { + const attr = {[definition.name + "_fk"]: "[String]"}, + assoc = {[definition.name]: definition.value}; + Object.assign(zendroAttributes.attributes, attr); + Object.assign(zendroAttributes.associations, assoc); + }) + } + } + + // PROCESS ASSOCIATIONS + else if (!propDef.type || propDef.type === "object") { let [associations, foreignKey] = processAssociation(prop); if (associations && foreignKey) { Object.assign(zendroAttributes.associations, associations); Object.assign(zendroAttributes.attributes, { [foreignKey]: "[String]" }); } - } else Object.assign(zendroAttributes.attributes, processScalar(prop)); + else Object.assign(zendroAttributes.attributes, { [prop[0]]: "String" }); + } + + // PROCESS SCALARS + else Object.assign(zendroAttributes.attributes, processScalar(prop)); }); // Manually add an 'id' field: zendroAttributes.attributes["id"] = "String"; - if (VERBOSE) console.log("--- " + PARENT + " ---"); - if (VERBOSE) console.log(zendroAttributes); + if (VERBOSE) { + console.log("--- " + PARENT + " ---"); + console.log(zendroAttributes); + } + return zendroAttributes; }; @@ -54,12 +76,24 @@ const recognizeIsaType = function (propDef) { const processArray = function (arrayProp) { if (VERBOSE) console.log(`Processing array ${JSON.stringify(arrayProp[0])}`); const items = arrayProp[1].items; - // TODO handle 'anyOf' separately - if (items["$ref"] || items["anyOf"]) { + if (items["$ref"]) { if (VERBOSE) console.log(`Found multiple references ${items["$ref"]}`); return [processAssociation(arrayProp), "objects"]; - } else if (!items.type) { - // This is a scalar + } + else if (items["anyOf"]) { + if (VERBOSE) console.log(`Found multiple $ref ${items.items}`); + let outputRelations = [] + items['anyOf'].forEach((item) => { + outputRelations.push( + { + name: `${arrayProp[0]}_${getSchemaName(item["$ref"])}`, + value: processAnyOf({"anyOf": [item]}) + } + ) + }) + return [outputRelations, "multiples"] + } + else if (!items.type) { if (VERBOSE) console.log(`Found multiple scalars ${items.type}`); return [`[${recognizeIsaType(arrayProp)}]`, "scalars"]; } @@ -78,15 +112,22 @@ const processAssociation = function (assocProp) { schemaName in relationMapping ? relationMapping[schemaName].push(PARENT) : (relationMapping[schemaName] = [PARENT]); - const foreignKeyName = assocProp[0] + "_fk"; return [ { [assocProp[0]]: relationTemplate(to_many, schemaName, "To-Do-Key", "To-Do-keyIn") }, - foreignKeyName, + assocProp[0] + "_fk", ]; } else if (Object.keys(references).includes("anyOf")) { - processAnyOf(assocProp); + const anyOf = processAnyOf(assocProp[1], to_many); + if (anyOf === 'String') return [null, null] + else { + return [ + { [assocProp[0]]: anyOf }, + assocProp[0] + "_fk", + ]; + } + /*const no_refs = references.anyOf.every(element => Object.keys(element)[0] !== "$ref"); console.log(`\n\nanyOf case for field '${assocProp[0]}' to_many? '${to_many}' no_refs? ${no_refs}:\n${JSON.stringify(references)}\n\n`); if (no_refs) { @@ -120,9 +161,19 @@ const processAssociation = function (assocProp) { return [null, null] }; -function processAnyOf(anyOfProp) { - console.log(`Processing anyOf ${JSON.stringify(anyOfProp)}`); - // TODO +function processAnyOf(fieldProp, to_many) { + if (VERBOSE) console.log(`Processing anyOf ${JSON.stringify(fieldProp)}`); + const item = fieldProp['anyOf'].filter(element => "$ref" in element)[0]; + if (item) { + const target = getSchemaName(item["$ref"]), + keyIn = to_many ? PARENT : target, + targetKey = `${target}_id`; + target in relationMapping + ? relationMapping[target].push(PARENT) + : (relationMapping[target] = [PARENT]); + return relationTemplate(to_many, target, targetKey, keyIn); + } + return "String" } const processScalar = function (scalarProp) { @@ -150,10 +201,23 @@ function relationTemplate(toMany, schemaName, targetKey, keysIn) { }; } +/** Sets the value of verbosity to true or false. If verbosity is true, the console will output logs. + * @param {Boolean} bool - controls the value of the verbosity + */ function setVerbose(bool) { VERBOSE = bool; } +function writeToFile(schema) { + if (VERBOSE) console.log(`Writting to file ${schema.name}`) + const filePath = `./src/output/${schema.name}.json`, + data = JSON.stringify(schema.value, null, 2); + fs.writeFile(filePath, data, (err) => { + if (err) throw err; + if (VERBOSE) console.log(`File ${filePath} written.`); + }) +} + module.exports = { processProperties, processArray, @@ -161,5 +225,6 @@ module.exports = { processScalar, getSchemaName, relationMapping, - setVerbose + setVerbose, + writeToFile }; diff --git a/test.js b/test.js deleted file mode 100644 index 61795ff..0000000 --- a/test.js +++ /dev/null @@ -1,15 +0,0 @@ -const fs = require("fs"); -const utils = require("./src/utils.js"); - -fs.readdir("./isa_1_0_core/", (err, files) => { - let output = {}; - utils.setVerbose(false) - files.forEach((file) => { - // console.log(`PROCESSING FILE ${file}`); - const schemaName = utils.getSchemaName(file), - i = require(`./isa_1_0_core/${file}`); - output[schemaName] = utils.processProperties(i.properties, schemaName); - }); - // console.log(utils.relationMapping); - // we now need to process reverse relationships from u.relationMapping -}); diff --git a/test_out.txt b/test_out.txt deleted file mode 100644 index 81cad0d..0000000 --- a/test_out.txt +++ /dev/null @@ -1,1068 +0,0 @@ -PROCESSING FILE assay_schema.json -Processing scalar @id -Processing scalar filename -{ filename: 'String' } -Processing association "measurementType" -Processing association "technologyType" -Processing scalar technologyPlatform -{ technologyPlatform: 'String' } -Processing array "dataFiles" -Found multiple references data_schema.json# -Processing association "dataFiles" -Processing association "materials" -Processing array "characteristicCategories" -Found multiple references material_attribute_schema.json# -Processing association "characteristicCategories" -Processing array "unitCategories" -Found multiple references ontology_annotation_schema.json# -Processing association "unitCategories" -Processing array "processSequence" -Found multiple references process_schema.json# -Processing association "processSequence" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- assay --- -{ - model: 'assay', - storageType: 'sql', - attributes: { filename: 'String', technologyPlatform: 'String', id: 'String' }, - associations: { - measurementType: { - type: 'to_one', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - technologyType: { - type: 'to_one', - target: '', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - dataFiles: { - type: 'to_many', - target: 'data', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - materials: { - type: 'to_one', - target: '', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - characteristicCategories: { - type: 'to_many', - target: 'material_attribute', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - unitCategories: { - type: 'to_many', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - processSequence: { - type: 'to_many', - target: 'process', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE comment_schema.json -Processing scalar @id -Processing scalar name -{ name: 'String' } -Processing scalar value -{ value: 'String' } ---- comment --- -{ - model: 'comment', - storageType: 'sql', - attributes: { name: 'String', value: 'String', id: 'String' }, - associations: {} -} -PROCESSING FILE data_schema.json -Processing scalar @id -Processing scalar name -{ name: 'String' } -Processing scalar type -{ type: 'String' } -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- data --- -{ - model: 'data', - storageType: 'sql', - attributes: { name: 'String', type: 'String', id: 'String' }, - associations: { - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE factor_schema.json -Processing scalar @id -Processing scalar factorName -{ factorName: 'String' } -Processing association "factorType" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- factor --- -{ - model: 'factor', - storageType: 'sql', - attributes: { factorName: 'String', id: 'String' }, - associations: { - factorType: { - type: 'to_one', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE factor_value_schema.json -Processing scalar @id -Processing association "category" -Processing association "value" -Processing association "unit" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- factor_value --- -{ - model: 'factor_value', - storageType: 'sql', - attributes: { id: 'String' }, - associations: { - category: { - type: 'to_one', - target: 'factor', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - value: { - type: 'to_one', - target: '', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - unit: { - type: 'to_one', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE investigation_schema.json -Processing scalar @id -Processing scalar filename -{ filename: 'String' } -Processing scalar identifier -{ identifier: 'String' } -Processing scalar title -{ title: 'String' } -Processing scalar description -{ description: 'String' } -Processing scalar submissionDate -{ submissionDate: 'DateTime' } -Processing scalar publicReleaseDate -{ publicReleaseDate: 'DateTime' } -Processing array "ontologySourceReferences" -Found multiple references ontology_source_reference_schema.json# -Processing association "ontologySourceReferences" -Processing array "publications" -Found multiple references publication_schema.json# -Processing association "publications" -Processing array "people" -Found multiple references person_schema.json# -Processing association "people" -Processing array "studies" -Found multiple references study_schema.json# -Processing association "studies" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- investigation --- -{ - model: 'investigation', - storageType: 'sql', - attributes: { - filename: 'String', - identifier: 'String', - title: 'String', - description: 'String', - submissionDate: 'DateTime', - publicReleaseDate: 'DateTime', - id: 'String' - }, - associations: { - ontologySourceReferences: { - type: 'to_many', - target: 'ontology_source_reference', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - publications: { - type: 'to_many', - target: 'publication', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - people: { - type: 'to_many', - target: 'person', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - studies: { - type: 'to_many', - target: 'study', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE material_attribute_schema.json -Processing scalar @id -Processing association "characteristicType" ---- material_attribute --- -{ - model: 'material_attribute', - storageType: 'sql', - attributes: { id: 'String' }, - associations: { - characteristicType: { - type: 'to_one', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE material_attribute_value_schema.json -Processing scalar @id -Processing association "category" -Processing association "value" -Processing association "unit" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- material_attribute_value --- -{ - model: 'material_attribute_value', - storageType: 'sql', - attributes: { id: 'String' }, - associations: { - category: { - type: 'to_one', - target: 'material_attribute', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - value: { - type: 'to_one', - target: '', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - unit: { - type: 'to_one', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE material_schema.json -Processing scalar @id -Processing scalar name -{ name: 'String' } -Processing scalar type -{ type: 'String' } -Processing array "characteristics" -Found multiple references material_attribute_value_schema.json# -Processing association "characteristics" -Processing array "derivesFrom" -Found multiple references material_schema.json# -Processing association "derivesFrom" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- material --- -{ - model: 'material', - storageType: 'sql', - attributes: { name: 'String', type: 'String', id: 'String' }, - associations: { - characteristics: { - type: 'to_many', - target: 'material_attribute_value', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - derivesFrom: { - type: 'to_many', - target: 'material', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE ontology_annotation_schema.json -Processing scalar @id -Processing association "annotationValue" -Processing scalar termSource -{ termSource: 'String' } -Processing scalar termAccession -{ termAccession: 'String' } -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- ontology_annotation --- -{ - model: 'ontology_annotation', - storageType: 'sql', - attributes: { termSource: 'String', termAccession: 'String', id: 'String' }, - associations: { - annotationValue: { - type: 'to_one', - target: '', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE ontology_source_reference_schema.json -Processing scalar description -{ description: 'String' } -Processing scalar file -{ file: 'String' } -Processing scalar name -{ name: 'String' } -Processing scalar version -{ version: 'String' } -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- ontology_source_reference --- -{ - model: 'ontology_source_reference', - storageType: 'sql', - attributes: { - description: 'String', - file: 'String', - name: 'String', - version: 'String', - id: 'String' - }, - associations: { - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE organization_schema.json -Processing scalar name -{ name: 'String' } ---- organization --- -{ - model: 'organization', - storageType: 'sql', - attributes: { name: 'String', id: 'String' }, - associations: {} -} -PROCESSING FILE person_schema.json -Processing scalar @id -Processing scalar lastName -{ lastName: 'String' } -Processing scalar firstName -{ firstName: 'String' } -Processing scalar midInitials -{ midInitials: 'String' } -Processing scalar email -{ email: 'String' } -Processing scalar phone -{ phone: 'String' } -Processing scalar fax -{ fax: 'String' } -Processing scalar address -{ address: 'String' } -Processing scalar affiliation -{ affiliation: 'String' } -Processing array "roles" -Found multiple references ontology_annotation_schema.json# -Processing association "roles" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- person --- -{ - model: 'person', - storageType: 'sql', - attributes: { - lastName: 'String', - firstName: 'String', - midInitials: 'String', - email: 'String', - phone: 'String', - fax: 'String', - address: 'String', - affiliation: 'String', - id: 'String' - }, - associations: { - roles: { - type: 'to_many', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE process_parameter_value_schema.json -Processing association "category" -Processing association "value" -Processing association "unit" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- process_parameter_value --- -{ - model: 'process_parameter_value', - storageType: 'sql', - attributes: { id: 'String' }, - associations: { - category: { - type: 'to_one', - target: 'protocol_parameter', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - value: { - type: 'to_one', - target: '', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - unit: { - type: 'to_one', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE process_schema.json -Processing scalar @id -Processing scalar name -{ name: 'String' } -Processing association "executesProtocol" -Processing array "parameterValues" -Found multiple references process_parameter_value_schema.json# -Processing association "parameterValues" -Processing scalar performer -{ performer: 'String' } -Processing scalar date -{ date: 'DateTime' } -Processing association "previousProcess" -Processing association "nextProcess" -Processing array "inputs" -Found multiple references undefined -Processing association "inputs" -Processing array "outputs" -Found multiple references undefined -Processing association "outputs" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- process --- -{ - model: 'process', - storageType: 'sql', - attributes: { - name: 'String', - performer: 'String', - date: 'DateTime', - id: 'String' - }, - associations: { - executesProtocol: { - type: 'to_one', - target: 'protocol', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - parameterValues: { - type: 'to_many', - target: 'process_parameter_value', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - previousProcess: { - type: 'to_one', - target: 'process', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - nextProcess: { - type: 'to_one', - target: 'process', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - inputs: { - type: 'to_many', - target: '', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - outputs: { - type: 'to_many', - target: '', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE protocol_parameter_schema.json -Processing scalar @id -Processing association "parameterName" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- protocol_parameter --- -{ - model: 'protocol_parameter', - storageType: 'sql', - attributes: { id: 'String' }, - associations: { - parameterName: { - type: 'to_one', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE protocol_schema.json -Processing scalar @id -Processing scalar name -{ name: 'String' } -Processing association "protocolType" -Processing scalar description -{ description: 'String' } -Processing scalar uri -{ uri: 'String' } -Processing scalar version -{ version: 'String' } -Processing array "parameters" -Found multiple references protocol_parameter_schema.json# -Processing association "parameters" -Processing array "components" -Found multiple scalars object -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- protocol --- -{ - model: 'protocol', - storageType: 'sql', - attributes: { - '0': '[', - '1': 'u', - '2': 'n', - '3': 'd', - '4': 'e', - '5': 'f', - '6': 'i', - '7': 'n', - '8': 'e', - '9': 'd', - '10': ']', - name: 'String', - description: 'String', - uri: 'String', - version: 'String', - id: 'String' - }, - associations: { - protocolType: { - type: 'to_one', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - parameters: { - type: 'to_many', - target: 'protocol_parameter', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE publication_schema.json -Processing scalar pubMedID -{ pubMedID: 'String' } -Processing scalar doi -{ doi: 'String' } -Processing scalar authorList -{ authorList: 'String' } -Processing scalar title -{ title: 'String' } -Processing association "status" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- publication --- -{ - model: 'publication', - storageType: 'sql', - attributes: { - pubMedID: 'String', - doi: 'String', - authorList: 'String', - title: 'String', - id: 'String' - }, - associations: { - status: { - type: 'to_one', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE sample_schema.json -Processing scalar @id -Processing scalar name -{ name: 'String' } -Processing array "characteristics" -Found multiple references material_attribute_value_schema.json# -Processing association "characteristics" -Processing array "factorValues" -Found multiple references factor_value_schema.json# -Processing association "factorValues" -Processing array "derivesFrom" -Found multiple references source_schema.json# -Processing association "derivesFrom" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- sample --- -{ - model: 'sample', - storageType: 'sql', - attributes: { name: 'String', id: 'String' }, - associations: { - characteristics: { - type: 'to_many', - target: 'material_attribute_value', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - factorValues: { - type: 'to_many', - target: 'factor_value', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - derivesFrom: { - type: 'to_many', - target: 'source', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE source_schema.json -Processing scalar @id -Processing scalar name -{ name: 'String' } -Processing array "characteristics" -Found multiple references material_attribute_value_schema.json# -Processing association "characteristics" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- source --- -{ - model: 'source', - storageType: 'sql', - attributes: { name: 'String', id: 'String' }, - associations: { - characteristics: { - type: 'to_many', - target: 'material_attribute_value', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} -PROCESSING FILE study_schema.json -Processing scalar @id -Processing scalar filename -{ filename: 'String' } -Processing scalar identifier -{ identifier: 'String' } -Processing scalar title -{ title: 'String' } -Processing scalar description -{ description: 'String' } -Processing scalar submissionDate -{ submissionDate: 'DateTime' } -Processing scalar publicReleaseDate -{ publicReleaseDate: 'DateTime' } -Processing array "publications" -Found multiple references publication_schema.json# -Processing association "publications" -Processing array "people" -Found multiple references person_schema.json# -Processing association "people" -Processing array "studyDesignDescriptors" -Found multiple references ontology_annotation_schema.json# -Processing association "studyDesignDescriptors" -Processing array "protocols" -Found multiple references protocol_schema.json# -Processing association "protocols" -Processing association "materials" -Processing array "processSequence" -Found multiple references process_schema.json# -Processing association "processSequence" -Processing array "assays" -Found multiple references assay_schema.json# -Processing association "assays" -Processing array "factors" -Found multiple references factor_schema.json# -Processing association "factors" -Processing array "characteristicCategories" -Found multiple references material_attribute_schema.json# -Processing association "characteristicCategories" -Processing array "unitCategories" -Found multiple references ontology_annotation_schema.json# -Processing association "unitCategories" -Processing array "comments" -Found multiple references comment_schema.json# -Processing association "comments" ---- study --- -{ - model: 'study', - storageType: 'sql', - attributes: { - filename: 'String', - identifier: 'String', - title: 'String', - description: 'String', - submissionDate: 'DateTime', - publicReleaseDate: 'DateTime', - id: 'String' - }, - associations: { - publications: { - type: 'to_many', - target: 'publication', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - people: { - type: 'to_many', - target: 'person', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - studyDesignDescriptors: { - type: 'to_many', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - protocols: { - type: 'to_many', - target: 'protocol', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - materials: { - type: 'to_one', - target: '', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - processSequence: { - type: 'to_many', - target: 'process', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - assays: { - type: 'to_many', - target: 'assay', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - factors: { - type: 'to_many', - target: 'factor', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - characteristicCategories: { - type: 'to_many', - target: 'material_attribute', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - unitCategories: { - type: 'to_many', - target: 'ontology_annotation', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - }, - comments: { - type: 'to_many', - target: 'comment', - targetStorageType: 'sql', - targetKey: null, - keyIn: null, - label: null - } - } -} From f9e503f4f70771545d469ed457b9dc3b8576dabc Mon Sep 17 00:00:00 2001 From: Terazus Date: Tue, 7 Dec 2021 06:29:50 -0800 Subject: [PATCH 19/21] removed some long comments --- src/utils.js | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/utils.js b/src/utils.js index 1b03d36..e40d07a 100644 --- a/src/utils.js +++ b/src/utils.js @@ -127,36 +127,6 @@ const processAssociation = function (assocProp) { assocProp[0] + "_fk", ]; } - - /*const no_refs = references.anyOf.every(element => Object.keys(element)[0] !== "$ref"); - console.log(`\n\nanyOf case for field '${assocProp[0]}' to_many? '${to_many}' no_refs? ${no_refs}:\n${JSON.stringify(references)}\n\n`); - if (no_refs) { - const attrType = to_many ? "[String]" : "String" - zendroAttributes.attributes[assocProp[0]] = attrType; - } else { - const refs = references.anyOf.filter(element => Object.keys(element)[0] === "$ref"); - let ref_assocs = refs.map(r => { - const target = getSchemaName(r["$ref"]); - const keyIn = to_many ? zendroAttributes.model : target; - const assocName = `${assocProp[0]}_${target}`; - const targetKey = `${target}_id`; - console.error(`keyIn: ${keyIn}`); - const assocDef = relationTemplate(to_many, target, targetKey, keyIn); - zendroAttributes.associations[assocName] = assocDef; - console.error(`anyOf - assoc '${assocName}':\n` + JSON.stringify(zendroAttributes.associations[assocName])); - // Add foreign-key if on the to-one end: - if (to_many) { - zendroAttributes.attributes[targetKey] = 'String'; - //console.error("anyOf - FK:\n" + JSON.stringify(zendroAttributes.attributes)) - } - }) - } - // assocPorps = {} - // How do I know, whether this is type array or not - //if (to_many) {} else {} - // skip non $ref, except when there is no $ref use a string - // there are multiple types and or references (we don't use oneOf and allOf in ISA) - // for loop with a recursive call ?*/ } return [null, null] }; From be5c87770d1babdef686df2a22798c3d8fbfe862 Mon Sep 17 00:00:00 2001 From: Terazus Date: Tue, 7 Dec 2021 06:47:33 -0800 Subject: [PATCH 20/21] Fixed issue with redundant fields --- src/output/comment.json | 14 +---- src/output/data.json | 16 +----- src/output/factor.json | 18 +----- src/output/factor_value.json | 20 +------ src/output/investigation.json | 22 +------- src/output/material.json | 31 +---------- src/output/material_attribute.json | 31 +---------- src/output/material_attribute_value.json | 28 +--------- src/output/ontology_annotation.json | 35 +----------- src/output/ontology_source_reference.json | 38 ++----------- src/output/organization.json | 36 +----------- src/output/person.json | 40 +------------- src/output/process.json | 48 +--------------- src/output/process_parameter_value.json | 44 +-------------- src/output/protocol.json | 64 ++-------------------- src/output/protocol_parameter.json | 60 +------------------- src/output/publication.json | 67 ++--------------------- src/output/sample.json | 67 +---------------------- src/output/source.json | 67 +---------------------- src/output/study.json | 67 +++-------------------- src/utils.js | 1 + 21 files changed, 61 insertions(+), 753 deletions(-) diff --git a/src/output/comment.json b/src/output/comment.json index 7bfd1aa..f5f5138 100644 --- a/src/output/comment.json +++ b/src/output/comment.json @@ -2,19 +2,9 @@ "model": "comment", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", "name": "String", - "value": "String" + "value": "String", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/data.json b/src/output/data.json index e381820..566b41a 100644 --- a/src/output/data.json +++ b/src/output/data.json @@ -2,20 +2,10 @@ "model": "data", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", "name": "String", - "value": "String", - "type": "String" + "type": "String", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/factor.json b/src/output/factor.json index fc52109..4e32256 100644 --- a/src/output/factor.json +++ b/src/output/factor.json @@ -2,22 +2,10 @@ "model": "factor", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", "factorName": "String", - "factorType_fk": "[String]" + "factorType_fk": "[String]", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/factor_value.json b/src/output/factor_value.json index 9637197..a46ed42 100644 --- a/src/output/factor_value.json +++ b/src/output/factor_value.json @@ -2,25 +2,11 @@ "model": "factor_value", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", "category_fk": "[String]", "value_fk": "[String]", - "unit_fk": "[String]" + "unit_fk": "[String]", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/investigation.json b/src/output/investigation.json index b348849..42fc5e2 100644 --- a/src/output/investigation.json +++ b/src/output/investigation.json @@ -3,24 +3,6 @@ "storageType": "sql", "attributes": { "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", "identifier": "String", "title": "String", "description": "String", @@ -29,7 +11,9 @@ "ontologySourceReferences_fk": "[String]", "publications_fk": "[String]", "people_fk": "[String]", - "studies_fk": "[String]" + "studies_fk": "[String]", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/material.json b/src/output/material.json index f9ed241..cb8e08d 100644 --- a/src/output/material.json +++ b/src/output/material.json @@ -2,37 +2,12 @@ "model": "material", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", "name": "String", - "value": "String", "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]" + "derivesFrom_fk": "[String]", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/material_attribute.json b/src/output/material_attribute.json index e755523..f46e85c 100644 --- a/src/output/material_attribute.json +++ b/src/output/material_attribute.json @@ -2,35 +2,8 @@ "model": "material_attribute", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]" + "characteristicType_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/material_attribute_value.json b/src/output/material_attribute_value.json index 5f43a16..a2ec8cb 100644 --- a/src/output/material_attribute_value.json +++ b/src/output/material_attribute_value.json @@ -2,35 +2,11 @@ "model": "material_attribute_value", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", "category_fk": "[String]", "value_fk": "[String]", "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]" + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/ontology_annotation.json b/src/output/ontology_annotation.json index 58f9887..ffd44fe 100644 --- a/src/output/ontology_annotation.json +++ b/src/output/ontology_annotation.json @@ -2,40 +2,11 @@ "model": "ontology_annotation", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", - "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", "annotationValue": "String", "termSource": "String", - "termAccession": "String" + "termAccession": "String", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/ontology_source_reference.json b/src/output/ontology_source_reference.json index 098141a..96115c9 100644 --- a/src/output/ontology_source_reference.json +++ b/src/output/ontology_source_reference.json @@ -2,42 +2,12 @@ "model": "ontology_source_reference", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", - "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", "file": "String", - "version": "String" + "name": "String", + "version": "String", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/organization.json b/src/output/organization.json index 0b2257a..e9f7185 100644 --- a/src/output/organization.json +++ b/src/output/organization.json @@ -2,42 +2,8 @@ "model": "organization", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", - "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", - "file": "String", - "version": "String" + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/person.json b/src/output/person.json index af1dd79..b62d5cc 100644 --- a/src/output/person.json +++ b/src/output/person.json @@ -2,42 +2,6 @@ "model": "person", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", - "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", - "file": "String", - "version": "String", "lastName": "String", "firstName": "String", "midInitials": "String", @@ -46,7 +10,9 @@ "fax": "String", "address": "String", "affiliation": "String", - "roles_fk": "[String]" + "roles_fk": "[String]", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/process.json b/src/output/process.json index 6fa9760..550465a 100644 --- a/src/output/process.json +++ b/src/output/process.json @@ -2,51 +2,7 @@ "model": "process", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", - "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", - "file": "String", - "version": "String", - "lastName": "String", - "firstName": "String", - "midInitials": "String", - "email": "String", - "phone": "String", - "fax": "String", - "address": "String", - "affiliation": "String", - "roles_fk": "[String]", "executesProtocol_fk": "[String]", "parameterValues_fk": "[String]", "performer": "String", @@ -59,7 +15,9 @@ "inputs_material_fk": "[String]", "outputs_sample_fk": "[String]", "outputs_data_fk": "[String]", - "outputs_material_fk": "[String]" + "outputs_material_fk": "[String]", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/process_parameter_value.json b/src/output/process_parameter_value.json index 80f4c16..64ba2f5 100644 --- a/src/output/process_parameter_value.json +++ b/src/output/process_parameter_value.json @@ -2,51 +2,11 @@ "model": "process_parameter_value", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", "category_fk": "[String]", "value_fk": "[String]", "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", - "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", - "file": "String", - "version": "String", - "lastName": "String", - "firstName": "String", - "midInitials": "String", - "email": "String", - "phone": "String", - "fax": "String", - "address": "String", - "affiliation": "String", - "roles_fk": "[String]" + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/protocol.json b/src/output/protocol.json index c8f24b8..5cc1a8c 100644 --- a/src/output/protocol.json +++ b/src/output/protocol.json @@ -2,68 +2,14 @@ "model": "protocol", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", - "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", - "file": "String", - "version": "String", - "lastName": "String", - "firstName": "String", - "midInitials": "String", - "email": "String", - "phone": "String", - "fax": "String", - "address": "String", - "affiliation": "String", - "roles_fk": "[String]", - "executesProtocol_fk": "[String]", - "parameterValues_fk": "[String]", - "performer": "String", - "date": "DateTime", - "previousProcess_fk": "[String]", - "nextProcess_fk": "[String]", - "inputs_source_fk": "[String]", - "inputs_sample_fk": "[String]", - "inputs_data_fk": "[String]", - "inputs_material_fk": "[String]", - "outputs_sample_fk": "[String]", - "outputs_data_fk": "[String]", - "outputs_material_fk": "[String]", - "parameterName_fk": "[String]", "protocolType_fk": "[String]", + "description": "String", "uri": "String", - "parameters_fk": "[String]" + "version": "String", + "parameters_fk": "[String]", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/protocol_parameter.json b/src/output/protocol_parameter.json index dd3da4f..3dd94ab 100644 --- a/src/output/protocol_parameter.json +++ b/src/output/protocol_parameter.json @@ -2,65 +2,9 @@ "model": "protocol_parameter", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", + "parameterName_fk": "[String]", "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", - "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", - "file": "String", - "version": "String", - "lastName": "String", - "firstName": "String", - "midInitials": "String", - "email": "String", - "phone": "String", - "fax": "String", - "address": "String", - "affiliation": "String", - "roles_fk": "[String]", - "executesProtocol_fk": "[String]", - "parameterValues_fk": "[String]", - "performer": "String", - "date": "DateTime", - "previousProcess_fk": "[String]", - "nextProcess_fk": "[String]", - "inputs_source_fk": "[String]", - "inputs_sample_fk": "[String]", - "inputs_data_fk": "[String]", - "inputs_material_fk": "[String]", - "outputs_sample_fk": "[String]", - "outputs_data_fk": "[String]", - "outputs_material_fk": "[String]", - "parameterName_fk": "[String]" + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/publication.json b/src/output/publication.json index d28ebaa..5f26af6 100644 --- a/src/output/publication.json +++ b/src/output/publication.json @@ -2,72 +2,13 @@ "model": "publication", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", - "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", - "file": "String", - "version": "String", - "lastName": "String", - "firstName": "String", - "midInitials": "String", - "email": "String", - "phone": "String", - "fax": "String", - "address": "String", - "affiliation": "String", - "roles_fk": "[String]", - "executesProtocol_fk": "[String]", - "parameterValues_fk": "[String]", - "performer": "String", - "date": "DateTime", - "previousProcess_fk": "[String]", - "nextProcess_fk": "[String]", - "inputs_source_fk": "[String]", - "inputs_sample_fk": "[String]", - "inputs_data_fk": "[String]", - "inputs_material_fk": "[String]", - "outputs_sample_fk": "[String]", - "outputs_data_fk": "[String]", - "outputs_material_fk": "[String]", - "parameterName_fk": "[String]", - "protocolType_fk": "[String]", - "uri": "String", - "parameters_fk": "[String]", "pubMedID": "String", "doi": "String", "authorList": "String", - "status_fk": "[String]" + "title": "String", + "status_fk": "[String]", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/sample.json b/src/output/sample.json index 8ec0fed..085dd0b 100644 --- a/src/output/sample.json +++ b/src/output/sample.json @@ -2,73 +2,12 @@ "model": "sample", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", "characteristics_fk": "[String]", + "factorValues_fk": "[String]", "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", - "file": "String", - "version": "String", - "lastName": "String", - "firstName": "String", - "midInitials": "String", - "email": "String", - "phone": "String", - "fax": "String", - "address": "String", - "affiliation": "String", - "roles_fk": "[String]", - "executesProtocol_fk": "[String]", - "parameterValues_fk": "[String]", - "performer": "String", - "date": "DateTime", - "previousProcess_fk": "[String]", - "nextProcess_fk": "[String]", - "inputs_source_fk": "[String]", - "inputs_sample_fk": "[String]", - "inputs_data_fk": "[String]", - "inputs_material_fk": "[String]", - "outputs_sample_fk": "[String]", - "outputs_data_fk": "[String]", - "outputs_material_fk": "[String]", - "parameterName_fk": "[String]", - "protocolType_fk": "[String]", - "uri": "String", - "parameters_fk": "[String]", - "pubMedID": "String", - "doi": "String", - "authorList": "String", - "status_fk": "[String]", - "factorValues_fk": "[String]" + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/source.json b/src/output/source.json index 19f05ad..7409f78 100644 --- a/src/output/source.json +++ b/src/output/source.json @@ -2,73 +2,10 @@ "model": "source", "storageType": "sql", "attributes": { - "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", - "identifier": "String", - "title": "String", - "description": "String", - "submissionDate": "DateTime", - "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", - "publications_fk": "[String]", - "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", - "file": "String", - "version": "String", - "lastName": "String", - "firstName": "String", - "midInitials": "String", - "email": "String", - "phone": "String", - "fax": "String", - "address": "String", - "affiliation": "String", - "roles_fk": "[String]", - "executesProtocol_fk": "[String]", - "parameterValues_fk": "[String]", - "performer": "String", - "date": "DateTime", - "previousProcess_fk": "[String]", - "nextProcess_fk": "[String]", - "inputs_source_fk": "[String]", - "inputs_sample_fk": "[String]", - "inputs_data_fk": "[String]", - "inputs_material_fk": "[String]", - "outputs_sample_fk": "[String]", - "outputs_data_fk": "[String]", - "outputs_material_fk": "[String]", - "parameterName_fk": "[String]", - "protocolType_fk": "[String]", - "uri": "String", - "parameters_fk": "[String]", - "pubMedID": "String", - "doi": "String", - "authorList": "String", - "status_fk": "[String]", - "factorValues_fk": "[String]" + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/output/study.json b/src/output/study.json index 5c5ac10..4ad850e 100644 --- a/src/output/study.json +++ b/src/output/study.json @@ -3,76 +3,23 @@ "storageType": "sql", "attributes": { "filename": "String", - "measurementType_fk": "[String]", - "technologyType": "String", - "technologyPlatform": "String", - "dataFiles_fk": "[String]", - "materials": "String", - "characteristicCategories_fk": "[String]", - "unitCategories_fk": "[String]", - "processSequence_fk": "[String]", - "comments_fk": "[String]", - "id": "String", - "name": "String", - "value": "String", - "type": "String", - "factorName": "String", - "factorType_fk": "[String]", - "category_fk": "[String]", - "value_fk": "[String]", - "unit_fk": "[String]", "identifier": "String", "title": "String", "description": "String", "submissionDate": "DateTime", "publicReleaseDate": "DateTime", - "ontologySourceReferences_fk": "[String]", "publications_fk": "[String]", "people_fk": "[String]", - "studies_fk": "[String]", - "characteristicType_fk": "[String]", - "characteristics_fk": "[String]", - "derivesFrom_fk": "[String]", - "annotationValue": "String", - "termSource": "String", - "termAccession": "String", - "file": "String", - "version": "String", - "lastName": "String", - "firstName": "String", - "midInitials": "String", - "email": "String", - "phone": "String", - "fax": "String", - "address": "String", - "affiliation": "String", - "roles_fk": "[String]", - "executesProtocol_fk": "[String]", - "parameterValues_fk": "[String]", - "performer": "String", - "date": "DateTime", - "previousProcess_fk": "[String]", - "nextProcess_fk": "[String]", - "inputs_source_fk": "[String]", - "inputs_sample_fk": "[String]", - "inputs_data_fk": "[String]", - "inputs_material_fk": "[String]", - "outputs_sample_fk": "[String]", - "outputs_data_fk": "[String]", - "outputs_material_fk": "[String]", - "parameterName_fk": "[String]", - "protocolType_fk": "[String]", - "uri": "String", - "parameters_fk": "[String]", - "pubMedID": "String", - "doi": "String", - "authorList": "String", - "status_fk": "[String]", - "factorValues_fk": "[String]", "studyDesignDescriptors_fk": "[String]", "protocols_fk": "[String]", + "materials": "String", + "processSequence_fk": "[String]", "assays_fk": "[String]", - "factors_fk": "[String]" + "factors_fk": "[String]", + "characteristicCategories_fk": "[String]", + "unitCategories_fk": "[String]", + "comments_fk": "[String]", + "id": "String" }, "associations": { "measurementType": { diff --git a/src/utils.js b/src/utils.js index e40d07a..c038510 100644 --- a/src/utils.js +++ b/src/utils.js @@ -18,6 +18,7 @@ const mapIsaTypeToZendroType = { const processProperties = function (propertiesObj, parentName) { PARENT = getSchemaName(parentName); + zendroAttributes.attributes = {}; zendroAttributes.model = PARENT; const props = Object.entries(propertiesObj); props.forEach((prop) => { From 4a464643fae06f76363d47d37f807efa0e596e60 Mon Sep 17 00:00:00 2001 From: Terazus Date: Tue, 7 Dec 2021 06:49:48 -0800 Subject: [PATCH 21/21] fixed redundant relations --- src/output/comment.json | 57 +---- src/output/data.json | 45 ---- src/output/factor.json | 47 +--- src/output/factor_value.json | 72 +----- src/output/investigation.json | 97 +------ src/output/material.json | 134 +--------- src/output/material_attribute.json | 126 ---------- src/output/material_attribute_value.json | 103 +------- src/output/ontology_annotation.json | 144 ----------- src/output/ontology_source_reference.json | 144 ----------- src/output/organization.json | 156 +----------- src/output/person.json | 146 +---------- src/output/process.json | 171 +------------ src/output/process_parameter_value.json | 130 +--------- src/output/protocol.json | 267 +------------------- src/output/protocol_parameter.json | 254 +------------------ src/output/publication.json | 281 +-------------------- src/output/sample.json | 280 +-------------------- src/output/source.json | 292 +--------------------- src/output/study.json | 278 +------------------- src/utils.js | 16 +- 21 files changed, 70 insertions(+), 3170 deletions(-) diff --git a/src/output/comment.json b/src/output/comment.json index f5f5138..61476b0 100644 --- a/src/output/comment.json +++ b/src/output/comment.json @@ -6,60 +6,5 @@ "value": "String", "id": "String" }, - "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "comments": { - "type": "to_many", - "target": "comment", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - } - } + "associations": {} } \ No newline at end of file diff --git a/src/output/data.json b/src/output/data.json index 566b41a..86fa18a 100644 --- a/src/output/data.json +++ b/src/output/data.json @@ -8,51 +8,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "comments": { "type": "to_many", "target": "comment", diff --git a/src/output/factor.json b/src/output/factor.json index 4e32256..381f30d 100644 --- a/src/output/factor.json +++ b/src/output/factor.json @@ -8,7 +8,7 @@ "id": "String" }, "associations": { - "measurementType": { + "factorType": { "type": "to_one", "target": "ontology_annotation", "targetStorageType": "sql", @@ -17,42 +17,6 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "comments": { "type": "to_many", "target": "comment", @@ -61,15 +25,6 @@ "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/factor_value.json b/src/output/factor_value.json index a46ed42..d6840a9 100644 --- a/src/output/factor_value.json +++ b/src/output/factor_value.json @@ -9,69 +9,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "comments": { - "type": "to_many", - "target": "comment", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "category": { "type": "to_one", "target": "factor", @@ -98,6 +35,15 @@ "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/investigation.json b/src/output/investigation.json index 42fc5e2..bb80915 100644 --- a/src/output/investigation.json +++ b/src/output/investigation.json @@ -16,45 +16,36 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { + "ontologySourceReferences": { "type": "to_many", - "target": "data", + "target": "ontology_source_reference", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "characteristicCategories": { + "publications": { "type": "to_many", - "target": "material_attribute", + "target": "publication", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "unitCategories": { + "people": { "type": "to_many", - "target": "ontology_annotation", + "target": "person", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "processSequence": { + "studies": { "type": "to_many", - "target": "process", + "target": "study", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", @@ -69,78 +60,6 @@ "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "factor", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/material.json b/src/output/material.json index cb8e08d..525565f 100644 --- a/src/output/material.json +++ b/src/output/material.json @@ -10,45 +10,18 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { + "characteristics": { "type": "to_many", - "target": "ontology_annotation", + "target": "material_attribute_value", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "processSequence": { + "derivesFrom": { "type": "to_many", - "target": "process", + "target": "material", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", @@ -63,105 +36,6 @@ "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/material_attribute.json b/src/output/material_attribute.json index f46e85c..9765ef7 100644 --- a/src/output/material_attribute.json +++ b/src/output/material_attribute.json @@ -6,132 +6,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "comments": { - "type": "to_many", - "target": "comment", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "factor", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "characteristicType": { "type": "to_one", "target": "ontology_annotation", diff --git a/src/output/material_attribute_value.json b/src/output/material_attribute_value.json index a2ec8cb..aff9642 100644 --- a/src/output/material_attribute_value.json +++ b/src/output/material_attribute_value.json @@ -9,69 +9,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "comments": { - "type": "to_many", - "target": "comment", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "category": { "type": "to_one", "target": "material_attribute", @@ -99,45 +36,9 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { + "comments": { "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", + "target": "comment", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", diff --git a/src/output/ontology_annotation.json b/src/output/ontology_annotation.json index ffd44fe..3668a48 100644 --- a/src/output/ontology_annotation.json +++ b/src/output/ontology_annotation.json @@ -9,51 +9,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "comments": { "type": "to_many", "target": "comment", @@ -62,105 +17,6 @@ "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/ontology_source_reference.json b/src/output/ontology_source_reference.json index 96115c9..17c9441 100644 --- a/src/output/ontology_source_reference.json +++ b/src/output/ontology_source_reference.json @@ -10,51 +10,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "comments": { "type": "to_many", "target": "comment", @@ -63,105 +18,6 @@ "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/organization.json b/src/output/organization.json index e9f7185..7b5ba09 100644 --- a/src/output/organization.json +++ b/src/output/organization.json @@ -5,159 +5,5 @@ "name": "String", "id": "String" }, - "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "comments": { - "type": "to_many", - "target": "comment", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - } - } + "associations": {} } \ No newline at end of file diff --git a/src/output/person.json b/src/output/person.json index b62d5cc..bdde560 100644 --- a/src/output/person.json +++ b/src/output/person.json @@ -15,34 +15,7 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { + "roles": { "type": "to_many", "target": "ontology_annotation", "targetStorageType": "sql", @@ -51,15 +24,6 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "comments": { "type": "to_many", "target": "comment", @@ -68,114 +32,6 @@ "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "roles": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/process.json b/src/output/process.json index 550465a..aaf7544 100644 --- a/src/output/process.json +++ b/src/output/process.json @@ -20,168 +20,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "comments": { - "type": "to_many", - "target": "comment", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "roles": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "executesProtocol": { "type": "to_one", "target": "protocol", @@ -280,6 +118,15 @@ "reverseAssociation": "TO-DO", "targetKey": "material_id", "keysIn": "material" + }, + "comments": { + "type": "to_many", + "target": "comment", + "targetStorageType": "sql", + "implementation": "foreignkeys", + "reverseAssociation": "TO-DO", + "targetKey": "To-Do-Key", + "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/process_parameter_value.json b/src/output/process_parameter_value.json index 64ba2f5..17c5af5 100644 --- a/src/output/process_parameter_value.json +++ b/src/output/process_parameter_value.json @@ -9,69 +9,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "comments": { - "type": "to_many", - "target": "comment", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "category": { "type": "to_one", "target": "protocol_parameter", @@ -99,72 +36,9 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "roles": { + "comments": { "type": "to_many", - "target": "ontology_annotation", + "target": "comment", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", diff --git a/src/output/protocol.json b/src/output/protocol.json index 5cc1a8c..e1713ba 100644 --- a/src/output/protocol.json +++ b/src/output/protocol.json @@ -12,7 +12,7 @@ "id": "String" }, "associations": { - "measurementType": { + "protocolType": { "type": "to_one", "target": "ontology_annotation", "targetStorageType": "sql", @@ -21,36 +21,9 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { + "parameters": { "type": "to_many", - "target": "process", + "target": "protocol_parameter", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", @@ -65,240 +38,6 @@ "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "roles": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "executesProtocol": { - "type": "to_one", - "target": "protocol", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "parameterValues": { - "type": "to_many", - "target": "process_parameter_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "previousProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "nextProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "inputs_source": { - "type": "to_one", - "target": "source", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "source_id", - "keysIn": "source" - }, - "inputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "inputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "inputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "outputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "outputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "outputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "parameterName": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "protocolType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "parameters": { - "type": "to_many", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/protocol_parameter.json b/src/output/protocol_parameter.json index 3dd94ab..dad1894 100644 --- a/src/output/protocol_parameter.json +++ b/src/output/protocol_parameter.json @@ -7,7 +7,7 @@ "id": "String" }, "associations": { - "measurementType": { + "parameterName": { "type": "to_one", "target": "ontology_annotation", "targetStorageType": "sql", @@ -16,42 +16,6 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "comments": { "type": "to_many", "target": "comment", @@ -60,222 +24,6 @@ "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "roles": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "executesProtocol": { - "type": "to_one", - "target": "protocol", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "parameterValues": { - "type": "to_many", - "target": "process_parameter_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "previousProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "nextProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "inputs_source": { - "type": "to_one", - "target": "source", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "source_id", - "keysIn": "source" - }, - "inputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "inputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "inputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "outputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "outputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "outputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "parameterName": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/publication.json b/src/output/publication.json index 5f26af6..01c27cf 100644 --- a/src/output/publication.json +++ b/src/output/publication.json @@ -11,7 +11,7 @@ "id": "String" }, "associations": { - "measurementType": { + "status": { "type": "to_one", "target": "ontology_annotation", "targetStorageType": "sql", @@ -20,42 +20,6 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "comments": { "type": "to_many", "target": "comment", @@ -64,249 +28,6 @@ "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "roles": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "executesProtocol": { - "type": "to_one", - "target": "protocol", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "parameterValues": { - "type": "to_many", - "target": "process_parameter_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "previousProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "nextProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "inputs_source": { - "type": "to_one", - "target": "source", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "source_id", - "keysIn": "source" - }, - "inputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "inputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "inputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "outputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "outputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "outputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "parameterName": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "protocolType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "parameters": { - "type": "to_many", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "status": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" } } } \ No newline at end of file diff --git a/src/output/sample.json b/src/output/sample.json index 085dd0b..61f6730 100644 --- a/src/output/sample.json +++ b/src/output/sample.json @@ -10,141 +10,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "comments": { - "type": "to_many", - "target": "comment", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "characteristics": { "type": "to_many", "target": "material_attribute_value", @@ -154,162 +19,27 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "derivesFrom": { - "type": "to_many", - "target": "source", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "roles": { + "factorValues": { "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "executesProtocol": { - "type": "to_one", - "target": "protocol", + "target": "factor_value", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "parameterValues": { + "derivesFrom": { "type": "to_many", - "target": "process_parameter_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "previousProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "nextProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "inputs_source": { - "type": "to_one", "target": "source", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", - "targetKey": "source_id", - "keysIn": "source" - }, - "inputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "inputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "inputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "outputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "outputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "outputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "parameterName": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "protocolType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "parameters": { - "type": "to_many", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "status": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorValues": { + "comments": { "type": "to_many", - "target": "factor_value", + "target": "comment", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", diff --git a/src/output/source.json b/src/output/source.json index 7409f78..b35b3fd 100644 --- a/src/output/source.json +++ b/src/output/source.json @@ -8,141 +8,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "comments": { - "type": "to_many", - "target": "comment", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "publications": { - "type": "to_many", - "target": "publication", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "people": { - "type": "to_many", - "target": "person", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "studies": { - "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "characteristics": { "type": "to_many", "target": "material_attribute_value", @@ -152,162 +17,9 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "derivesFrom": { - "type": "to_many", - "target": "source", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "roles": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "executesProtocol": { - "type": "to_one", - "target": "protocol", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "parameterValues": { - "type": "to_many", - "target": "process_parameter_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "previousProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "nextProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "inputs_source": { - "type": "to_one", - "target": "source", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "source_id", - "keysIn": "source" - }, - "inputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "inputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "inputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "outputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "outputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "outputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "parameterName": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "protocolType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "parameters": { - "type": "to_many", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "status": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorValues": { + "comments": { "type": "to_many", - "target": "factor_value", + "target": "comment", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", diff --git a/src/output/study.json b/src/output/study.json index 4ad850e..a0db429 100644 --- a/src/output/study.json +++ b/src/output/study.json @@ -22,105 +22,6 @@ "id": "String" }, "associations": { - "measurementType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "dataFiles": { - "type": "to_many", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicCategories": { - "type": "to_many", - "target": "material_attribute", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "unitCategories": { - "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "processSequence": { - "type": "to_many", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "comments": { - "type": "to_many", - "target": "comment", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "category": { - "type": "to_one", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "value": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "ontology_annotation_id", - "keysIn": "ontology_annotation" - }, - "unit": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "ontologySourceReferences": { - "type": "to_many", - "target": "ontology_source_reference", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, "publications": { "type": "to_many", "target": "publication", @@ -139,17 +40,8 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "studies": { + "studyDesignDescriptors": { "type": "to_many", - "target": "study", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "characteristicType": { - "type": "to_one", "target": "ontology_annotation", "targetStorageType": "sql", "implementation": "foreignkeys", @@ -157,35 +49,8 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "characteristics": { - "type": "to_many", - "target": "material_attribute_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "derivesFrom": { - "type": "to_many", - "target": "source", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "roles": { + "protocols": { "type": "to_many", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "executesProtocol": { - "type": "to_one", "target": "protocol", "targetStorageType": "sql", "implementation": "foreignkeys", @@ -193,26 +58,8 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "parameterValues": { + "processSequence": { "type": "to_many", - "target": "process_parameter_value", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "previousProcess": { - "type": "to_one", - "target": "process", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "nextProcess": { - "type": "to_one", "target": "process", "targetStorageType": "sql", "implementation": "foreignkeys", @@ -220,144 +67,45 @@ "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "inputs_source": { - "type": "to_one", - "target": "source", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "source_id", - "keysIn": "source" - }, - "inputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "inputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "inputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "outputs_sample": { - "type": "to_one", - "target": "sample", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "sample_id", - "keysIn": "sample" - }, - "outputs_data": { - "type": "to_one", - "target": "data", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "data_id", - "keysIn": "data" - }, - "outputs_material": { - "type": "to_one", - "target": "material", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "material_id", - "keysIn": "material" - }, - "parameterName": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "protocolType": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "parameters": { - "type": "to_many", - "target": "protocol_parameter", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "status": { - "type": "to_one", - "target": "ontology_annotation", - "targetStorageType": "sql", - "implementation": "foreignkeys", - "reverseAssociation": "TO-DO", - "targetKey": "To-Do-Key", - "keysIn": "To-Do-keyIn" - }, - "factorValues": { + "assays": { "type": "to_many", - "target": "factor_value", + "target": "assay", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "studyDesignDescriptors": { + "factors": { "type": "to_many", - "target": "ontology_annotation", + "target": "factor", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "protocols": { + "characteristicCategories": { "type": "to_many", - "target": "protocol", + "target": "material_attribute", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "assays": { + "unitCategories": { "type": "to_many", - "target": "assay", + "target": "ontology_annotation", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", "targetKey": "To-Do-Key", "keysIn": "To-Do-keyIn" }, - "factors": { + "comments": { "type": "to_many", - "target": "factor", + "target": "comment", "targetStorageType": "sql", "implementation": "foreignkeys", "reverseAssociation": "TO-DO", diff --git a/src/utils.js b/src/utils.js index c038510..f964b11 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,13 +1,7 @@ const fs = require('fs'); let PARENT, VERBOSE = true, - relationMapping = {}, - zendroAttributes = { - model: PARENT, - storageType: "sql", - attributes: {}, - associations: {}, - }; + relationMapping = {}; const mapIsaTypeToZendroType = { string: "String", "date-time": "DateTime", @@ -18,8 +12,12 @@ const mapIsaTypeToZendroType = { const processProperties = function (propertiesObj, parentName) { PARENT = getSchemaName(parentName); - zendroAttributes.attributes = {}; - zendroAttributes.model = PARENT; + let zendroAttributes = { + model: PARENT, + storageType: "sql", + attributes: {}, + associations: {}, + } const props = Object.entries(propertiesObj); props.forEach((prop) => { const propDef = prop[1];