Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fresh vocab proposal #10

Merged
merged 3 commits into from
Aug 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 44 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,44 @@
# Craftodex vocabs

should describe any fractal networks of people and groups.

- [x] Agents
- [x] [Agent](./vocab/Agent.js)
- [x] [Person](./vocab/Person.js)
- [x] [Group](./vocab/Group.js)
- [x] [RelationshipType](./vocab/RelationshipType.js)
- [x] [Relationship](./vocab/Relationship.js)
- Misc
- [x] [Location](./vocab/Location.js)
# Agent vocab

Vocabulary to describe fractal networks of people and groups.

- [Agent](./vocab/Agent.js)
- [AgentType](./vocab/AgentType.js)
- [RelationshipType](./vocab/RelationshipType.js)
- [Relationship](./vocab/Relationship.js)

## Abstract

```yml
AgentType:
id: required url
name: optional string
description: optional string

Agent:
id: required url
type: required AgentType
name: optional string
image: optional url

RelationshipType:
id: required url
description: optional string
obverse: optional RelationshipType
source: required AgentType
target: required AgentType
context: optional AgentType

Relationship:
id: required url
type: required RelationshipType
description: optional string
obverse: optional Relationship
source: required Agent
target: required Agent
context: optional Agent
```

## Pictures!

[![UML class diagram](https://rawgit.com/openvocab/agent/compost/assets/uml.svg)](https://en.wikipedia.org/wiki/Class_diagram)
105 changes: 105 additions & 0 deletions assets/uml.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// structure copied from
// http://www.ffnn.nl/pages/articles/media/uml-diagrams-using-graphviz-dot.php

digraph G {
fontname = "Bitstream Vera Sans"
fontsize = 14

node [
fontname = "Bitstream Vera Sans"
fontsize = 14
shape = "record"
]

edge [
fontname = "Bitstream Vera Sans"
fontsize = 14
arrowhead = "none"
]

AgentType [
label = "{AgentType|+ id : url\l+ name : string\l+ description : string\l}"
]

Agent [
label = "{Agent|+ id: url\l+ name : string\l+ image : url\l}"
]

RelationshipType [
label = "{RelationshipType|+ id : url\l+ description : string\l}"
]

Relationship [
label = "{Relationship|+ id : url\l+ description : string\l}"
]

edge [
headlabel = "1"
taillabel = "0..*"
]

edge[
label = "sourceAgent"
]
Relationship -> Agent
edge [
label = "targetAgent"
]
Relationship -> Agent

edge [
headlabel = "0..1"
label = "contextAgent"
]
Relationship -> Agent

edge [
headlabel = "1"
taillabel = "0..*"
]

edge[
label = "sourceAgentType"
]
RelationshipType -> AgentType
edge [
label = "targetAgentType"
]
RelationshipType -> AgentType

edge [
headlabel = "0..1"
label = "contextAgentType"
]
RelationshipType -> AgentType

edge [
headlabel = "1"
taillabel = "0..*"
]

edge [
label = "relationshipType"
]
Relationship -> RelationshipType

edge [
label = "agentType"
]
Agent -> AgentType

edge [
headlabel = "0..1"
taillabel = "0..1"
]

edge [
label = "obverseRelationshipType"
]
RelationshipType -> RelationshipType

edge [
label = "obverseRelationship"
]
Relationship -> Relationship
}
117 changes: 117 additions & 0 deletions assets/uml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "semantic vocabulary definitions for holodex.is",
"main": "vocab/index.js",
"scripts": {
"test": "standard"
"test": "standard",
"uml": "dot -T svg -o ./assets/uml.svg ./assets/uml.dot"
},
"repository": {
"type": "git",
Expand All @@ -26,6 +27,6 @@
},
"homepage": "https://github.com/openvocab/holodex",
"devDependencies": {
"standard": "^3.5.0"
"standard": "^5.1.1"
}
}
Loading