commit 65ee11ffdbc48dccaa8ef43f4f5f897cd652c83b
parent f9a9891d54bb108f0e35e09fd4f417b675388950
Author: Lynn Foster <foster.j.lynn@gmail.com>
Date: Thu, 7 Dec 2017 15:04:56 -0600
Merge pull request #247 from valueflows/json-schemas
First json-schemas, with some ??s.
Diffstat:
2 files changed, 122 insertions(+), 0 deletions(-)
diff --git a/json-schemas/EconomicEvent.json b/json-schemas/EconomicEvent.json
@@ -0,0 +1,79 @@
+{
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "title": "EconomicEvent",
+ "description": "An inflow or outflow of an economic resource in relation to a process and/or exchange.",
+ "type": "object",
+ "properties": {
+ "action": {
+ "description": "Relates a process input or output to a verb, such as consume, produce, work, improve, etc.",
+ "type": "string"
+ },
+ "affectedQuantity": {
+ "description": "The quantity and unit of the event. This is the quantity that could be used to increment or decrement a resource, depending on the type of resource and type of event.",
+ "type": "QuantityValue"
+ },
+ "affects": {
+ "description": "The economic resource that is decremented or incremented by the economic event, or just what the economic event is about.",
+ "type": "EconomicResource"
+ },
+ "provider": {
+ "description": "The economic agent from whom the economic event is initiated.",
+ "type": "Agent"
+ },
+ "receiver": {
+ "description": "The economic agent whom the economic event is for.",
+ "type": "Agent"
+ },
+ "start": {
+ "description": "The starting date and optionally time of the economic event.",
+ "type": "??"
+ },
+ "duration": {
+ "description": "The observed duration of the economic event.",
+ "type": "??"
+ },
+ "note": {
+ "description": "A textual comment or description.",
+ "type": "string"
+ },
+ "inputOf": {
+ "description": "The process for which this economic event describes an input.",
+ "type": "Process"
+ },
+ "outputOf": {
+ "description": "The process for which this economic event describes an output.",
+ "type": "Process"
+ },
+ "fulfills": {
+ "description": "References a commitment which is completely or partially fulfilled by an economic event.",
+ "type": "array",
+ "items": {
+ "type": "Fulfillment"
+ },
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "creates": {
+ "description": "References a commitment that was fully or partially created because of the economic event, often based on a prior agreement.",
+ "type": "array",
+ "items": {
+ "type": "Reciprocity"
+ },
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "appreciationOf": {
+ "description": "The economic event being appreciated (gift economy).",
+ "type": "Appreciation"
+ },
+ "appreciationWith": {
+ "description": "The economic event implemented in appreciation (gift economy).",
+ "type": "Appreciation"
+ },
+ "under": {
+ "description": "Reference to an agreement between agents which specifies the rules or policies which govern this event.",
+ "type": "Agreement"
+ },
+ },
+ "required": ["action", "affectedQuantity", "start", "affects" ]
+}+
\ No newline at end of file
diff --git a/json-schemas/EconomicResource.json b/json-schemas/EconomicResource.json
@@ -0,0 +1,41 @@
+{
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "title": "EconomicResource",
+ "description": "A resource which is useful to people or the ecosystem.",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "An informal or formal textual identifier for an object. Does not imply uniqueness.",
+ "type": "string"
+ },
+ "quantity": {
+ "description": "The current amount and unit of the economic resource.",
+ "type": "QuantityValue"
+ },
+ "resourceClassifiedAs": {
+ "description": "A resource's primary classification, as part of describing that resource.",
+ "type": "ResourceClassification"
+ },
+ "trackingIdentifier": {
+ "description": "Sometimes called lot number, used for trackable batched resources. Sometimes called serial number, used when each item must have a trackable identifier (like a computer). Could also be used for other unique tracking identifiers needed for resources.",
+ "type": "string"
+ },
+ "currentLocation": {
+ "description": "The current place an economic resource is located. Could be at any level of granularity, from a town to an address to a warehouse location. Should be mappable.",
+ "type": "Place"
+ },
+ "note": {
+ "description": "A textual comment or description.",
+ "type": "string"
+ },
+ "contains": {
+ "description": "Used when a stock economic resource contains items also defined as economic resources.",
+ "type": "EconomicResource"
+ },
+ "underlyingResource": {
+ "description": "A more concrete resource upon which a resource is based.",
+ "type": "EconomicResource"
+ },
+ },
+ "required": ["action", "affectedQuantity", "start", "affects" ]
+}+
\ No newline at end of file