Line 4: |
Line 4: |
| "subject": "Property:HasSubject", | | "subject": "Property:HasSubject", |
| "predicate": "Property:HasProperty", | | "predicate": "Property:HasProperty", |
| + | "property": "Property:HasProperty", |
| + | "quantity": "Property:HasProperty", |
| "object": "Property:HasObject", | | "object": "Property:HasObject", |
| + | "value": "Property:HasObject", |
| + | "unit": "Property:HasUnit", |
| "substatements": "Property:HasStatement", | | "substatements": "Property:HasStatement", |
| "label": "Property:HasLabel" | | "label": "Property:HasLabel" |
| }, | | }, |
− | "title": "Statement", | + | "common_definitions": {}, |
| "type": "object", | | "type": "object", |
| "id": "statement", | | "id": "statement", |
| "required": [ | | "required": [ |
− | "uuid", | + | "uuid" |
− | "predicate"
| |
| ], | | ], |
− | "headerTemplate": "... {{self.predicate}} ...",
| |
| "properties": { | | "properties": { |
| "uuid": { | | "uuid": { |
Line 58: |
Line 60: |
| } | | } |
| }, | | }, |
− | "predicate": { | + | "substatements": { |
− | "type": "string",
| + | "title": "Substatements", |
− | "format": "autocomplete",
| + | "type": "array", |
− | "title": "Predicate", | + | "format": "tabs", |
| + | "items": { |
| + | "$ref": "#" |
| + | } |
| + | } |
| + | }, |
| + | "oneOf": [ |
| + | { |
| + | "$ref": "#/common_definitions", |
| + | "title": "Object Statement", |
| + | "headerTemplate": "... {{self.predicate}} ...", |
| + | "required": [ |
| + | "uuid", |
| + | "predicate", |
| + | "object" |
| + | ], |
| + | "properties": { |
| + | "predicate": { |
| + | "type": "string", |
| + | "format": "autocomplete", |
| + | "title": "Predicate", |
| + | "title*": { |
| + | "de": "Prädikat" |
| + | }, |
| + | "options": { |
| + | "autocomplete": { |
| + | "category": "Category:Property" |
| + | } |
| + | } |
| + | }, |
| + | "object": { |
| + | "type": "string", |
| + | "format": "autocomplete", |
| + | "title": "Object", |
| + | "title*": { |
| + | "de": "Objekt" |
| + | }, |
| + | "options": { |
| + | "autocomplete": { |
| + | "category": "Category:Entity", |
| + | "query_filter_property": "HasName" |
| + | } |
| + | } |
| + | } |
| + | } |
| + | }, |
| + | { |
| + | "$ref": "#/common_definitions", |
| + | "title": "Data Statement", |
| "title*": { | | "title*": { |
− | "de": "Prädikat" | + | "de": "Datenangabe" |
| }, | | }, |
− | "options": { | + | "headerTemplate": "... {{self.property}} ...", |
− | "autocomplete": { | + | "required": [ |
− | "category": "Category:Property" | + | "uuid", |
| + | "property", |
| + | "value" |
| + | ], |
| + | "properties": { |
| + | "property": { |
| + | "type": "string", |
| + | "format": "autocomplete", |
| + | "title": "Property", |
| + | "title*": { |
| + | "de": "Attribut" |
| + | }, |
| + | "options": { |
| + | "autocomplete": { |
| + | "category": "Category:DataProperty" |
| + | } |
| + | } |
| + | }, |
| + | "value": { |
| + | "type": "string", |
| + | "title": "Value", |
| + | "title*": { |
| + | "de": "Wert" |
| + | } |
| } | | } |
| } | | } |
| }, | | }, |
− | "object": { | + | { |
− | "type": "string", | + | "$ref": "#/common_definitions", |
− | "format": "autocomplete",
| + | "title": "Quantity Statement", |
− | "title": "Object", | |
| "title*": { | | "title*": { |
− | "de": "Objekt" | + | "de": "Größenangabe" |
| }, | | }, |
− | "options": { | + | "headerTemplate": "... {{self.quantity}} ...", |
− | "autocomplete": { | + | "required": [ |
− | "category": "Category:Entity", | + | "uuid", |
− | "query_filter_property": "HasName" | + | "quantity", |
| + | "value", |
| + | "unit", |
| + | "unit_symbol", |
| + | "numerical_value" |
| + | ], |
| + | "properties": { |
| + | "quantity": { |
| + | "type": "string", |
| + | "format": "autocomplete", |
| + | "title": "Property", |
| + | "title*": { |
| + | "de": "Attribut" |
| + | }, |
| + | "options": { |
| + | "autocomplete": { |
| + | "category": "Category:QuantityProperty" |
| + | } |
| + | } |
| + | }, |
| + | "numerical_value": { |
| + | "type": "string", |
| + | "format": "number", |
| + | "title": "Numerical value", |
| + | "title*": { |
| + | "de": "Zahlenwert" |
| + | } |
| + | }, |
| + | "unit": { |
| + | "type": "string", |
| + | "format": "autocomplete", |
| + | "title": "Unit", |
| + | "title*": { |
| + | "de": "Einheit" |
| + | }, |
| + | "watch": { |
| + | "quantity": "statement.quantity", |
| + | "unit_symbol": "statement.unit_symbol" |
| + | }, |
| + | "options": { |
| + | "autocomplete": { |
| + | "query": "[[-HasInputUnit::{{$(quantity)}}]]|?Display_title_of=label", |
| + | "render_template": { |
| + | "type": [ |
| + | "handlebars" |
| + | ], |
| + | "value": "{{result.printouts.label.[0]}}" |
| + | }, |
| + | "field_maps": [ |
| + | { |
| + | "source_path": "$", |
| + | "template": "{{{result.printouts.label.[0]}}}", |
| + | "target_path": "$(unit_symbol)" |
| + | } |
| + | ] |
| + | } |
| + | } |
| + | }, |
| + | "unit_symbol": { |
| + | "type": "string", |
| + | "options": { |
| + | "hidden": true |
| + | } |
| + | }, |
| + | "value": { |
| + | "type": "string", |
| + | "title": "Value", |
| + | "title*": { |
| + | "de": "Wert" |
| + | }, |
| + | "watch": { |
| + | "numerical_value": "statement.numerical_value", |
| + | "unit_symbol": "statement.unit_symbol" |
| + | }, |
| + | "template": "{{{numerical_value}}} {{{unit_symbol}}}", |
| + | "options": { |
| + | "hidden": true |
| + | } |
| } | | } |
− | }
| |
− | },
| |
− | "substatements": {
| |
− | "title": "Substatements",
| |
− | "type": "array",
| |
− | "format": "tabs",
| |
− | "items": {
| |
− | "$ref": "#"
| |
| } | | } |
| } | | } |
− | } | + | ] |
| } | | } |