valueflows

valueflows docs
git clone https://s.sonu.ch/~srfsh/valueflows.git
Log | Files | Refs | README

commit 43ae40dda95bdaf1b422da5396a21d9afef64d8f
parent 16ddafac94473d3cbaaa5c35009547e790c6fef6
Author: Lynn Foster <foster.j.lynn@gmail.com>
Date:   Wed, 21 Aug 2019 13:59:38 -0500

moved all json schemas to separate repo (#571)

* moved all json schemas to separate repo

* ttl fixes from json-schema exercise

Diffstat:
Djson-schemas/Agent.json | 39---------------------------------------
Djson-schemas/AgentRelationship.json | 22----------------------
Djson-schemas/EconomicEvent.json | 81-------------------------------------------------------------------------------
Djson-schemas/EconomicResource.json | 42------------------------------------------
Djson-schemas/Process.json | 71-----------------------------------------------------------------------
Djson-schemas/QuantityValue.json | 18------------------
Djson-schemas/README.md | 5-----
Djson-schemas/sample-create-resource.json | 26--------------------------
Djson-schemas/sample-process-flow.json | 135-------------------------------------------------------------------------------
Mrelease-doc-in-process/all_vf.TTL | 10+++++-----
10 files changed, 5 insertions(+), 444 deletions(-)

diff --git a/json-schemas/Agent.json b/json-schemas/Agent.json @@ -1,39 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/schema#", - "id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json", - "title": "Agent", - "description": "A person or group or organization with economic agency.", - "type": "object", - "properties": { - "name": { - "description": "An informal or formal textual identifier for an object. Does not imply uniqueness.", - "type": "string" - }, - "image": { - "type": "string", - "format": "uri" - }, - "url": { - "type": "string", - "format": "uri" - }, - "primaryLocation": { - "description": "The main place an agent is located, often an address where activities occur and mail can be sent. This is usually a mappable geographic location. It also could be a website address, as in the case of agents who have no physical location.", - "type": "object" - }, - "note": { - "description": "A textual comment or description.", - "type": "string" - }, - "relationships": { - "description": "Relationships with other agents.", - "type": "array", - "items": { - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/AgentRelationship.json" - }, - "minItems": 1, - "uniqueItems": true - } - }, - "required": ["name"] -} diff --git a/json-schemas/AgentRelationship.json b/json-schemas/AgentRelationship.json @@ -1,22 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/schema#", - "id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/AgentRelationship.json", - "title": "AgentRelationship", - "description": "An ongoing voluntary association between 2 Agents of any kind.", - "type": "object", - "properties": { - "subject": { - "description": "The subject of a relationship between 2 agents.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json" - }, - "relationship": { - "description": "A kind of relationship that exists between 2 agents.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/AgentRelationshipRole.json" - }, - "object": { - "description": "The object of a relationship between 2 agents.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json" - } - }, - "required": ["subject", "relationship", "object"] -} diff --git a/json-schemas/EconomicEvent.json b/json-schemas/EconomicEvent.json @@ -1,81 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/schema#", - "id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicEvent.json", - "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.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" - }, - "affects": { - "description": "The economic resource that is decremented or incremented by the economic event, or just what the economic event is about.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicResource.json" - }, - "provider": { - "description": "The economic agent from whom the economic event is initiated.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json" - }, - "receiver": { - "description": "The economic agent whom the economic event is for.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agent.json" - }, - "start": { - "description": "The starting date and optionally time of the economic event.", - "type": "string", - "format": "date-time" - }, - "duration": { - "description": "The observed duration of the economic event.", - "type": "object" - }, - "note": { - "description": "A textual comment or description.", - "type": "string" - }, - "inputOf": { - "description": "The process for which this economic event describes an input.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Process.json" - }, - "outputOf": { - "description": "The process for which this economic event describes an output.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Process.json" - }, - "fulfills": { - "description": "References a commitment which is completely or partially fulfilled by an economic event.", - "type": "array", - "items": { - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Fulfillment.json" - }, - "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": { - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Reciprocity.json" - }, - "minItems": 1, - "uniqueItems": true - }, - "appreciationOf": { - "description": "The economic event being appreciated (gift economy).", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Appreciation.json" - }, - "appreciationWith": { - "description": "The economic event implemented in appreciation (gift economy).", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Appreciation.json" - }, - "under": { - "description": "Reference to an agreement between agents which specifies the rules or policies which govern this event.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Agreement.json" - } - }, - "required": ["action", "affectedQuantity", "start", "affects" ] -} diff --git a/json-schemas/EconomicResource.json b/json-schemas/EconomicResource.json @@ -1,42 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/schema#", - "id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicResource.json", - "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" - }, - "currentQuantity": { - "description": "The current amount and unit of the economic resource.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/QuantityValue.json" - }, - "resourceClassifiedAs": { - "description": "A resource's primary classification, as part of describing that resource.", - "type": "string" - }, - "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": "string" - }, - "note": { - "description": "A textual comment or description.", - "type": "string" - }, - "contains": { - "description": "Used when a stock economic resource contains items also defined as economic resources.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicResource.json" - }, - "underlyingResource": { - "description": "A more concrete resource upon which a resource is based.", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicResource.json" - } - }, - "required": ["resourceClassifiedAs", "quantity" ] -} diff --git a/json-schemas/Process.json b/json-schemas/Process.json @@ -1,71 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/schema#", - "id": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Process.json", - "title": "Process", - "description": "An activity that changes inputs into outputs. It could transform or transport economic resource(s), as well as simply issuing a resource so that it is available.", - "type": "object", - "properties": { - "name": { - "description": "An informal or formal textual identifier for an object. Does not imply uniqueness.", - "type": "string" - }, - "plannedStart": { - "description": "The planned or estimated starting date and optionally time of the process.", - "type": "string", - "format": "date-time" - }, - "plannedDuration": { - "description": "The planned or estimated duration of the process.", - "type": "object" - }, - "processClassifiedAs": { - "description": "The primary classification that describes a process, at any level of granularity.", - "type": "object", - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/ProcessClassification.json" - }, - "isFinished": { - "type": "boolean" - }, - "note": { - "description": "A textual comment or description.", - "type": "string" - }, - "inputs": { - "description": "Economic events that bring tangible or intangible resources into the process.", - "type": "array", - "items": { - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicEvent.json" - }, - "minItems": 1, - "uniqueItems": true - }, - "outputs": { - "description": "Economic events that produce or change or move tangible or intangible resources.", - "type": "array", - "items": { - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/EconomicEvent.json" - }, - "minItems": 1, - "uniqueItems": true - }, - "committedInputs": { - "description": "Planned commitments that bring tangible or intangible resources into the process.", - "type": "array", - "items": { - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Commitment.json" - }, - "minItems": 1, - "uniqueItems": true - }, - "committedOutputs": { - "description": "Planned commitments that produce or change or move tangible or intangible resources.", - "type": "array", - "items": { - "$ref": "https://raw.githubusercontent.com/valueflows/valueflows/master/json-schemas/Commitment.json" - }, - "minItems": 1, - "uniqueItems": true - } - }, - "required": ["name"] -} diff --git a/json-schemas/QuantityValue.json b/json-schemas/QuantityValue.json @@ -1,18 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/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/json-schemas/README.md b/json-schemas/README.md @@ -1,5 +0,0 @@ -## JSON schemas and examples - -This directory is to work with the [Secure Scuttlebutt](https://www.scuttlebutt.nz/) gang on using ValueFlows vocabulary to experiment with creating an economic layer on top of the ssb gossip network, using ssb messages. - -The schemas and examples here are not meant to be definitive, and in some cases have short-cut the VF vocabulary to create smaller scoped examples to try out. It is all experimental, and tailored to this experiment right now. diff --git a/json-schemas/sample-create-resource.json b/json-schemas/sample-create-resource.json @@ -1,26 +0,0 @@ -[ - { - "id": "E10-event-to-create-resource", - "action": "take", - "start": "2017-12-01", - "affects": { - "resourceClassifiedAs": "https://www.wikidata.org/wiki/Q41777871", - "currentLocation": "Mikeys basement NW corner", - "note": "Last haralson apples of the season, good storage apples.", - "trackingIdentifier": "5nw-haralson" - }, - "affectedQuantity": { - "numericValue": "10", - "unit": "kg" - }, - "provider": { - "id": "A1", - "name": "Bob" - }, - "receiver": { - "id": "A5", - "name": "Mikey" - } - } - -] diff --git a/json-schemas/sample-process-flow.json b/json-schemas/sample-process-flow.json @@ -1,135 +0,0 @@ -[ - { - "id": "P1", - "name": "Create Piezo Buzzer Pump design", - "inputs": [ - { - "action": "work", - "start": "2017-10-01", - "affects": { - "id": "R1", - "resourceClassifiedAs": "CAD design" - }, - "affectedQuantity": { - "numericValue": "4.5", - "unit": "Hours" - }, - "provider": { - "id": "A1", - "name": "Bob" - } - } - ], - "outputs": [ - { - "action": "produce", - "start": "2017-10-01", - "affects": { - "id": "R2", - "resourceClassifiedAs": "Buzzer Pump Design", - "currentLocation": "http://open-hardware-designs.org/buzzer-pump-V1/" - }, - "affectedQuantity": { - "numericValue": "1", - "unit": "Each" - } - } - ] - }, - { - "id": "P2", - "name": "3D Print Buzzer Pump parts", - "inputs": [ - { - "action": "work", - "start": "2017-10-15", - "affects": { - "id": "R3", - "resourceClassifiedAs": "3d Printing" - }, - "affectedQuantity": { - "numericValue": "2", - "unit": "Hours" - }, - "provider": { - "id": "A2", - "name": "Alice" - } - }, - { - "action": "cite", - "start": "2017-10-15", - "affects": { - "id": "R2" - }, - "affectedQuantity": { - "numericValue": "1", - "unit": "Each" - } - } - ], - "outputs": [ - { - "action": "produce", - "start": "2017-10-16", - "affects": { - "id": "R4", - "resourceClassifiedAs": "Buzzer Pump Parts", - "currentLocation": "storage-room-2x3" - }, - "affectedQuantity": { - "numericValue": "5", - "unit": "Each" - } - } - ] - }, - { - "@id": "P3", - "name": "Assemble Buzzer Pump prototype", - "inputs": [ - { - "action": "work", - "start": "2017-10-20", - "affects": { - "id": "R5", - "resourceClassifiedAs": "Assembly" - }, - "affectedQuantity": { - "numericValue": "3", - "unit": "Hours" - }, - "provider": { - "id": "A3", - "name": "Carol" - } - }, - { - "action": "consume", - "start": "2017-10-20", - "affects": { - "id": "R4" - }, - "affectedQuantity": { - "numericValue": "1", - "unit": "Each" - } - } - ], - "outputs": [ - { - "action": "produce", - "start": "2017-10-20", - "affects": { - "id": "R6", - "resourceClassifiedAs": "Buzzer Pump Prototype", - "currentLocation": "storage-room-1x1" - }, - "affectedQuantity": { - "numericValue": "1", - "unit": "Each" - } - } - ] - } -] diff --git a/release-doc-in-process/all_vf.TTL b/release-doc-in-process/all_vf.TTL @@ -146,7 +146,7 @@ vf:Claim a owl:Class ; vf:Settlement a owl:Class ; rdfs:label "vf:Settlement" ; vs:term_status "unstable" ; - rdfs:comment "Represents many-to-many relationships between claim and economic events that uflly or parially settle the one or more claims." . + rdfs:comment "Represents many-to-many relationships between claim and economic events that fully or partially settle one or more claims." . vf:Appreciation a owl:Class ; rdfs:label "vf:Appreciation" ; @@ -327,14 +327,14 @@ vf:hasBeginning a owl:DatatypeProperty ; rdfs:range xsd:dateTimeStamp ; vs:term_status "unstable" ; owl:propertyChainAxiom (time:hasBeginning time:inXSDDateTimeStamp) ; - rdfs:comment "Specific time marking the exact beginning of flow or process". + rdfs:comment "The planned or actual beginning of a flow or process." . vf:hasEnd a owl:DatatypeProperty ; rdfs:domain time:TemporalEntity ; rdfs:range xsd:dateTimeStamp ; vs:term_status "unstable" ; owl:propertyChainAxiom (time:hasEnd time:inXSDDateTimeStamp) ; - rdfs:comment "Specific time marking the exact end of flow or process". + rdfs:comment "The planned or actual end of a flow or process." . vf:accountingQuantity a owl:ObjectProperty ; rdfs:label "accounting quantity" ; @@ -540,7 +540,7 @@ vf:basedOn rdfs:domain vf:Process ; rdfs:range vf:ProcessSpecification ; vs:term_status "unstable" ; - rdfs:comment "The recipe definition or standard specification for a process." . + rdfs:comment "The definition or standard specification for a process." . vf:classifiedAs a owl:ObjectProperty ; @@ -580,7 +580,7 @@ vf:resourceConformsTo rdfs:domain [ owl:unionOf (vf:Commitment vf:Intent vf:EconomicEvent vf:Claim vf:RecipeResource) ] ; rdfs:range vf:ResourceSpecification ; vs:term_status "unstable" ; - rdfs:comment "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. If not a vf:ResourceSpecification, this can be a link to another specification." . + rdfs:comment "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." . vf:conformsTo a owl:ObjectProperty ;