From dfa91f265c47b072bbbd34b3bfab20de77e831b0 Mon Sep 17 00:00:00 2001 From: Lynn Foster Date: Sun, 3 Nov 2019 10:54:46 -0600 Subject: [PATCH] Fixes for VF v.4 --- schemas/Action.json | 12 +++++++++++- schemas/AgentRelationshipRole.json | 4 ++-- schemas/Claim.json | 6 +++--- schemas/Commitment.json | 19 +++---------------- schemas/EconomicEvent.json | 14 ++------------ schemas/EconomicResource.json | 4 ++-- schemas/Fulfillment.json | 4 ++-- schemas/Intent.json | 13 ++++--------- schemas/Measure.json | 18 ++++++++++++++++++ schemas/Plan.json | 2 +- schemas/Process.json | 10 ---------- schemas/QuantityValue.json | 18 ------------------ schemas/RecipeFlow.json | 12 ++---------- schemas/Satisfaction.json | 4 ++-- schemas/Settlement.json | 4 ++-- schemas/Unit.json | 18 ++++++++++++++++++ 16 files changed, 72 insertions(+), 90 deletions(-) create mode 100644 schemas/Measure.json delete mode 100644 schemas/QuantityValue.json create mode 100644 schemas/Unit.json diff --git a/schemas/Action.json b/schemas/Action.json index 9bae683..5de1936 100644 --- a/schemas/Action.json +++ b/schemas/Action.json @@ -13,7 +13,17 @@ "resourceEffect": { "description": "The effect of an economic event on a resource, increment, decrement, no effect, or decrement resource and increment 'to' resource.", "type": "string", - "enum": ["+", "-", "0", "-+"] + "enum": ["increment", "decrement", "noEffect", "decrementIncrement"] + }, + "inputOutput": { + "description": "Denotes if a process input or output, or not related to a process.", + "type": "string", + "enum": ["input", "output", "notApplicable"] + }, + "pairsWith": { + "description": "The action that should be included on the other direction of the process, for example accept with modify.", + "type": "string", + "enum": ["notApplicable", "dropoff", "pickup", "accept", "modify", "pass", "fail"] } }, "required": ["name", "resourceEffect"] diff --git a/schemas/AgentRelationshipRole.json b/schemas/AgentRelationshipRole.json index a0e5503..52a25e6 100644 --- a/schemas/AgentRelationshipRole.json +++ b/schemas/AgentRelationshipRole.json @@ -5,11 +5,11 @@ "description": "A relationship role defining the kind of association one agent can have with another.", "type": "object", "properties": { - "label": { + "roleLabel": { "description": "The human readable name of the role, from the subject to the object. For example, 'is member of'.", "type": "string" }, - "inverseLabel": { + "inverseRoleLabel": { "description": "The human readable name of the role, from the object to the subject. For example, 'has member'.", "type": "string" }, diff --git a/schemas/Claim.json b/schemas/Claim.json index edda3b3..3dd9176 100644 --- a/schemas/Claim.json +++ b/schemas/Claim.json @@ -11,11 +11,11 @@ }, "resourceQuantity": { "description": "The amount and unit of the economic resource counted or inventoried.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "effortQuantity": { "description": "The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "resourceClassifiedAs": { "description": "References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping.", @@ -41,7 +41,7 @@ "description": "Grouping around something to create a boundary or context, used for documenting, accounting, planning.", "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json" }, - "before": { + "due": { "description": "The due date/time of the claim.", "type": "string", "format": "date-time" diff --git a/schemas/Commitment.json b/schemas/Commitment.json index dea4a25..3bb94ed 100644 --- a/schemas/Commitment.json +++ b/schemas/Commitment.json @@ -11,11 +11,11 @@ }, "resourceQuantity": { "description": "The amount and unit of the economic resource counted or inventoried. This is the quantity that could be used to increment or decrement a resource, depending on the type of resource and resource effect of action.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "effortQuantity": { "description": "The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "resourceInventoriedAs": { "description": "Economic resource involved in the commitment.", @@ -33,14 +33,6 @@ "description": "The primary resource specification or definition of an existing or potential economic resource. A resource will have only one, as this specifies exactly what the resource is.", "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/ResourceSpecification.json" }, - "stage": { - "description": "References the ProcessSpecification of the last process the desired economic resource went through. Stage is used when the last process is important for finding proper resources, such as where the publishing process wants only documents that have gone through the editing process.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/ProcessSpecification.json" - }, - "state": { - "description": "The state of the desired economic resource (pass or fail), after coming out of a test or review process.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Action.json" - }, "provider": { "description": "The economic agent from whom the commitment is initiated.", "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json" @@ -68,16 +60,11 @@ "type": "string", "format": "date-time" }, - "before": { + "due": { "description": "The due date/time of the commitment.", "type": "string", "format": "date-time" }, - "after": { - "description": "The commitment can start after this date/time.", - "type": "string", - "format": "date-time" - }, "created": { "description": "The creation time of the commitment.", "type": "string", diff --git a/schemas/EconomicEvent.json b/schemas/EconomicEvent.json index 7ef41a1..f5645e4 100644 --- a/schemas/EconomicEvent.json +++ b/schemas/EconomicEvent.json @@ -11,11 +11,11 @@ }, "resourceQuantity": { "description": "The amount and unit of the economic resource counted or inventoried. This is the quantity that could be used to increment or decrement a resource, depending on the type of resource and resource effect of action.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "effortQuantity": { "description": "The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "resourceInventoriedAs": { "description": "Economic resource involved in the economic event.", @@ -64,16 +64,6 @@ "type": "string", "format": "date-time" }, - "before": { - "description": "The economic event occurred prior to this date/time.", - "type": "string", - "format": "date-time" - }, - "after": { - "description": "The economic event occurred after this date/time.", - "type": "string", - "format": "date-time" - }, "atLocation": { "description": "The place where an economic event occurs. Usually mappable.", "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/SpatialThing.json" diff --git a/schemas/EconomicResource.json b/schemas/EconomicResource.json index d8c70df..79e6e3a 100644 --- a/schemas/EconomicResource.json +++ b/schemas/EconomicResource.json @@ -11,11 +11,11 @@ }, "accountingQuantity": { "description": "The current amount and unit of the economic resource for which the agent has primary rights and responsibilities, sometimes thought of as ownership. This can be either stored or derived from economic events affecting the resource.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "onhandQuantity": { "description": "The current amount and unit of the economic resource which is under direct control of the agent. It may be more or less than the accounting quantity. This can be either stored or derived from economic events affecting the resource.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "conformsTo": { "description": "The primary resource knowledge specification or definition of an existing or potential resource.", diff --git a/schemas/Fulfillment.json b/schemas/Fulfillment.json index 3d8fb6b..c4a3666 100644 --- a/schemas/Fulfillment.json +++ b/schemas/Fulfillment.json @@ -15,11 +15,11 @@ }, "resourceQuantity": { "description": "The amount and unit of the economic resource counted or inventoried.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "effortQuantity": { "description": "The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "note": { "description": "A textual comment or description.", diff --git a/schemas/Intent.json b/schemas/Intent.json index 271dc50..2797a79 100644 --- a/schemas/Intent.json +++ b/schemas/Intent.json @@ -15,15 +15,15 @@ }, "resourceQuantity": { "description": "The amount and unit of the economic resource counted or inventoried.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "effortQuantity": { "description": "The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "availableQuantity": { "description": "The total quantity of the offered resource available.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "resourceInventoriedAs": { "description": "Economic resource involved in the intent.", @@ -68,16 +68,11 @@ "type": "string", "format": "date-time" }, - "before": { + "due": { "description": "The due date/time of the intent.", "type": "string", "format": "date-time" }, - "after": { - "description": "The intent can start after this date/time.", - "type": "string", - "format": "date-time" - }, "finished": { "description": "The intent is complete or not. This is irrespective of if the original goal has been met, and indicates that no more will be done.", "type": "boolean" diff --git a/schemas/Measure.json b/schemas/Measure.json new file mode 100644 index 0000000..86e338e --- /dev/null +++ b/schemas/Measure.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json", + "title": "Measure", + "description": "A numeric value with its unit of measure.", + "type": "object", + "properties": { + "hasNumericalValue": { + "description": "A numeric value.", + "type": "number" + }, + "hasUnit": { + "description": "A unit of measure.", + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Unit.json" + } + }, + "required": ["hasNumericalValue", "hasUnit"] +} diff --git a/schemas/Plan.json b/schemas/Plan.json index b3eae0c..3571bce 100644 --- a/schemas/Plan.json +++ b/schemas/Plan.json @@ -14,7 +14,7 @@ "type": "string", "format": "date-time" }, - "before": { + "due": { "description": "The due date/time of the plan.", "type": "string", "format": "date-time" diff --git a/schemas/Process.json b/schemas/Process.json index 232ff7e..7119e91 100644 --- a/schemas/Process.json +++ b/schemas/Process.json @@ -19,16 +19,6 @@ "type": "string", "format": "date-time" }, - "before": { - "description": "The due date/time of the process.", - "type": "string", - "format": "date-time" - }, - "after": { - "description": "The process can start after this date/time.", - "type": "string", - "format": "date-time" - }, "classifiedAs": { "description": "References one or more concepts in a common taxonomy or other classification scheme for purposes of categorization or grouping.", "type": "array", diff --git a/schemas/QuantityValue.json b/schemas/QuantityValue.json deleted file mode 100644 index 26fc9d9..0000000 --- a/schemas/QuantityValue.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json", - "title": "QuantityValue", - "description": "A numeric value with a unit of measure.", - "type": "object", - "properties": { - "numericValue": { - "description": "A numeric value.", - "type": "number" - }, - "unit": { - "description": "A unit of measure.", - "type": "string" - } - }, - "required": ["numericValue", "unit"] -} diff --git a/schemas/RecipeFlow.json b/schemas/RecipeFlow.json index cb615f3..33d1d69 100644 --- a/schemas/RecipeFlow.json +++ b/schemas/RecipeFlow.json @@ -11,11 +11,11 @@ }, "resourceQuantity": { "description": "The amount and unit of the economic resource counted or inventoried.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "effortQuantity": { "description": "The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "recipeFlowResource": { "description": "The resource definition referenced by this flow in the recipe.", @@ -29,14 +29,6 @@ "description": "Relates an output flow to its process in a recipe.", "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/RecipeProcess.json" }, - "stage": { - "description": "References the ProcessSpecification of the last process the desired economic resource went through. Stage is used when the last process is important for finding proper resources, such as where the publishing process wants only documents that have gone through the editing process.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/ProcessSpecification.json" - }, - "state": { - "description": "The state of the desired economic resource (pass or fail), after coming out of a test or review process.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Action.json" - }, "note": { "description": "A textual comment or description.", "type": "string" diff --git a/schemas/Satisfaction.json b/schemas/Satisfaction.json index 181dd5c..14e5c13 100644 --- a/schemas/Satisfaction.json +++ b/schemas/Satisfaction.json @@ -15,11 +15,11 @@ }, "resourceQuantity": { "description": "The amount and unit of the economic resource counted or inventoried.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "effortQuantity": { "description": "The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "note": { "description": "A textual comment or description.", diff --git a/schemas/Settlement.json b/schemas/Settlement.json index ae78bbf..20ec574 100644 --- a/schemas/Settlement.json +++ b/schemas/Settlement.json @@ -14,11 +14,11 @@ }, "resourceQuantity": { "description": "The amount and unit of the economic resource counted or inventoried.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "effortQuantity": { "description": "The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" + "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Measure.json" }, "note": { "description": "A textual comment or description.", diff --git a/schemas/Unit.json b/schemas/Unit.json new file mode 100644 index 0000000..c4e7002 --- /dev/null +++ b/schemas/Unit.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Unit.json", + "title": "Unit", + "description": "A unit of measure.", + "type": "object", + "properties": { + "label": { + "description": "A standard label for the unit of measure.", + "type": "string" + }, + "sybmol": { + "description": "A standard symbol of the unit of measure.", + "type": "string" + } + }, + "required": ["label"] +}