Before manually adapting to AS

This commit is contained in:
sneakers-the-rat 2024-01-12 23:27:16 -08:00
parent 265dc9333e
commit df6c5cfd82
Signed by untrusted user who does not match committer: jonny
GPG key ID: 6DCB96EF1E4D232D
15 changed files with 4537 additions and 35 deletions

41
.gitignore vendored
View file

@ -1,3 +1,7 @@
/docs/
/generated/docs/
/tmp/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
@ -20,6 +24,7 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
@ -49,7 +54,6 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
@ -72,7 +76,6 @@ instance/
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
@ -83,9 +86,7 @@ profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@ -94,22 +95,7 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
@ -145,16 +131,3 @@ dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

188
Makefile Normal file
View file

@ -0,0 +1,188 @@
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := help
.DELETE_ON_ERROR:
.SUFFIXES:
.SECONDARY:
RUN = poetry run
# get values from about.yaml file
SCHEMA_NAME = $(shell ${SHELL} ./utils/get-value.sh name)
SOURCE_SCHEMA_PATH = $(shell ${SHELL} ./utils/get-value.sh source_schema_path)
SOURCE_SCHEMA_DIR = $(dir $(SOURCE_SCHEMA_PATH))
SRC = src
DEST = project
PYMODEL = $(SRC)/$(SCHEMA_NAME)/datamodel
DOCDIR = docs
EXAMPLEDIR = examples
SHEET_MODULE = personinfo_enums
SHEET_ID = $(shell ${SHELL} ./utils/get-value.sh google_sheet_id)
SHEET_TABS = $(shell ${SHELL} ./utils/get-value.sh google_sheet_tabs)
SHEET_MODULE_PATH = $(SOURCE_SCHEMA_DIR)/$(SHEET_MODULE).yaml
# environment variables
include config.env
GEN_PARGS =
ifdef LINKML_GENERATORS_PROJECT_ARGS
GEN_PARGS = ${LINKML_GENERATORS_PROJECT_ARGS}
endif
GEN_DARGS =
ifdef LINKML_GENERATORS_MARKDOWN_ARGS
GEN_DARGS = ${LINKML_GENERATORS_MARKDOWN_ARGS}
endif
# basename of a YAML file in model/
.PHONY: all clean setup gen-project gen-examples gendoc git-init-add git-init git-add git-commit git-status
# note: "help" MUST be the first target in the file,
# when the user types "make" they should get help info
help: status
@echo ""
@echo "make setup -- initial setup (run this first)"
@echo "make site -- makes site locally"
@echo "make install -- install dependencies"
@echo "make test -- runs tests"
@echo "make lint -- perform linting"
@echo "make testdoc -- builds docs and runs local test server"
@echo "make deploy -- deploys site"
@echo "make update -- updates linkml version"
@echo "make help -- show this help"
@echo ""
status: check-config
@echo "Project: $(SCHEMA_NAME)"
@echo "Source: $(SOURCE_SCHEMA_PATH)"
# generate products and add everything to github
setup: git-init install gen-project gen-examples gendoc git-add git-commit
# install any dependencies required for building
install:
poetry install
.PHONY: install
# ---
# Project Synchronization
# ---
#
# check we are up to date
check: cruft-check
cruft-check:
cruft check
cruft-diff:
cruft diff
update: update-template update-linkml
update-template:
cruft update
# todo: consider pinning to template
update-linkml:
poetry add -D linkml@latest
# EXPERIMENTAL
create-data-harmonizer:
npm init data-harmonizer $(SOURCE_SCHEMA_PATH)
all: site
site: gen-project gendoc
%.yaml: gen-project
deploy: all mkd-gh-deploy
compile-sheets:
$(RUN) sheets2linkml --gsheet-id $(SHEET_ID) $(SHEET_TABS) > $(SHEET_MODULE_PATH).tmp && mv $(SHEET_MODULE_PATH).tmp $(SHEET_MODULE_PATH)
# In future this will be done by conversion
gen-examples:
cp src/data/examples/* $(EXAMPLEDIR)
# generates all project files
gen-project: $(PYMODEL)
$(RUN) gen-project ${GEN_PARGS} -d $(DEST) $(SOURCE_SCHEMA_PATH) && mv $(DEST)/*.py $(PYMODEL)
test: test-schema test-python test-examples
test-schema:
$(RUN) gen-project ${GEN_PARGS} -d tmp $(SOURCE_SCHEMA_PATH)
test-python:
$(RUN) python -m unittest discover
lint:
$(RUN) linkml-lint $(SOURCE_SCHEMA_PATH)
check-config:
@(grep my-datamodel about.yaml > /dev/null && printf "\n**Project not configured**:\n\n - Remember to edit 'about.yaml'\n\n" || exit 0)
convert-examples-to-%:
$(patsubst %, $(RUN) linkml-convert % -s $(SOURCE_SCHEMA_PATH) -C Person, $(shell ${SHELL} find src/data/examples -name "*.yaml"))
examples/%.yaml: src/data/examples/%.yaml
$(RUN) linkml-convert -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@
examples/%.json: src/data/examples/%.yaml
$(RUN) linkml-convert -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@
examples/%.ttl: src/data/examples/%.yaml
$(RUN) linkml-convert -P EXAMPLE=http://example.org/ -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@
test-examples: examples/output
examples/output: src/linkml_activitypub
mkdir -p $@
$(RUN) linkml-run-examples \
--output-formats json \
--output-formats yaml \
--counter-example-input-directory src/data/examples/invalid \
--input-directory src/data/examples/valid \
--output-directory $@ \
--schema $< > $@/README.md
# Test documentation locally
serve: mkd-serve
# Python datamodel
$(PYMODEL):
mkdir -p $@
$(DOCDIR):
mkdir -p $@
gendoc: $(DOCDIR)
cp $(SRC)/docs/*md $(DOCDIR) ; \
$(RUN) gen-doc ${GEN_DARGS} -d $(DOCDIR) $(SOURCE_SCHEMA_PATH)
testdoc: gendoc serve
MKDOCS = $(RUN) mkdocs
mkd-%:
$(MKDOCS) $*
PROJECT_FOLDERS = sqlschema shex shacl protobuf prefixmap owl jsonschema jsonld graphql excel
git-init-add: git-init git-add git-commit git-status
git-init:
git init
git-add: .cruft.json
git add .
git-commit:
git commit -m 'chore: initial commit' -a
git-status:
git status
# only necessary if setting up via cookiecutter
.cruft.json:
echo "creating a stub for .cruft.json. IMPORTANT: setup via cruft not cookiecutter recommended!" ; \
touch $@
clean:
rm -rf $(DEST)
rm -rf tmp
rm -fr docs/*
rm -fr $(PYMODEL)/*
include project.Makefile

View file

@ -1,2 +1,23 @@
# linkml-activitypub
LinkML Schema representation of ActivityPub
LinkML representation of ActivityPub schema (which is mostly ActivityStreams except where it's not)
## Process
Intermediate files are in the `data` directory
- `activitystreams2.owl` - Initially imported from [activitystreams2.owl](https://github.com/w3c/activitystreams/blob/5910a59a6f46c1f8ec9fb028bd8bbb65a7332e4e/vocabulary/activitystreams2.owl)
- Removed problematic OrderedCollection definitions
- `activitystreams2.ofn` - Convert to functional notation with [robot](http://robot.obolibrary.org/)
- `activitystreams2.yaml` - Then to rough linkml using [schema-automator](https://linkml.io/schema-automator/)
Then the final schema in
- Manually refined...
# References
- Status of AS OWL vocabulary and etc. https://github.com/w3c/activitystreams/issues/416
# See Also
- https://github.com/steve-bate/activitypub-ontology

5
about.yaml Normal file
View file

@ -0,0 +1,5 @@
---
name: linkml-activitypub
author: Jonny Saunders <sneakers-the-rat@protonmail.com>
description: LinkML representation of linkml_activitypub Schema
source_schema_path: linkml_activitypub/activitypub.yaml

41
config.yaml Normal file
View file

@ -0,0 +1,41 @@
# Configuration of generators (defaults illustrated)
---
generator_args:
excel:
mergeimports: true
owl:
mergeimports: true
metaclasses: true
type_objects: true
# throws 'Cannot handle metadata profile: rdfs'
# metadata_profile: rdfs
markdown:
mergeimports: true
graphql:
mergeimports: true
java:
mergeimports: true
metadata: true
jsonld:
mergeimports: true
jsonschema:
mergeimports: true
jsonldcontext:
mergeimports: true
python:
mergeimports: true
prefixmap:
mergeimports: true
proto:
mergeimports: true
shacl:
mergeimports: true
shex:
mergeimports: true
sqlddl:
mergeimports: true
typescript:
mergeimports: true
metadata: true
...

653
data/activitystreams.yaml Normal file
View file

@ -0,0 +1,653 @@
name: ''
description: ''
id: http://www.w3.org/ns/activitystreams#
imports:
- linkml:types
prefixes:
linkml: https://w3id.org/linkml/
? ''
: https://w3id.org/None/
default_prefix: ''
slots:
predicate:
slot_uri: rdf:predicate
multivalued: true
subject:
comments:
- On a Relationship object, identifies the subject. e.g. when saying \"John is
connected to Sally\", 'subject' refers to 'John'@en
is_a: subject
slot_uri: as:subject
multivalued: true
actor:
comments:
- Subproperty of as:attributedTo that identifies the primary actor@en
is_a: attributedTo
slot_uri: as:actor
multivalued: true
anyOf:
comments:
- Describes a possible inclusive answer or option for a question.@en
slot_uri: as:anyOf
multivalued: true
attachment:
slot_uri: as:attachment
multivalued: true
attachments:
slot_uri: as:attachments
multivalued: true
attributedTo:
comments:
- Identifies an entity to which an object is attributed@en
slot_uri: as:attributedTo
multivalued: true
audience:
slot_uri: as:audience
multivalued: true
author:
comments:
- Identifies the author of an object. Deprecated. Use as:attributedTo instead@en
is_a: attributedTo
slot_uri: as:author
multivalued: true
bcc:
slot_uri: as:bcc
multivalued: true
bto:
slot_uri: as:bto
multivalued: true
cc:
slot_uri: as:cc
multivalued: true
context:
comments:
- Specifies the context within which an object exists or an activity was performed@en
slot_uri: as:context
multivalued: true
current:
slot_uri: as:current
multivalued: true
describes:
comments:
- On a Profile object, describes the object described by the profile@en
slot_uri: as:describes
multivalued: true
range: Object
first:
slot_uri: as:first
multivalued: true
formerType:
comments:
- On a Tombstone object, describes the former type of the deleted object@en
slot_uri: as:formerType
multivalued: true
range: Object
generator:
slot_uri: as:generator
multivalued: true
icon:
slot_uri: as:icon
multivalued: true
image:
slot_uri: as:image
multivalued: true
inReplyTo:
slot_uri: as:inReplyTo
multivalued: true
instrument:
comments:
- Indentifies an object used (or to be used) to complete an activity@en
slot_uri: as:instrument
multivalued: true
items:
slot_uri: as:items
multivalued: true
last:
slot_uri: as:last
multivalued: true
location:
slot_uri: as:location
multivalued: true
next:
slot_uri: as:next
multivalued: true
object:
slot_uri: as:object
multivalued: true
oneOf:
comments:
- Describes a possible exclusive answer or option for a question.@en
slot_uri: as:oneOf
multivalued: true
origin:
comments:
- For certain activities, specifies the entity from which the action is directed.@en
slot_uri: as:origin
multivalued: true
partOf:
slot_uri: as:partOf
multivalued: true
prev:
slot_uri: as:prev
multivalued: true
preview:
slot_uri: as:preview
multivalued: true
provider:
slot_uri: as:provider
multivalued: true
relationship:
comments:
- On a Relationship object, describes the type of relationship@en
is_a: predicate
slot_uri: as:relationship
multivalued: true
range: Property
replies:
slot_uri: as:replies
multivalued: true
range: Collection
result:
slot_uri: as:result
multivalued: true
tag:
slot_uri: as:tag
multivalued: true
tags:
slot_uri: as:tags
multivalued: true
target:
slot_uri: as:target
multivalued: true
to:
slot_uri: as:to
multivalued: true
url:
comments:
- Specifies a link to a specific representation of the Object@en
slot_uri: as:url
multivalued: true
accuracy:
comments:
- Specifies the accuracy around the point established by the longitude and latitude@en
slot_uri: as:accuracy
multivalued: true
altitude:
comments:
- The altitude of a place@en
slot_uri: as:altitude
multivalued: true
content:
comments:
- The content of the object.@en
slot_uri: as:content
multivalued: true
deleted:
comments:
- Specifies the date and time the object was deleted@en
slot_uri: as:deleted
multivalued: true
downstreamDuplicates:
slot_uri: as:downstreamDuplicates
multivalued: true
duration:
comments:
- The duration of the object@en
slot_uri: as:duration
multivalued: true
endTime:
comments:
- The ending time of the object@en
slot_uri: as:endTime
multivalued: true
height:
comments:
- The display height expressed as device independent pixels@en
slot_uri: as:height
multivalued: true
href:
comments:
- The target URI of the Link@en
slot_uri: as:href
multivalued: true
hreflang:
comments:
- A hint about the language of the referenced resource@en
slot_uri: as:hreflang
multivalued: true
id:
slot_uri: as:id
multivalued: true
latitude:
comments:
- The latitude@en
slot_uri: as:latitude
multivalued: true
longitude:
comments:
- The longitude@en
slot_uri: as:longitude
multivalued: true
mediaType:
comments:
- The MIME Media Type@en
slot_uri: as:mediaType
multivalued: true
name:
slot_uri: rdfs:name
multivalued: true
objectType:
slot_uri: as:objectType
multivalued: true
published:
comments:
- Specifies the date and time the object was published@en
slot_uri: as:published
multivalued: true
radius:
comments:
- Specifies a radius around the point established by the longitude and latitude@en
slot_uri: as:radius
multivalued: true
rating:
comments:
- A numeric rating (>= 0.0, <= 5.0) for the object@en
slot_uri: as:rating
multivalued: true
rel:
comments:
- The RFC 5988 or HTML5 Link Relation associated with the Link@en
slot_uri: as:rel
multivalued: true
startTime:
comments:
- The starting time of the object@en
slot_uri: as:startTime
multivalued: true
summary:
comments:
- A short summary of the object@en
slot_uri: as:summary
multivalued: true
totalItems:
comments:
- The total number of items in a logical collection@en
slot_uri: as:totalItems
multivalued: true
units:
comments:
- Identifies the unit of measurement used by the radius, altitude and accuracy
properties. The value can be expressed either as one of a set of predefined
units or as a well-known common URI that identifies units.@en
slot_uri: as:units
multivalued: true
updated:
comments:
- Specifies when the object was last updated@en
slot_uri: as:updated
multivalued: true
upstreamDuplicates:
slot_uri: as:upstreamDuplicates
multivalued: true
verb:
slot_uri: as:verb
multivalued: true
width:
comments:
- Specifies the preferred display width of the content, expressed in terms of
device independent pixels.@en
slot_uri: as:width
multivalued: true
classes:
Property:
class_uri: rdf:Property
Statement:
class_uri: rdf:Statement
Accept:
comments:
- Actor accepts the Object@en
is_a: Activity
class_uri: as:Accept
Activity:
comments:
- An Object representing some form of Action that has been taken@en
is_a: Object
slots:
- actor
- instrument
- object
- origin
- result
- target
- verb
class_uri: as:Activity
Add:
comments:
- To Add an Object or Link to Something@en
is_a: Activity
class_uri: as:Add
Announce:
comments:
- Actor announces the object to the target@en
is_a: Activity
class_uri: as:Announce
Application:
comments:
- Represents a software application of any sort@en
is_a: Object
class_uri: as:Application
Arrive:
comments:
- To Arrive Somewhere (can be used, for instance, to indicate that a particular
entity is currently located somewhere, e.g. a \"check-in\")@en
is_a: IntransitiveActivity
class_uri: as:Arrive
Article:
comments:
- A written work. Typically several paragraphs long. For example, a blog post
or a news article.@en
is_a: Object
class_uri: as:Article
Audio:
comments:
- An audio file@en
is_a: Document
class_uri: as:Audio
Block:
is_a: Ignore
class_uri: as:Block
Collection:
comments:
- An ordered or unordered collection of Objects or Links@en
is_a: Object
slots:
- current
- first
- items
- last
- totalItems
class_uri: as:Collection
CollectionPage:
comments:
- A subset of items from a Collection@en
is_a: Collection
slots:
- next
- partOf
- prev
class_uri: as:CollectionPage
Create:
comments:
- To Create Something@en
is_a: Activity
class_uri: as:Create
Delete:
comments:
- To Delete Something@en
is_a: Activity
class_uri: as:Delete
Dislike:
comments:
- The actor dislikes the object@en
is_a: Activity
class_uri: as:Dislike
Document:
comments:
- Represents a digital document/file of any sort@en
is_a: Object
class_uri: as:Document
Event:
comments:
- An Event of any kind@en
is_a: Object
class_uri: as:Event
Flag:
comments:
- To flag something (e.g. flag as inappropriate, flag as spam, etc)@en
is_a: Activity
class_uri: as:Flag
Follow:
comments:
- To Express Interest in Something@en
is_a: Activity
class_uri: as:Follow
Group:
comments:
- A Group of any kind.@en
is_a: Object
class_uri: as:Group
Ignore:
comments:
- Actor is ignoring the Object@en
is_a: Activity
class_uri: as:Ignore
Image:
comments:
- An Image file@en
is_a: Document
class_uri: as:Image
IntransitiveActivity:
comments:
- An Activity that has no direct object@en
is_a: Activity
class_uri: as:IntransitiveActivity
Invite:
comments:
- To invite someone or something to something@en
is_a: Offer
class_uri: as:Invite
Join:
comments:
- To Join Something@en
is_a: Activity
class_uri: as:Join
Leave:
comments:
- To Leave Something@en
is_a: Activity
class_uri: as:Leave
Like:
comments:
- To Like Something@en
is_a: Activity
class_uri: as:Like
Link:
comments:
- Represents a qualified reference to another resource. Patterned after the RFC5988
Web Linking Model@en
slots:
- attributedTo
- name
- preview
- height
- href
- hreflang
- id
- mediaType
- rel
- width
class_uri: as:Link
Listen:
comments:
- The actor listened to the object@en
is_a: Activity
class_uri: as:Listen
Mention:
comments:
- A specialized Link that represents an @mention@en
is_a: Link
class_uri: as:Mention
Move:
comments:
- The actor is moving the object. The target specifies where the object is moving
to. The origin specifies where the object is moving from.
is_a: Activity
class_uri: as:Move
Note:
comments:
- A Short note, typically less than a single paragraph. A \"tweet\" is an example,
or a \"status update\"@en
is_a: Object
class_uri: as:Note
Object:
slots:
- attachment
- attachments
- attributedTo
- audience
- author
- bcc
- bto
- cc
- content
- context
- generator
- icon
- image
- inReplyTo
- location
- name
- preview
- provider
- replies
- summary
- tag
- tags
- to
- url
- downstreamDuplicates
- duration
- endTime
- id
- mediaType
- objectType
- published
- rating
- startTime
- updated
- upstreamDuplicates
class_uri: as:Object
Offer:
comments:
- To Offer something to someone or something@en
is_a: Activity
class_uri: as:Offer
OrderedItems:
class_uri: as:OrderedItems
Organization:
comments:
- An Organization@en
is_a: Object
class_uri: as:Organization
Page:
comments:
- A Web Page@en
is_a: Object
class_uri: as:Page
Person:
comments:
- A Person@en
is_a: Object
class_uri: as:Person
Place:
comments:
- A physical or logical location@en
is_a: Object
slots:
- accuracy
- altitude
- latitude
- longitude
- radius
- units
class_uri: as:Place
Profile:
comments:
- A Profile Document@en
is_a: Object
slots:
- describes
class_uri: as:Profile
Question:
comments:
- A question of any sort.@en
is_a: IntransitiveActivity
slots:
- anyOf
- oneOf
class_uri: as:Question
Read:
comments:
- The actor read the object@en
is_a: Activity
class_uri: as:Read
Reject:
comments:
- Actor rejects the Object@en
is_a: Activity
class_uri: as:Reject
Relationship:
comments:
- Represents a Social Graph relationship between two Individuals (indicated by
the 'a' and 'b' properties)@en
is_a: Object
slots:
- object
- relationship
- subject
class_uri: as:Relationship
Remove:
comments:
- To Remove Something@en
is_a: Activity
class_uri: as:Remove
Service:
comments:
- A service provided by some entity@en
is_a: Object
class_uri: as:Service
TentativeAccept:
comments:
- Actor tentatively accepts the Object@en
is_a: Accept
class_uri: as:TentativeAccept
TentativeReject:
comments:
- Actor tentatively rejects the object@en
is_a: Reject
class_uri: as:TentativeReject
Tombstone:
comments:
- A placeholder for a deleted object@en
is_a: Object
slots:
- formerType
- deleted
class_uri: as:Tombstone
Travel:
comments:
- The actor is traveling to the target. The origin specifies where the actor is
traveling from.
is_a: IntransitiveActivity
class_uri: as:Travel
Undo:
comments:
- To Undo Something. This would typically be used to indicate that a previous
Activity has been undone.@en
is_a: Activity
class_uri: as:Undo
Update:
comments:
- To Update/Modify Something@en
is_a: Activity
class_uri: as:Update
Video:
comments:
- A Video document of any kind.@en
is_a: Document
class_uri: as:Video
View:
comments:
- The actor viewed the object@en
is_a: Activity
class_uri: as:View

379
data/activitystreams2.json Normal file
View file

@ -0,0 +1,379 @@
{
"@context": {
"@vocab": "_:",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"as": "https://www.w3.org/ns/activitystreams#",
"ldp": "http://www.w3.org/ns/ldp#",
"vcard": "http://www.w3.org/2006/vcard/ns#",
"id": "@id",
"type": "@type",
"Accept": "as:Accept",
"Activity": "as:Activity",
"IntransitiveActivity": "as:IntransitiveActivity",
"Add": "as:Add",
"Announce": "as:Announce",
"Application": "as:Application",
"Arrive": "as:Arrive",
"Article": "as:Article",
"Audio": "as:Audio",
"Block": "as:Block",
"Collection": "as:Collection",
"CollectionPage": "as:CollectionPage",
"Relationship": "as:Relationship",
"Create": "as:Create",
"Delete": "as:Delete",
"Dislike": "as:Dislike",
"Document": "as:Document",
"Event": "as:Event",
"Follow": "as:Follow",
"Flag": "as:Flag",
"Group": "as:Group",
"Ignore": "as:Ignore",
"Image": "as:Image",
"Invite": "as:Invite",
"Join": "as:Join",
"Leave": "as:Leave",
"Like": "as:Like",
"Link": "as:Link",
"Mention": "as:Mention",
"Note": "as:Note",
"Object": "as:Object",
"Offer": "as:Offer",
"OrderedCollection": "as:OrderedCollection",
"OrderedCollectionPage": "as:OrderedCollectionPage",
"Organization": "as:Organization",
"Page": "as:Page",
"Person": "as:Person",
"Place": "as:Place",
"Profile": "as:Profile",
"Question": "as:Question",
"Reject": "as:Reject",
"Remove": "as:Remove",
"Service": "as:Service",
"TentativeAccept": "as:TentativeAccept",
"TentativeReject": "as:TentativeReject",
"Tombstone": "as:Tombstone",
"Undo": "as:Undo",
"Update": "as:Update",
"Video": "as:Video",
"View": "as:View",
"Listen": "as:Listen",
"Read": "as:Read",
"Move": "as:Move",
"Travel": "as:Travel",
"IsFollowing": "as:IsFollowing",
"IsFollowedBy": "as:IsFollowedBy",
"IsContact": "as:IsContact",
"IsMember": "as:IsMember",
"subject": {
"@id": "as:subject",
"@type": "@id"
},
"relationship": {
"@id": "as:relationship",
"@type": "@id"
},
"actor": {
"@id": "as:actor",
"@type": "@id"
},
"attributedTo": {
"@id": "as:attributedTo",
"@type": "@id"
},
"attachment": {
"@id": "as:attachment",
"@type": "@id"
},
"bcc": {
"@id": "as:bcc",
"@type": "@id"
},
"bto": {
"@id": "as:bto",
"@type": "@id"
},
"cc": {
"@id": "as:cc",
"@type": "@id"
},
"context": {
"@id": "as:context",
"@type": "@id"
},
"current": {
"@id": "as:current",
"@type": "@id"
},
"first": {
"@id": "as:first",
"@type": "@id"
},
"generator": {
"@id": "as:generator",
"@type": "@id"
},
"icon": {
"@id": "as:icon",
"@type": "@id"
},
"image": {
"@id": "as:image",
"@type": "@id"
},
"inReplyTo": {
"@id": "as:inReplyTo",
"@type": "@id"
},
"items": {
"@id": "as:items",
"@type": "@id"
},
"instrument": {
"@id": "as:instrument",
"@type": "@id"
},
"orderedItems": {
"@id": "as:items",
"@type": "@id",
"@container": "@list"
},
"last": {
"@id": "as:last",
"@type": "@id"
},
"location": {
"@id": "as:location",
"@type": "@id"
},
"next": {
"@id": "as:next",
"@type": "@id"
},
"object": {
"@id": "as:object",
"@type": "@id"
},
"oneOf": {
"@id": "as:oneOf",
"@type": "@id"
},
"anyOf": {
"@id": "as:anyOf",
"@type": "@id"
},
"closed": {
"@id": "as:closed",
"@type": "xsd:dateTime"
},
"origin": {
"@id": "as:origin",
"@type": "@id"
},
"accuracy": {
"@id": "as:accuracy",
"@type": "xsd:float"
},
"prev": {
"@id": "as:prev",
"@type": "@id"
},
"preview": {
"@id": "as:preview",
"@type": "@id"
},
"replies": {
"@id": "as:replies",
"@type": "@id"
},
"result": {
"@id": "as:result",
"@type": "@id"
},
"audience": {
"@id": "as:audience",
"@type": "@id"
},
"partOf": {
"@id": "as:partOf",
"@type": "@id"
},
"tag": {
"@id": "as:tag",
"@type": "@id"
},
"target": {
"@id": "as:target",
"@type": "@id"
},
"to": {
"@id": "as:to",
"@type": "@id"
},
"url": {
"@id": "as:url",
"@type": "@id"
},
"altitude": {
"@id": "as:altitude",
"@type": "xsd:float"
},
"content": "as:content",
"contentMap": {
"@id": "as:content",
"@container": "@language"
},
"name": "as:name",
"nameMap": {
"@id": "as:name",
"@container": "@language"
},
"duration": {
"@id": "as:duration",
"@type": "xsd:duration"
},
"endTime": {
"@id": "as:endTime",
"@type": "xsd:dateTime"
},
"height": {
"@id": "as:height",
"@type": "xsd:nonNegativeInteger"
},
"href": {
"@id": "as:href",
"@type": "@id"
},
"hreflang": "as:hreflang",
"latitude": {
"@id": "as:latitude",
"@type": "xsd:float"
},
"longitude": {
"@id": "as:longitude",
"@type": "xsd:float"
},
"mediaType": "as:mediaType",
"published": {
"@id": "as:published",
"@type": "xsd:dateTime"
},
"radius": {
"@id": "as:radius",
"@type": "xsd:float"
},
"rel": "as:rel",
"startIndex": {
"@id": "as:startIndex",
"@type": "xsd:nonNegativeInteger"
},
"startTime": {
"@id": "as:startTime",
"@type": "xsd:dateTime"
},
"summary": "as:summary",
"summaryMap": {
"@id": "as:summary",
"@container": "@language"
},
"totalItems": {
"@id": "as:totalItems",
"@type": "xsd:nonNegativeInteger"
},
"units": "as:units",
"updated": {
"@id": "as:updated",
"@type": "xsd:dateTime"
},
"width": {
"@id": "as:width",
"@type": "xsd:nonNegativeInteger"
},
"describes": {
"@id": "as:describes",
"@type": "@id"
},
"formerType": {
"@id": "as:formerType",
"@type": "@id"
},
"deleted": {
"@id": "as:deleted",
"@type": "xsd:dateTime"
},
"inbox": {
"@id": "ldp:inbox",
"@type": "@id"
},
"outbox": {
"@id": "as:outbox",
"@type": "@id"
},
"following": {
"@id": "as:following",
"@type": "@id"
},
"followers": {
"@id": "as:followers",
"@type": "@id"
},
"streams": {
"@id": "as:streams",
"@type": "@id"
},
"preferredUsername": "as:preferredUsername",
"endpoints": {
"@id": "as:endpoints",
"@type": "@id"
},
"uploadMedia": {
"@id": "as:uploadMedia",
"@type": "@id"
},
"proxyUrl": {
"@id": "as:proxyUrl",
"@type": "@id"
},
"liked": {
"@id": "as:liked",
"@type": "@id"
},
"oauthAuthorizationEndpoint": {
"@id": "as:oauthAuthorizationEndpoint",
"@type": "@id"
},
"oauthTokenEndpoint": {
"@id": "as:oauthTokenEndpoint",
"@type": "@id"
},
"provideClientKey": {
"@id": "as:provideClientKey",
"@type": "@id"
},
"signClientKey": {
"@id": "as:signClientKey",
"@type": "@id"
},
"sharedInbox": {
"@id": "as:sharedInbox",
"@type": "@id"
},
"Public": {
"@id": "as:Public",
"@type": "@id"
},
"source": "as:source",
"likes": {
"@id": "as:likes",
"@type": "@id"
},
"shares": {
"@id": "as:shares",
"@type": "@id"
},
"alsoKnownAs": {
"@id": "as:alsoKnownAs",
"@type": "@id"
}
}
}

975
data/activitystreams2.ofn Normal file
View file

@ -0,0 +1,975 @@
Prefix(:=<http://www.w3.org/ns/activitystreams#>)
Prefix(as:=<http://www.w3.org/ns/activitystreams#>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)
Ontology(<http://www.w3.org/ns/activitystreams#>
Annotation(rdfs:comment "Extended Activity Streams 2.0 Vocabulary"@en)
Annotation(rdfs:label "Activity Streams 2.0"@en)
Declaration(Class(rdf:Property))
Declaration(Class(rdf:Statement))
Declaration(Class(as:Accept))
Declaration(Class(as:Activity))
Declaration(Class(as:Add))
Declaration(Class(as:Announce))
Declaration(Class(as:Application))
Declaration(Class(as:Arrive))
Declaration(Class(as:Article))
Declaration(Class(as:Audio))
Declaration(Class(as:Block))
Declaration(Class(as:Collection))
Declaration(Class(as:CollectionPage))
Declaration(Class(as:Create))
Declaration(Class(as:Delete))
Declaration(Class(as:Dislike))
Declaration(Class(as:Document))
Declaration(Class(as:Event))
Declaration(Class(as:Flag))
Declaration(Class(as:Follow))
Declaration(Class(as:Group))
Declaration(Class(as:Ignore))
Declaration(Class(as:Image))
Declaration(Class(as:IntransitiveActivity))
Declaration(Class(as:Invite))
Declaration(Class(as:Join))
Declaration(Class(as:Leave))
Declaration(Class(as:Like))
Declaration(Class(as:Link))
Declaration(Class(as:Listen))
Declaration(Class(as:Mention))
Declaration(Class(as:Move))
Declaration(Class(as:Note))
Declaration(Class(as:Object))
Declaration(Class(as:Offer))
Declaration(Class(as:OrderedItems))
Declaration(Class(as:Organization))
Declaration(Class(as:Page))
Declaration(Class(as:Person))
Declaration(Class(as:Place))
Declaration(Class(as:Profile))
Declaration(Class(as:Question))
Declaration(Class(as:Read))
Declaration(Class(as:Reject))
Declaration(Class(as:Relationship))
Declaration(Class(as:Remove))
Declaration(Class(as:Service))
Declaration(Class(as:TentativeAccept))
Declaration(Class(as:TentativeReject))
Declaration(Class(as:Tombstone))
Declaration(Class(as:Travel))
Declaration(Class(as:Undo))
Declaration(Class(as:Update))
Declaration(Class(as:Video))
Declaration(Class(as:View))
Declaration(ObjectProperty(rdf:predicate))
Declaration(ObjectProperty(rdf:subject))
Declaration(ObjectProperty(as:actor))
Declaration(ObjectProperty(as:anyOf))
Declaration(ObjectProperty(as:attachment))
Declaration(ObjectProperty(as:attachments))
Declaration(ObjectProperty(as:attributedTo))
Declaration(ObjectProperty(as:audience))
Declaration(ObjectProperty(as:author))
Declaration(ObjectProperty(as:bcc))
Declaration(ObjectProperty(as:bto))
Declaration(ObjectProperty(as:cc))
Declaration(ObjectProperty(as:context))
Declaration(ObjectProperty(as:current))
Declaration(ObjectProperty(as:describes))
Declaration(ObjectProperty(as:first))
Declaration(ObjectProperty(as:formerType))
Declaration(ObjectProperty(as:generator))
Declaration(ObjectProperty(as:icon))
Declaration(ObjectProperty(as:image))
Declaration(ObjectProperty(as:inReplyTo))
Declaration(ObjectProperty(as:instrument))
Declaration(ObjectProperty(as:items))
Declaration(ObjectProperty(as:last))
Declaration(ObjectProperty(as:location))
Declaration(ObjectProperty(as:next))
Declaration(ObjectProperty(as:object))
Declaration(ObjectProperty(as:oneOf))
Declaration(ObjectProperty(as:origin))
Declaration(ObjectProperty(as:partOf))
Declaration(ObjectProperty(as:prev))
Declaration(ObjectProperty(as:preview))
Declaration(ObjectProperty(as:provider))
Declaration(ObjectProperty(as:relationship))
Declaration(ObjectProperty(as:replies))
Declaration(ObjectProperty(as:result))
Declaration(ObjectProperty(as:subject))
Declaration(ObjectProperty(as:tag))
Declaration(ObjectProperty(as:tags))
Declaration(ObjectProperty(as:target))
Declaration(ObjectProperty(as:to))
Declaration(ObjectProperty(as:url))
Declaration(DataProperty(as:accuracy))
Declaration(DataProperty(as:altitude))
Declaration(DataProperty(as:content))
Declaration(DataProperty(as:deleted))
Declaration(DataProperty(as:downstreamDuplicates))
Declaration(DataProperty(as:duration))
Declaration(DataProperty(as:endTime))
Declaration(DataProperty(as:height))
Declaration(DataProperty(as:href))
Declaration(DataProperty(as:hreflang))
Declaration(DataProperty(as:id))
Declaration(DataProperty(as:latitude))
Declaration(DataProperty(as:longitude))
Declaration(DataProperty(as:mediaType))
Declaration(DataProperty(as:name))
Declaration(DataProperty(as:objectType))
Declaration(DataProperty(as:published))
Declaration(DataProperty(as:radius))
Declaration(DataProperty(as:rating))
Declaration(DataProperty(as:rel))
Declaration(DataProperty(as:startTime))
Declaration(DataProperty(as:summary))
Declaration(DataProperty(as:totalItems))
Declaration(DataProperty(as:units))
Declaration(DataProperty(as:updated))
Declaration(DataProperty(as:upstreamDuplicates))
Declaration(DataProperty(as:verb))
Declaration(DataProperty(as:width))
Declaration(NamedIndividual(rdf:nil))
Declaration(NamedIndividual(as:Relationship))
Declaration(AnnotationProperty(rdfs:name))
Declaration(Datatype(rdf:langString))
Declaration(Datatype(xsd:duration))
############################
# Object Properties
############################
# Object Property: as:actor (actor)
AnnotationAssertion(rdfs:comment as:actor "Subproperty of as:attributedTo that identifies the primary actor"@en)
AnnotationAssertion(rdfs:label as:actor "actor"@en)
SubObjectPropertyOf(as:actor as:attributedTo)
ObjectPropertyDomain(as:actor as:Activity)
ObjectPropertyRange(as:actor ObjectUnionOf(as:Link as:Object))
# Object Property: as:anyOf (oneOf)
AnnotationAssertion(rdfs:comment as:anyOf "Describes a possible inclusive answer or option for a question."@en)
AnnotationAssertion(rdfs:label as:anyOf "oneOf"@en)
ObjectPropertyDomain(as:anyOf as:Question)
ObjectPropertyRange(as:anyOf ObjectUnionOf(as:Link as:Object))
# Object Property: as:attachment (attachment)
AnnotationAssertion(rdfs:label as:attachment "attachment"@en)
EquivalentObjectProperties(as:attachment as:attachments)
ObjectPropertyDomain(as:attachment as:Object)
ObjectPropertyRange(as:attachment ObjectUnionOf(as:Link as:Object))
# Object Property: as:attachments (attachments)
AnnotationAssertion(rdfs:label as:attachments "attachments"@en)
AnnotationAssertion(owl:deprecated as:attachments "true"^^xsd:boolean)
ObjectPropertyDomain(as:attachments as:Object)
ObjectPropertyRange(as:attachments ObjectUnionOf(as:Link as:Object))
# Object Property: as:attributedTo (attributedTo)
AnnotationAssertion(rdfs:comment as:attributedTo "Identifies an entity to which an object is attributed"@en)
AnnotationAssertion(rdfs:label as:attributedTo "attributedTo"@en)
ObjectPropertyDomain(as:attributedTo ObjectUnionOf(as:Link as:Object))
ObjectPropertyRange(as:attributedTo ObjectUnionOf(as:Link as:Object))
# Object Property: as:audience (audience)
AnnotationAssertion(rdfs:label as:audience "audience"@en)
ObjectPropertyDomain(as:audience as:Object)
ObjectPropertyRange(as:audience ObjectUnionOf(as:Link as:Object))
# Object Property: as:author (author)
AnnotationAssertion(rdfs:comment as:author "Identifies the author of an object. Deprecated. Use as:attributedTo instead"@en)
AnnotationAssertion(rdfs:label as:author "author"@en)
AnnotationAssertion(owl:deprecated as:author "true"^^xsd:boolean)
SubObjectPropertyOf(as:author as:attributedTo)
ObjectPropertyDomain(as:author as:Object)
ObjectPropertyRange(as:author ObjectUnionOf(as:Link as:Object))
# Object Property: as:bcc (bcc)
AnnotationAssertion(rdfs:label as:bcc "bcc"@en)
ObjectPropertyDomain(as:bcc as:Object)
ObjectPropertyRange(as:bcc ObjectUnionOf(as:Link as:Object))
# Object Property: as:bto (bto)
AnnotationAssertion(rdfs:label as:bto "bto"@en)
ObjectPropertyDomain(as:bto as:Object)
ObjectPropertyRange(as:bto ObjectUnionOf(as:Link as:Object))
# Object Property: as:cc (cc)
AnnotationAssertion(rdfs:label as:cc "cc"@en)
ObjectPropertyDomain(as:cc as:Object)
ObjectPropertyRange(as:cc ObjectUnionOf(as:Link as:Object))
# Object Property: as:content (content)
AnnotationAssertion(rdfs:comment as:content "The content of the object."@en)
AnnotationAssertion(rdfs:label as:content "content"@en)
ObjectPropertyDomain(as:content as:Object)
ObjectPropertyRange(as:content ObjectUnionOf(rdf:langString xsd:string))
# Object Property: as:context (context)
AnnotationAssertion(rdfs:comment as:context "Specifies the context within which an object exists or an activity was performed"@en)
AnnotationAssertion(rdfs:label as:context "context"@en)
ObjectPropertyDomain(as:context as:Object)
ObjectPropertyRange(as:context ObjectUnionOf(as:Link as:Object))
# Object Property: as:current (current)
AnnotationAssertion(rdfs:label as:current "current"@en)
FunctionalObjectProperty(as:current)
ObjectPropertyDomain(as:current as:Collection)
ObjectPropertyRange(as:current ObjectUnionOf(as:CollectionPage as:Link))
# Object Property: as:describes (describes)
AnnotationAssertion(rdfs:comment as:describes "On a Profile object, describes the object described by the profile"@en)
AnnotationAssertion(rdfs:label as:describes "describes"@en)
FunctionalObjectProperty(as:describes)
ObjectPropertyDomain(as:describes as:Profile)
ObjectPropertyRange(as:describes as:Object)
# Object Property: as:first (first)
AnnotationAssertion(rdfs:label as:first "first"@en)
FunctionalObjectProperty(as:first)
ObjectPropertyDomain(as:first as:Collection)
ObjectPropertyRange(as:first ObjectUnionOf(as:CollectionPage as:Link))
# Object Property: as:formerType (formerType)
AnnotationAssertion(rdfs:comment as:formerType "On a Tombstone object, describes the former type of the deleted object"@en)
AnnotationAssertion(rdfs:label as:formerType "formerType"@en)
FunctionalObjectProperty(as:formerType)
ObjectPropertyDomain(as:formerType as:Tombstone)
ObjectPropertyRange(as:formerType as:Object)
# Object Property: as:generator (generator)
AnnotationAssertion(rdfs:label as:generator "generator"@en)
ObjectPropertyDomain(as:generator as:Object)
ObjectPropertyRange(as:generator ObjectUnionOf(as:Link as:Object))
# Object Property: as:icon (icon)
AnnotationAssertion(rdfs:label as:icon "icon"@en)
ObjectPropertyDomain(as:icon as:Object)
ObjectPropertyRange(as:icon ObjectUnionOf(as:Image as:Link))
# Object Property: as:image (image)
AnnotationAssertion(rdfs:label as:image "image"@en)
ObjectPropertyDomain(as:image as:Object)
ObjectPropertyRange(as:image ObjectUnionOf(as:Image as:Link))
# Object Property: as:inReplyTo (inReplyTo)
AnnotationAssertion(rdfs:label as:inReplyTo "inReplyTo"@en)
ObjectPropertyDomain(as:inReplyTo as:Object)
ObjectPropertyRange(as:inReplyTo ObjectUnionOf(as:Link as:Object))
# Object Property: as:instrument (instrument)
AnnotationAssertion(rdfs:comment as:instrument "Indentifies an object used (or to be used) to complete an activity"@en)
AnnotationAssertion(rdfs:label as:instrument "instrument"@en)
ObjectPropertyDomain(as:instrument as:Activity)
ObjectPropertyRange(as:instrument ObjectUnionOf(as:Link as:Object))
# Object Property: as:items (items)
AnnotationAssertion(rdfs:label as:items "items"@en)
ObjectPropertyDomain(as:items as:Collection)
ObjectPropertyRange(as:items ObjectUnionOf(as:OrderedItems ObjectUnionOf(as:Link as:Object)))
# Object Property: as:last (last)
AnnotationAssertion(rdfs:label as:last "last"@en)
FunctionalObjectProperty(as:last)
ObjectPropertyDomain(as:last as:Collection)
ObjectPropertyRange(as:last ObjectUnionOf(as:CollectionPage as:Link))
# Object Property: as:location (location)
AnnotationAssertion(rdfs:label as:location "location"@en)
ObjectPropertyDomain(as:location as:Object)
ObjectPropertyRange(as:location ObjectUnionOf(as:Link as:Object))
# Object Property: as:name (name)
AnnotationAssertion(rdfs:label as:name "name"@en)
AnnotationAssertion(rdfs:name as:name "The default, plain-text display name of the object or link."@en)
ObjectPropertyDomain(as:name ObjectUnionOf(as:Link as:Object))
ObjectPropertyRange(as:name ObjectUnionOf(rdf:langString xsd:string))
# Object Property: as:next (next)
AnnotationAssertion(rdfs:label as:next "next"@en)
FunctionalObjectProperty(as:next)
ObjectPropertyDomain(as:next as:CollectionPage)
ObjectPropertyRange(as:next ObjectUnionOf(as:CollectionPage as:Link))
# Object Property: as:object (object)
AnnotationAssertion(rdfs:label as:object "object"@en)
ObjectPropertyDomain(as:object ObjectUnionOf(as:Activity as:Relationship))
ObjectPropertyRange(as:object ObjectUnionOf(as:Link as:Object))
# Object Property: as:oneOf (oneOf)
AnnotationAssertion(rdfs:comment as:oneOf "Describes a possible exclusive answer or option for a question."@en)
AnnotationAssertion(rdfs:label as:oneOf "oneOf"@en)
ObjectPropertyDomain(as:oneOf as:Question)
ObjectPropertyRange(as:oneOf ObjectUnionOf(as:Link as:Object))
# Object Property: as:origin (origin)
AnnotationAssertion(rdfs:comment as:origin "For certain activities, specifies the entity from which the action is directed."@en)
AnnotationAssertion(rdfs:label as:origin "origin"@en)
ObjectPropertyDomain(as:origin as:Activity)
ObjectPropertyRange(as:origin ObjectUnionOf(as:Link as:Object))
# Object Property: as:partOf (partOf)
AnnotationAssertion(rdfs:label as:partOf "partOf"@en)
FunctionalObjectProperty(as:partOf)
ObjectPropertyDomain(as:partOf as:CollectionPage)
ObjectPropertyRange(as:partOf ObjectUnionOf(as:Collection as:Link))
# Object Property: as:prev (prev)
AnnotationAssertion(rdfs:label as:prev "prev"@en)
FunctionalObjectProperty(as:prev)
ObjectPropertyDomain(as:prev as:CollectionPage)
ObjectPropertyRange(as:prev ObjectUnionOf(as:CollectionPage as:Link))
# Object Property: as:preview (preview)
AnnotationAssertion(rdfs:label as:preview "preview"@en)
ObjectPropertyDomain(as:preview ObjectUnionOf(as:Link as:Object))
ObjectPropertyRange(as:preview ObjectUnionOf(as:Link as:Object))
# Object Property: as:provider (provider)
AnnotationAssertion(rdfs:label as:provider "provider"@en)
AnnotationAssertion(owl:deprecated as:provider "true"^^xsd:boolean)
ObjectPropertyDomain(as:provider as:Object)
ObjectPropertyRange(as:provider ObjectUnionOf(as:Link as:Object))
# Object Property: as:relationship (relationship)
AnnotationAssertion(rdfs:comment as:relationship "On a Relationship object, describes the type of relationship"@en)
AnnotationAssertion(rdfs:label as:relationship "relationship"@en)
SubObjectPropertyOf(as:relationship rdf:predicate)
ObjectPropertyDomain(as:relationship as:Relationship)
ObjectPropertyRange(as:relationship rdf:Property)
# Object Property: as:replies (replies)
AnnotationAssertion(rdfs:label as:replies "replies"@en)
ObjectPropertyDomain(as:replies as:Object)
ObjectPropertyRange(as:replies as:Collection)
# Object Property: as:result (result)
AnnotationAssertion(rdfs:label as:result "result"@en)
ObjectPropertyDomain(as:result as:Activity)
ObjectPropertyRange(as:result ObjectUnionOf(as:Link as:Object))
# Object Property: as:subject (a)
AnnotationAssertion(rdfs:comment as:subject "On a Relationship object, identifies the subject. e.g. when saying \"John is connected to Sally\", 'subject' refers to 'John'"@en)
AnnotationAssertion(rdfs:label as:subject "a"@en)
SubObjectPropertyOf(as:subject rdf:subject)
FunctionalObjectProperty(as:subject)
ObjectPropertyDomain(as:subject as:Relationship)
ObjectPropertyRange(as:subject ObjectUnionOf(as:Link as:Object))
# Object Property: as:summary (summary)
AnnotationAssertion(rdfs:comment as:summary "A short summary of the object"@en)
AnnotationAssertion(rdfs:label as:summary "summary"@en)
ObjectPropertyDomain(as:summary as:Object)
ObjectPropertyRange(as:summary ObjectUnionOf(rdf:langString xsd:string))
# Object Property: as:tag (tag)
AnnotationAssertion(rdfs:label as:tag "tag"@en)
EquivalentObjectProperties(as:tag as:tags)
ObjectPropertyDomain(as:tag as:Object)
ObjectPropertyRange(as:tag ObjectUnionOf(as:Link as:Object))
# Object Property: as:tags (tags)
AnnotationAssertion(rdfs:label as:tags "tags"@en)
AnnotationAssertion(owl:deprecated as:tags "true"^^xsd:boolean)
ObjectPropertyDomain(as:tags as:Object)
ObjectPropertyRange(as:tags ObjectUnionOf(as:Link as:Object))
# Object Property: as:target (target)
AnnotationAssertion(rdfs:label as:target "target"@en)
ObjectPropertyDomain(as:target as:Activity)
ObjectPropertyRange(as:target ObjectUnionOf(as:Link as:Object))
# Object Property: as:to (to)
AnnotationAssertion(rdfs:label as:to "to"@en)
ObjectPropertyDomain(as:to as:Object)
ObjectPropertyRange(as:to ObjectUnionOf(as:Link as:Object))
# Object Property: as:url (url)
AnnotationAssertion(rdfs:comment as:url "Specifies a link to a specific representation of the Object"@en)
AnnotationAssertion(rdfs:label as:url "url"@en)
ObjectPropertyDomain(as:url as:Object)
ObjectPropertyRange(as:url ObjectUnionOf(owl:Thing as:Link))
############################
# Data Properties
############################
# Data Property: as:accuracy (accuracy)
AnnotationAssertion(rdfs:comment as:accuracy "Specifies the accuracy around the point established by the longitude and latitude"@en)
AnnotationAssertion(rdfs:label as:accuracy "accuracy"@en)
FunctionalDataProperty(as:accuracy)
DataPropertyDomain(as:accuracy as:Place)
DataPropertyRange(as:accuracy DatatypeRestriction(xsd:float xsd:minInclusive "0.0"^^xsd:float))
# Data Property: as:altitude (altitude)
AnnotationAssertion(rdfs:comment as:altitude "The altitude of a place"@en)
AnnotationAssertion(rdfs:label as:altitude "altitude"@en)
FunctionalDataProperty(as:altitude)
DataPropertyDomain(as:altitude as:Place)
DataPropertyRange(as:altitude xsd:float)
# Data Property: as:deleted (deleted)
AnnotationAssertion(rdfs:comment as:deleted "Specifies the date and time the object was deleted"@en)
AnnotationAssertion(rdfs:label as:deleted "deleted"@en)
FunctionalDataProperty(as:deleted)
DataPropertyDomain(as:deleted as:Tombstone)
DataPropertyRange(as:deleted xsd:dateTime)
# Data Property: as:downstreamDuplicates (downstreamDuplicates)
AnnotationAssertion(rdfs:label as:downstreamDuplicates "downstreamDuplicates"@en)
AnnotationAssertion(owl:deprecated as:downstreamDuplicates "true"^^xsd:boolean)
DataPropertyDomain(as:downstreamDuplicates as:Object)
DataPropertyRange(as:downstreamDuplicates xsd:anyURI)
# Data Property: as:duration (duration)
AnnotationAssertion(rdfs:comment as:duration "The duration of the object"@en)
AnnotationAssertion(rdfs:label as:duration "duration"@en)
FunctionalDataProperty(as:duration)
DataPropertyDomain(as:duration as:Object)
DataPropertyRange(as:duration xsd:duration)
# Data Property: as:endTime (endTime)
AnnotationAssertion(rdfs:comment as:endTime "The ending time of the object"@en)
AnnotationAssertion(rdfs:label as:endTime "endTime"@en)
FunctionalDataProperty(as:endTime)
DataPropertyDomain(as:endTime as:Object)
DataPropertyRange(as:endTime xsd:dateTime)
# Data Property: as:height (height)
AnnotationAssertion(rdfs:comment as:height "The display height expressed as device independent pixels"@en)
AnnotationAssertion(rdfs:label as:height "height"@en)
FunctionalDataProperty(as:height)
DataPropertyDomain(as:height as:Link)
DataPropertyRange(as:height xsd:nonNegativeInteger)
# Data Property: as:href (href)
AnnotationAssertion(rdfs:comment as:href "The target URI of the Link"@en)
AnnotationAssertion(rdfs:label as:href "href"@en)
FunctionalDataProperty(as:href)
DataPropertyDomain(as:href as:Link)
DataPropertyRange(as:href xsd:anyURI)
# Data Property: as:hreflang (hreflang)
AnnotationAssertion(rdfs:comment as:hreflang "A hint about the language of the referenced resource"@en)
AnnotationAssertion(rdfs:label as:hreflang "hreflang"@en)
FunctionalDataProperty(as:hreflang)
DataPropertyDomain(as:hreflang as:Link)
DataPropertyRange(as:hreflang xsd:language)
# Data Property: as:id (id)
AnnotationAssertion(rdfs:label as:id "id"@en)
AnnotationAssertion(owl:deprecated as:id "true"^^xsd:boolean)
FunctionalDataProperty(as:id)
DataPropertyDomain(as:id ObjectUnionOf(as:Link as:Object))
DataPropertyRange(as:id xsd:anyURI)
# Data Property: as:latitude (latitude)
AnnotationAssertion(rdfs:comment as:latitude "The latitude"@en)
AnnotationAssertion(rdfs:label as:latitude "latitude"@en)
FunctionalDataProperty(as:latitude)
DataPropertyDomain(as:latitude as:Place)
DataPropertyRange(as:latitude xsd:float)
# Data Property: as:longitude (longitude)
AnnotationAssertion(rdfs:comment as:longitude "The longitude"@en)
AnnotationAssertion(rdfs:label as:longitude "longitude"@en)
FunctionalDataProperty(as:longitude)
DataPropertyDomain(as:longitude as:Place)
DataPropertyRange(as:longitude xsd:float)
# Data Property: as:mediaType (mediaType)
AnnotationAssertion(rdfs:comment as:mediaType "The MIME Media Type"@en)
AnnotationAssertion(rdfs:label as:mediaType "mediaType"@en)
FunctionalDataProperty(as:mediaType)
DataPropertyDomain(as:mediaType ObjectUnionOf(as:Link as:Object))
DataPropertyRange(as:mediaType xsd:string)
# Data Property: as:objectType (objectType)
AnnotationAssertion(rdfs:label as:objectType "objectType"@en)
AnnotationAssertion(owl:deprecated as:objectType "true"^^xsd:boolean)
FunctionalDataProperty(as:objectType)
DataPropertyDomain(as:objectType as:Object)
DataPropertyRange(as:objectType xsd:anyURI)
# Data Property: as:published (published)
AnnotationAssertion(rdfs:comment as:published "Specifies the date and time the object was published"@en)
AnnotationAssertion(rdfs:label as:published "published"@en)
FunctionalDataProperty(as:published)
DataPropertyDomain(as:published as:Object)
DataPropertyRange(as:published xsd:dateTime)
# Data Property: as:radius (radius)
AnnotationAssertion(rdfs:comment as:radius "Specifies a radius around the point established by the longitude and latitude"@en)
AnnotationAssertion(rdfs:label as:radius "radius"@en)
FunctionalDataProperty(as:radius)
DataPropertyDomain(as:radius as:Place)
DataPropertyRange(as:radius DatatypeRestriction(xsd:float xsd:minInclusive "0.0"^^xsd:float))
# Data Property: as:rating (rating)
AnnotationAssertion(rdfs:comment as:rating "A numeric rating (>= 0.0, <= 5.0) for the object"@en)
AnnotationAssertion(rdfs:label as:rating "rating"@en)
AnnotationAssertion(owl:deprecated as:rating "true"^^xsd:boolean)
FunctionalDataProperty(as:rating)
DataPropertyDomain(as:rating as:Object)
DataPropertyRange(as:rating DatatypeRestriction(xsd:float xsd:minInclusive "0.0"^^xsd:float xsd:maxInclusive "5.0"^^xsd:float))
# Data Property: as:rel (rel)
AnnotationAssertion(rdfs:comment as:rel "The RFC 5988 or HTML5 Link Relation associated with the Link"@en)
AnnotationAssertion(rdfs:label as:rel "rel"@en)
DataPropertyDomain(as:rel as:Link)
DataPropertyRange(as:rel xsd:string)
# Data Property: as:startTime (startTime)
AnnotationAssertion(rdfs:comment as:startTime "The starting time of the object"@en)
AnnotationAssertion(rdfs:label as:startTime "startTime"@en)
FunctionalDataProperty(as:startTime)
DataPropertyDomain(as:startTime as:Object)
DataPropertyRange(as:startTime xsd:dateTime)
# Data Property: as:totalItems (totalItems)
AnnotationAssertion(rdfs:comment as:totalItems "The total number of items in a logical collection"@en)
AnnotationAssertion(rdfs:label as:totalItems "totalItems"@en)
FunctionalDataProperty(as:totalItems)
DataPropertyDomain(as:totalItems as:Collection)
DataPropertyRange(as:totalItems xsd:nonNegativeInteger)
# Data Property: as:units (units)
AnnotationAssertion(rdfs:comment as:units "Identifies the unit of measurement used by the radius, altitude and accuracy properties. The value can be expressed either as one of a set of predefined units or as a well-known common URI that identifies units."@en)
AnnotationAssertion(rdfs:label as:units "units"@en)
FunctionalDataProperty(as:units)
DataPropertyDomain(as:units as:Place)
DataPropertyRange(as:units DataUnionOf(xsd:anyURI DataOneOf("cm" "feet" "inches" "km" "m" "miles")))
# Data Property: as:updated (updated)
AnnotationAssertion(rdfs:comment as:updated "Specifies when the object was last updated"@en)
AnnotationAssertion(rdfs:label as:updated "updated"@en)
FunctionalDataProperty(as:updated)
DataPropertyDomain(as:updated as:Object)
DataPropertyRange(as:updated xsd:dateTime)
# Data Property: as:upstreamDuplicates (upstreamDuplicates)
AnnotationAssertion(rdfs:label as:upstreamDuplicates "upstreamDuplicates"@en)
AnnotationAssertion(owl:deprecated as:upstreamDuplicates "true"^^xsd:boolean)
DataPropertyDomain(as:upstreamDuplicates as:Object)
DataPropertyRange(as:upstreamDuplicates xsd:anyURI)
# Data Property: as:verb (verb)
AnnotationAssertion(rdfs:label as:verb "verb"@en)
AnnotationAssertion(owl:deprecated as:verb "true"^^xsd:boolean)
FunctionalDataProperty(as:verb)
DataPropertyDomain(as:verb as:Activity)
DataPropertyRange(as:verb xsd:anyURI)
# Data Property: as:width (width)
AnnotationAssertion(rdfs:comment as:width "Specifies the preferred display width of the content, expressed in terms of device independent pixels."@en)
AnnotationAssertion(rdfs:label as:width "width"@en)
FunctionalDataProperty(as:width)
DataPropertyDomain(as:width as:Link)
DataPropertyRange(as:width xsd:nonNegativeInteger)
############################
# Classes
############################
# Class: as:Accept (Accept)
AnnotationAssertion(rdfs:comment as:Accept "Actor accepts the Object"@en)
AnnotationAssertion(rdfs:label as:Accept "Accept"@en)
SubClassOf(as:Accept as:Activity)
# Class: as:Activity (Activity)
AnnotationAssertion(rdfs:comment as:Activity "An Object representing some form of Action that has been taken"@en)
AnnotationAssertion(rdfs:label as:Activity "Activity"@en)
SubClassOf(as:Activity as:Object)
# Class: as:Add (Add)
AnnotationAssertion(rdfs:comment as:Add "To Add an Object or Link to Something"@en)
AnnotationAssertion(rdfs:label as:Add "Add"@en)
SubClassOf(as:Add as:Activity)
# Class: as:Announce (Announce)
AnnotationAssertion(rdfs:comment as:Announce "Actor announces the object to the target"@en)
AnnotationAssertion(rdfs:label as:Announce "Announce"@en)
SubClassOf(as:Announce as:Activity)
# Class: as:Application (Application)
AnnotationAssertion(rdfs:comment as:Application "Represents a software application of any sort"@en)
AnnotationAssertion(rdfs:label as:Application "Application"@en)
SubClassOf(as:Application as:Object)
# Class: as:Arrive (Arrive)
AnnotationAssertion(rdfs:comment as:Arrive "To Arrive Somewhere (can be used, for instance, to indicate that a particular entity is currently located somewhere, e.g. a \"check-in\")"@en)
AnnotationAssertion(rdfs:label as:Arrive "Arrive"@en)
SubClassOf(as:Arrive as:IntransitiveActivity)
# Class: as:Article (Article)
AnnotationAssertion(rdfs:comment as:Article "A written work. Typically several paragraphs long. For example, a blog post or a news article."@en)
AnnotationAssertion(rdfs:label as:Article "Article"@en)
SubClassOf(as:Article as:Object)
# Class: as:Audio (Audio)
AnnotationAssertion(rdfs:comment as:Audio "An audio file"@en)
AnnotationAssertion(rdfs:label as:Audio "Audio"@en)
SubClassOf(as:Audio as:Document)
# Class: as:Block (Block)
AnnotationAssertion(rdfs:label as:Block "Block"@en)
SubClassOf(as:Block as:Ignore)
# Class: as:Collection (Collection)
AnnotationAssertion(rdfs:comment as:Collection "An ordered or unordered collection of Objects or Links"@en)
AnnotationAssertion(rdfs:label as:Collection "Collection"@en)
SubClassOf(as:Collection as:Object)
# Class: as:CollectionPage (CollectionPage)
AnnotationAssertion(rdfs:comment as:CollectionPage "A subset of items from a Collection"@en)
AnnotationAssertion(rdfs:label as:CollectionPage "CollectionPage"@en)
SubClassOf(as:CollectionPage as:Collection)
# Class: as:Create (Create)
AnnotationAssertion(rdfs:comment as:Create "To Create Something"@en)
AnnotationAssertion(rdfs:label as:Create "Create"@en)
SubClassOf(as:Create as:Activity)
# Class: as:Delete (Delete)
AnnotationAssertion(rdfs:comment as:Delete "To Delete Something"@en)
AnnotationAssertion(rdfs:label as:Delete "Delete"@en)
SubClassOf(as:Delete as:Activity)
# Class: as:Dislike (Dislike)
AnnotationAssertion(rdfs:comment as:Dislike "The actor dislikes the object"@en)
AnnotationAssertion(rdfs:label as:Dislike "Dislike"@en)
SubClassOf(as:Dislike as:Activity)
# Class: as:Document (Document)
AnnotationAssertion(rdfs:comment as:Document "Represents a digital document/file of any sort"@en)
AnnotationAssertion(rdfs:label as:Document "Document"@en)
SubClassOf(as:Document as:Object)
# Class: as:Event (Event)
AnnotationAssertion(rdfs:comment as:Event "An Event of any kind"@en)
AnnotationAssertion(rdfs:label as:Event "Event"@en)
SubClassOf(as:Event as:Object)
# Class: as:Flag (Flag)
AnnotationAssertion(rdfs:comment as:Flag "To flag something (e.g. flag as inappropriate, flag as spam, etc)"@en)
AnnotationAssertion(rdfs:label as:Flag "Flag"@en)
SubClassOf(as:Flag as:Activity)
# Class: as:Follow (Follow)
AnnotationAssertion(rdfs:comment as:Follow "To Express Interest in Something"@en)
AnnotationAssertion(rdfs:label as:Follow "Follow"@en)
SubClassOf(as:Follow as:Activity)
# Class: as:Group (Group)
AnnotationAssertion(rdfs:comment as:Group "A Group of any kind."@en)
AnnotationAssertion(rdfs:label as:Group "Group"@en)
SubClassOf(as:Group as:Object)
# Class: as:Ignore (Ignore)
AnnotationAssertion(rdfs:comment as:Ignore "Actor is ignoring the Object"@en)
AnnotationAssertion(rdfs:label as:Ignore "Ignore"@en)
SubClassOf(as:Ignore as:Activity)
# Class: as:Image (Image)
AnnotationAssertion(rdfs:comment as:Image "An Image file"@en)
AnnotationAssertion(rdfs:label as:Image "Image"@en)
SubClassOf(as:Image as:Document)
# Class: as:IntransitiveActivity (IntransitiveActivity)
AnnotationAssertion(rdfs:comment as:IntransitiveActivity "An Activity that has no direct object"@en)
AnnotationAssertion(rdfs:label as:IntransitiveActivity "IntransitiveActivity"@en)
SubClassOf(as:IntransitiveActivity as:Activity)
SubClassOf(as:IntransitiveActivity ObjectMaxCardinality(0 as:object))
# Class: as:Invite (Invite)
AnnotationAssertion(rdfs:comment as:Invite "To invite someone or something to something"@en)
AnnotationAssertion(rdfs:label as:Invite "Invite"@en)
SubClassOf(as:Invite as:Offer)
# Class: as:Join (Join)
AnnotationAssertion(rdfs:comment as:Join "To Join Something"@en)
AnnotationAssertion(rdfs:label as:Join "Join"@en)
SubClassOf(as:Join as:Activity)
# Class: as:Leave (Leave)
AnnotationAssertion(rdfs:comment as:Leave "To Leave Something"@en)
AnnotationAssertion(rdfs:label as:Leave "Leave"@en)
SubClassOf(as:Leave as:Activity)
# Class: as:Like (Like)
AnnotationAssertion(rdfs:comment as:Like "To Like Something"@en)
AnnotationAssertion(rdfs:label as:Like "Like"@en)
SubClassOf(as:Like as:Activity)
# Class: as:Link (Link)
AnnotationAssertion(rdfs:comment as:Link "Represents a qualified reference to another resource. Patterned after the RFC5988 Web Linking Model"@en)
AnnotationAssertion(rdfs:label as:Link "Link"@en)
DisjointClasses(as:Link as:Object)
# Class: as:Listen (Listen)
AnnotationAssertion(rdfs:comment as:Listen "The actor listened to the object"@en)
AnnotationAssertion(rdfs:label as:Listen "Listen"@en)
SubClassOf(as:Listen as:Activity)
# Class: as:Mention (Mention)
AnnotationAssertion(rdfs:comment as:Mention "A specialized Link that represents an @mention"@en)
AnnotationAssertion(rdfs:label as:Mention "Mention"@en)
SubClassOf(as:Mention as:Link)
# Class: as:Move (Move)
AnnotationAssertion(rdfs:comment as:Move "The actor is moving the object. The target specifies where the object is moving to. The origin specifies where the object is moving from.")
AnnotationAssertion(rdfs:label as:Move "Move"@en)
SubClassOf(as:Move as:Activity)
# Class: as:Note (Note)
AnnotationAssertion(rdfs:comment as:Note "A Short note, typically less than a single paragraph. A \"tweet\" is an example, or a \"status update\""@en)
AnnotationAssertion(rdfs:label as:Note "Note"@en)
SubClassOf(as:Note as:Object)
# Class: as:Object (Object)
AnnotationAssertion(rdfs:label as:Object "Object"@en)
# Class: as:Offer (Offer)
AnnotationAssertion(rdfs:comment as:Offer "To Offer something to someone or something"@en)
AnnotationAssertion(rdfs:label as:Offer "Offer"@en)
SubClassOf(as:Offer as:Activity)
# Class: as:Organization (Organization)
AnnotationAssertion(rdfs:comment as:Organization "An Organization"@en)
AnnotationAssertion(rdfs:label as:Organization "Organization"@en)
SubClassOf(as:Organization as:Object)
# Class: as:Page (Page)
AnnotationAssertion(rdfs:comment as:Page "A Web Page"@en)
AnnotationAssertion(rdfs:label as:Page "Page"@en)
SubClassOf(as:Page as:Object)
# Class: as:Person (Person)
AnnotationAssertion(rdfs:comment as:Person "A Person"@en)
AnnotationAssertion(rdfs:label as:Person "Person"@en)
SubClassOf(as:Person as:Object)
# Class: as:Place (Place)
AnnotationAssertion(rdfs:comment as:Place "A physical or logical location"@en)
AnnotationAssertion(rdfs:label as:Place "Place"@en)
SubClassOf(as:Place as:Object)
# Class: as:Profile (Profile)
AnnotationAssertion(rdfs:comment as:Profile "A Profile Document"@en)
AnnotationAssertion(rdfs:label as:Profile "Profile"@en)
SubClassOf(as:Profile as:Object)
# Class: as:Question (Question)
AnnotationAssertion(rdfs:comment as:Question "A question of any sort."@en)
AnnotationAssertion(rdfs:label as:Question "Question"@en)
SubClassOf(as:Question as:IntransitiveActivity)
# Class: as:Read (Read)
AnnotationAssertion(rdfs:comment as:Read "The actor read the object"@en)
AnnotationAssertion(rdfs:label as:Read "Read"@en)
SubClassOf(as:Read as:Activity)
# Class: as:Reject (Reject)
AnnotationAssertion(rdfs:comment as:Reject "Actor rejects the Object"@en)
AnnotationAssertion(rdfs:label as:Reject "Reject"@en)
SubClassOf(as:Reject as:Activity)
# Class: as:Relationship (Relationship)
AnnotationAssertion(rdfs:comment as:Relationship "Represents a Social Graph relationship between two Individuals (indicated by the 'a' and 'b' properties)"@en)
AnnotationAssertion(rdfs:label as:Relationship "Relationship"@en)
SubClassOf(as:Relationship as:Object)
# Class: as:Remove (Remove)
AnnotationAssertion(rdfs:comment as:Remove "To Remove Something"@en)
AnnotationAssertion(rdfs:label as:Remove "Remove"@en)
SubClassOf(as:Remove as:Activity)
# Class: as:Service (Service)
AnnotationAssertion(rdfs:comment as:Service "A service provided by some entity"@en)
AnnotationAssertion(rdfs:label as:Service "Service"@en)
SubClassOf(as:Service as:Object)
# Class: as:TentativeAccept (TentativeAccept)
AnnotationAssertion(rdfs:comment as:TentativeAccept "Actor tentatively accepts the Object"@en)
AnnotationAssertion(rdfs:label as:TentativeAccept "TentativeAccept"@en)
SubClassOf(as:TentativeAccept as:Accept)
# Class: as:TentativeReject (TentativeReject)
AnnotationAssertion(rdfs:comment as:TentativeReject "Actor tentatively rejects the object"@en)
AnnotationAssertion(rdfs:label as:TentativeReject "TentativeReject"@en)
SubClassOf(as:TentativeReject as:Reject)
# Class: as:Tombstone (Tombstone)
AnnotationAssertion(rdfs:comment as:Tombstone "A placeholder for a deleted object"@en)
AnnotationAssertion(rdfs:label as:Tombstone "Tombstone"@en)
SubClassOf(as:Tombstone as:Object)
# Class: as:Travel (Travel)
AnnotationAssertion(rdfs:comment as:Travel "The actor is traveling to the target. The origin specifies where the actor is traveling from.")
AnnotationAssertion(rdfs:label as:Travel "Travel"@en)
SubClassOf(as:Travel as:IntransitiveActivity)
# Class: as:Undo (Undo)
AnnotationAssertion(rdfs:comment as:Undo "To Undo Something. This would typically be used to indicate that a previous Activity has been undone."@en)
AnnotationAssertion(rdfs:label as:Undo "Undo"@en)
SubClassOf(as:Undo as:Activity)
# Class: as:Update (Update)
AnnotationAssertion(rdfs:comment as:Update "To Update/Modify Something"@en)
AnnotationAssertion(rdfs:label as:Update "Update"@en)
SubClassOf(as:Update as:Activity)
# Class: as:Video (Video)
AnnotationAssertion(rdfs:comment as:Video "A Video document of any kind."@en)
AnnotationAssertion(rdfs:label as:Video "Video"@en)
SubClassOf(as:Video as:Document)
# Class: as:View (View)
AnnotationAssertion(rdfs:comment as:View "The actor viewed the object"@en)
AnnotationAssertion(rdfs:label as:View "View"@en)
SubClassOf(as:View as:Activity)
############################
# Named Individuals
############################
# Individual: rdf:nil (rdf:nil)
ClassAssertion(as:OrderedItems rdf:nil)
# Individual: as:Relationship (Relationship)
ClassAssertion(rdf:Statement as:Relationship)
)

899
data/activitystreams2.owl Normal file
View file

@ -0,0 +1,899 @@
@prefix : <http://www.w3.org/ns/activitystreams#> .
@prefix as: <http://www.w3.org/ns/activitystreams#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.w3.org/ns/activitystreams> .
<http://www.w3.org/ns/activitystreams#> a owl:Ontology ;
rdfs:comment "Extended Activity Streams 2.0 Vocabulary"@en ;
rdfs:label "Activity Streams 2.0"@en .
#################################################################
#
# Datatypes
#
#################################################################
rdf:langString a rdfs:Datatype .
xsd:duration a rdfs:Datatype .
#################################################################
#
# Object Properties
#
#################################################################
as:actor a owl:ObjectProperty ;
rdfs:label "actor"@en ;
rdfs:domain as:Activity ;
rdfs:comment "Subproperty of as:attributedTo that identifies the primary actor"@en ;
rdfs:subPropertyOf as:attributedTo ;
rdfs:range [
a owl:Class ;
owl:unionOf (as:Object as:Link)
] .
as:attributedTo a owl:ObjectProperty ;
rdfs:label "attributedTo"@en;
rdfs:comment "Identifies an entity to which an object is attributed"@en;
rdfs:range [
a owl:Class ;
owl:unionOf (as:Object as:Link)
] ;
rdfs:domain [
a owl:Class ;
owl:unionOf (as:Object as:Link)
] ; .
as:attachment a owl:ObjectProperty ;
rdfs:label "attachment"@en ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Link as:Object )
] ;
rdfs:domain as:Object ;
owl:equivalentProperty as:attachments .
as:attachments a owl:ObjectProperty,
owl:DeprecatedProperty ;
rdfs:label "attachments"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:author a owl:ObjectProperty,
owl:DeprecatedProperty ;
rdfs:label "author"@en ;
rdfs:comment "Identifies the author of an object. Deprecated. Use as:attributedTo instead"@en;
rdfs:domain as:Object ;
rdfs:subPropertyOf as:attributedTo ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:bcc a owl:ObjectProperty ;
rdfs:label "bcc"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:bto a owl:ObjectProperty ;
rdfs:label "bto"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:cc a owl:ObjectProperty ;
rdfs:label "cc"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:context a owl:ObjectProperty ;
rdfs:label "context"@en ;
rdfs:comment "Specifies the context within which an object exists or an activity was performed"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:current a owl:FunctionalProperty ,
owl:ObjectProperty ;
rdfs:label "current"@en ;
rdfs:domain as:Collection ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:CollectionPage as:Link )
] .
as:first a owl:FunctionalProperty ,
owl:ObjectProperty ;
rdfs:label "first"@en ;
rdfs:domain as:Collection ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:CollectionPage as:Link )
] .
as:generator a owl:ObjectProperty ;
rdfs:label "generator"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:icon a owl:ObjectProperty ;
rdfs:label "icon"@en ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Image as:Link )
] ;
rdfs:domain as:Object .
as:image a owl:ObjectProperty ;
rdfs:label "image"@en ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Image as:Link )
] ;
rdfs:domain as:Object .
as:inReplyTo a owl:ObjectProperty ;
rdfs:label "inReplyTo"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:items a owl:ObjectProperty ;
rdfs:label "items"@en ;
rdfs:domain as:Collection ;
rdfs:range [
a owl:Class ;
owl:unionOf (
[
a owl:Class ;
owl:unionOf ( as:Object as:Link )
]
as:OrderedItems
)
] .
as:last a owl:FunctionalProperty ,
owl:ObjectProperty ;
rdfs:label "last"@en ;
rdfs:domain as:Collection ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:CollectionPage as:Link )
] .
as:location a owl:ObjectProperty ;
rdfs:label "location"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:next a owl:FunctionalProperty ,
owl:ObjectProperty ;
rdfs:label "next"@en ;
rdfs:domain as:CollectionPage ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:CollectionPage as:Link )
] .
as:object a owl:ObjectProperty ;
rdfs:label "object"@en ;
rdfs:domain [
a owl:Class ;
owl:unionOf ( as:Activity as:Relationship )
];
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:oneOf a owl:ObjectProperty ;
rdfs:label "oneOf"@en ;
rdfs:comment "Describes a possible exclusive answer or option for a question."@en ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] ;
rdfs:domain as:Question .
as:anyOf a owl:ObjectProperty ;
rdfs:label "oneOf"@en ;
rdfs:comment "Describes a possible inclusive answer or option for a question."@en ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] ;
rdfs:domain as:Question .
as:prev a owl:FunctionalProperty ,
owl:ObjectProperty ;
rdfs:label "prev"@en ;
rdfs:domain as:CollectionPage ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:CollectionPage as:Link )
] .
as:preview a owl:ObjectProperty ;
rdfs:label "preview"@en ;
rdfs:domain [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:provider a owl:ObjectProperty,
owl:DeprecatedProperty ;
rdfs:label "provider"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:replies a owl:ObjectProperty ;
rdfs:label "replies"@en ;
rdfs:range as:Collection ;
rdfs:domain as:Object .
as:result a owl:ObjectProperty ;
rdfs:label "result"@en ;
rdfs:domain as:Activity ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:audience a owl:ObjectProperty ;
rdfs:label "audience"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:partOf a owl:FunctionalProperty ,
owl:ObjectProperty ;
rdfs:label "partOf"@en ;
rdfs:domain as:CollectionPage ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Collection as:Link )
] .
as:tag a owl:ObjectProperty ;
rdfs:label "tag"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:tags a owl:ObjectProperty,
owl:DeprecatedProperty ;
rdfs:label "tags"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] ;
owl:equivalentProperty as:tag ;.
as:target a owl:ObjectProperty ;
rdfs:label "target"@en ;
rdfs:domain as:Activity ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:origin a owl:ObjectProperty ;
rdfs:label "origin"@en ;
rdfs:comment "For certain activities, specifies the entity from which the action is directed."@en ;
rdfs:domain as:Activity ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:instrument a owl:ObjectProperty ;
rdfs:label "instrument"@en ;
rdfs:comment "Indentifies an object used (or to be used) to complete an activity"@en ;
rdfs:domain as:Activity ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:to a owl:ObjectProperty ;
rdfs:label "to"@en ;
rdfs:domain as:Object ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
] .
as:url a owl:ObjectProperty ;
rdfs:label "url"@en ;
rdfs:comment "Specifies a link to a specific representation of the Object"@en ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Link owl:Thing )
] ;
rdfs:domain as:Object .
as:subject a owl:FunctionalProperty,
owl:ObjectProperty;
rdfs:label "a"@en;
rdfs:comment "On a Relationship object, identifies the subject. e.g. when saying \"John is connected to Sally\", 'subject' refers to 'John'"@en ;
rdfs:domain as:Relationship ;
rdfs:subPropertyOf rdf:subject ;
rdfs:range [
a owl:Class ;
owl:unionOf ( as:Link as:Object )
].
as:relationship a owl:ObjectProperty;
rdfs:label "relationship"@en;
rdfs:comment "On a Relationship object, describes the type of relationship"@en;
rdfs:subPropertyOf rdf:predicate ;
rdfs:domain as:Relationship ;
rdfs:range rdf:Property .
as:describes a owl:ObjectProperty,
owl:FunctionalProperty;
rdfs:label "describes"@en;
rdfs:comment "On a Profile object, describes the object described by the profile"@en ;
rdfs:domain as:Profile ;
rdfs:range as:Object .
as:formerType a owl:ObjectProperty,
owl:FunctionalProperty;
rdfs:label "formerType"@en;
rdfs:comment "On a Tombstone object, describes the former type of the deleted object"@en ;
rdfs:domain as:Tombstone ;
rdfs:range as:Object .
#################################################################
#
# Data properties
#
#################################################################
as:accuracy a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "accuracy"@en ;
rdfs:comment "Specifies the accuracy around the point established by the longitude and latitude"@en ;
rdfs:domain as:Place ;
rdfs:range [
a rdfs:Datatype ;
owl:onDatatype xsd:float ;
owl:withRestrictions (
[ xsd:minInclusive "0.0"^^xsd:float ]
)
] .
as:altitude a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "altitude"@en ;
rdfs:comment "The altitude of a place"@en;
rdfs:domain as:Place ;
rdfs:range xsd:float .
as:content a owl:DatatypeProperty ;
rdfs:label "content"@en ;
rdfs:comment "The content of the object."@en ;
rdfs:range [
a owl:Class ;
owl:unionOf ( rdf:langString xsd:string )
] ;
rdfs:domain as:Object .
as:name a owl:DatatypeProperty ;
rdfs:label "name"@en ;
rdfs:name "The default, plain-text display name of the object or link."@en ;
rdfs:range [
a owl:Class ;
owl:unionOf ( rdf:langString xsd:string )
] ;
rdfs:domain [
a owl:Class ;
owl:unionOf ( as:Object as:Link)
].
as:downstreamDuplicates a owl:DatatypeProperty,
owl:DeprecatedProperty ;
rdfs:label "downstreamDuplicates"@en ;
rdfs:range xsd:anyURI ;
rdfs:domain as:Object .
as:duration a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "duration"@en ;
rdfs:comment "The duration of the object"@en ;
rdfs:range xsd:duration ;
rdfs:domain as:Object .
as:endTime a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "endTime"@en ;
rdfs:comment "The ending time of the object"@en ;
rdfs:range xsd:dateTime ;
rdfs:domain as:Object .
as:height a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "height"@en ;
rdfs:comment "The display height expressed as device independent pixels"@en ;
rdfs:range xsd:nonNegativeInteger ;
rdfs:domain as:Link .
as:href a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "href"@en ;
rdfs:comment "The target URI of the Link"@en ;
rdfs:range xsd:anyURI ;
rdfs:domain as:Link .
as:hreflang a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "hreflang"@en ;
rdfs:comment "A hint about the language of the referenced resource"@en ;
rdfs:range xsd:language ;
rdfs:domain as:Link .
as:id a owl:DatatypeProperty ,
owl:FunctionalProperty,
owl:DeprecatedProperty ;
rdfs:label "id"@en ;
rdfs:range xsd:anyURI ;
rdfs:domain [
a owl:Class ;
owl:unionOf (as:Link as:Object)
] .
as:latitude a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "latitude"@en ;
rdfs:comment "The latitude"@en ;
rdfs:range xsd:float ;
rdfs:domain as:Place .
as:longitude a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "longitude"@en ;
rdfs:comment "The longitude"@en ;
rdfs:range xsd:float ;
rdfs:domain as:Place .
as:mediaType a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "mediaType"@en ;
rdfs:comment "The MIME Media Type"@en ;
rdfs:range xsd:string ;
rdfs:domain [
a owl:Class ;
owl:unionOf (as:Link as:Object)
] .
as:objectType a owl:DatatypeProperty ,
owl:FunctionalProperty,
owl:DeprecatedProperty ;
rdfs:label "objectType"@en ;
rdfs:range xsd:anyURI ;
rdfs:domain as:Object .
as:published a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "published"@en ;
rdfs:comment "Specifies the date and time the object was published"@en ;
rdfs:range xsd:dateTime ;
rdfs:domain as:Object .
as:radius a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "radius"@en ;
rdfs:comment "Specifies a radius around the point established by the longitude and latitude"@en ;
rdfs:domain as:Place ;
rdfs:range [
a rdfs:Datatype ;
owl:onDatatype xsd:float ;
owl:withRestrictions (
[ xsd:minInclusive "0.0"^^xsd:float ]
)
] .
as:rating a owl:DatatypeProperty ,
owl:FunctionalProperty,
owl:DeprecatedProperty ;
rdfs:label "rating"@en ;
rdfs:comment "A numeric rating (>= 0.0, <= 5.0) for the object"@en ;
rdfs:domain as:Object ;
rdfs:range [
a rdfs:Datatype ;
owl:onDatatype xsd:float ;
owl:withRestrictions (
[ xsd:minInclusive "0.0"^^xsd:float ]
[ xsd:maxInclusive "5.0"^^xsd:float ]
)] .
as:rel a owl:DatatypeProperty ;
rdfs:label "rel"@en ;
rdfs:comment "The RFC 5988 or HTML5 Link Relation associated with the Link"@en ;
rdfs:range xsd:string ;
rdfs:domain as:Link .
as:startTime a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "startTime"@en ;
rdfs:comment "The starting time of the object"@en ;
rdfs:range xsd:dateTime ;
rdfs:domain as:Object .
as:summary a owl:DatatypeProperty ;
rdfs:label "summary"@en ;
rdfs:comment "A short summary of the object"@en ;
rdfs:range [
a owl:Class ;
owl:unionOf ( rdf:langString xsd:string )
] ;
rdfs:domain as:Object .
as:totalItems a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "totalItems"@en ;
rdfs:comment "The total number of items in a logical collection"@en ;
rdfs:range xsd:nonNegativeInteger ;
rdfs:domain as:Collection .
as:units a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "units"@en ;
rdfs:comment "Identifies the unit of measurement used by the radius, altitude and accuracy properties. The value can be expressed either as one of a set of predefined units or as a well-known common URI that identifies units."@en ;
rdfs:range [
a rdfs:Datatype ;
owl:unionOf (
[ a rdfs:Datatype ;
owl:oneOf (
"inches"
"feet"
"miles"
"cm"
"m"
"km"
)
]
xsd:anyURI )
] ;
rdfs:domain as:Place .
as:updated a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "updated"@en ;
rdfs:comment "Specifies when the object was last updated"@en ;
rdfs:range xsd:dateTime ;
rdfs:domain as:Object .
as:upstreamDuplicates a owl:DatatypeProperty,
owl:DeprecatedProperty ;
rdfs:label "upstreamDuplicates"@en ;
rdfs:range xsd:anyURI ;
rdfs:domain as:Object .
as:verb a owl:DatatypeProperty ,
owl:FunctionalProperty,
owl:DeprecatedProperty ;
rdfs:label "verb"@en ;
rdfs:range xsd:anyURI ;
rdfs:domain as:Activity .
as:width a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "width"@en ;
rdfs:comment "Specifies the preferred display width of the content, expressed in terms of device independent pixels."@en ;
rdfs:range xsd:nonNegativeInteger ;
rdfs:domain as:Link .
as:deleted a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "deleted"@en ;
rdfs:comment "Specifies the date and time the object was deleted"@en ;
rdfs:range xsd:dateTime ;
rdfs:domain as:Tombstone .
#################################################################
#
# Classes
#
#################################################################
as:Accept a owl:Class ;
rdfs:label "Accept"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "Actor accepts the Object"@en .
as:Activity a owl:Class ;
rdfs:label "Activity"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "An Object representing some form of Action that has been taken"@en .
as:Block a owl:Class ;
rdfs:label "Block"@en ;
rdfs:subClassOf as:Ignore .
as:IntransitiveActivity a owl:Class ;
rdfs:label "IntransitiveActivity"@en ;
rdfs:subClassOf as:Activity ;
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty as:object ;
owl:maxCardinality "0"^^xsd:nonNegativeInteger
] ;
rdfs:comment "An Activity that has no direct object"@en .
as:Add a owl:Class ;
rdfs:label "Add"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "To Add an Object or Link to Something"@en .
as:Announce a owl:Class ;
rdfs:label "Announce"@en;
rdfs:subClassOf as:Activity ;
rdfs:comment "Actor announces the object to the target"@en .
as:Application a owl:Class ;
rdfs:label "Application"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "Represents a software application of any sort"@en .
as:Arrive a owl:Class ;
rdfs:label "Arrive"@en ;
rdfs:subClassOf as:IntransitiveActivity ;
rdfs:comment "To Arrive Somewhere (can be used, for instance, to indicate that a particular entity is currently located somewhere, e.g. a \"check-in\")"@en .
as:Article a owl:Class ;
rdfs:label "Article"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "A written work. Typically several paragraphs long. For example, a blog post or a news article."@en .
as:Audio a owl:Class ;
rdfs:label "Audio"@en ;
rdfs:subClassOf as:Document ;
rdfs:comment "An audio file"@en .
as:Collection a owl:Class ;
rdfs:label "Collection"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "An ordered or unordered collection of Objects or Links"@en .
as:CollectionPage a owl:Class ;
rdfs:label "CollectionPage"@en ;
rdfs:subClassOf as:Collection ;
rdfs:comment "A subset of items from a Collection"@en .
as:Relationship a owl:Class, rdf:Statement ;
rdfs:label "Relationship"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "Represents a Social Graph relationship between two Individuals (indicated by the 'a' and 'b' properties)"@en .
as:Create a owl:Class ;
rdfs:label "Create"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "To Create Something"@en .
as:Delete a owl:Class ;
rdfs:label "Delete"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "To Delete Something"@en .
as:Dislike a owl:Class ;
rdfs:label "Dislike"@en;
rdfs:subClassOf as:Activity ;
rdfs:comment "The actor dislikes the object"@en .
as:Document a owl:Class ;
rdfs:label "Document"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "Represents a digital document/file of any sort"@en .
as:Event a owl:Class ;
rdfs:label "Event"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "An Event of any kind"@en .
as:Flag a owl:Class ;
rdfs:label "Flag"@en;
rdfs:subClassOf as:Activity ;
rdfs:comment "To flag something (e.g. flag as inappropriate, flag as spam, etc)"@en .
as:Follow a owl:Class ;
rdfs:label "Follow"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "To Express Interest in Something"@en .
as:Group a owl:Class ;
rdfs:label "Group"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "A Group of any kind."@en .
as:Ignore a owl:Class ;
rdfs:label "Ignore"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "Actor is ignoring the Object"@en .
as:Image a owl:Class ;
rdfs:label "Image"@en ;
rdfs:subClassOf as:Document ;
rdfs:comment "An Image file"@en .
as:Invite a owl:Class ;
rdfs:label "Invite"@en ;
rdfs:subClassOf as:Offer ;
rdfs:comment "To invite someone or something to something"@en .
as:Join a owl:Class ;
rdfs:label "Join"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "To Join Something"@en .
as:Leave a owl:Class ;
rdfs:label "Leave"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "To Leave Something"@en .
as:Like a owl:Class ;
rdfs:label "Like"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "To Like Something"@en .
as:View a owl:Class ;
rdfs:label "View"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "The actor viewed the object"@en .
as:Listen a owl:Class ;
rdfs:label "Listen"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "The actor listened to the object"@en .
as:Read a owl:Class ;
rdfs:label "Read"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "The actor read the object"@en .
as:Move a owl:Class ;
rdfs:label "Move"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "The actor is moving the object. The target specifies where the object is moving to. The origin specifies where the object is moving from." .
as:Travel a owl:Class ;
rdfs:label "Travel"@en ;
rdfs:subClassOf as:IntransitiveActivity ;
rdfs:comment "The actor is traveling to the target. The origin specifies where the actor is traveling from." .
as:Link a owl:Class ;
rdfs:label "Link"@en ;
owl:disjointWith as:Object ;
rdfs:comment "Represents a qualified reference to another resource. Patterned after the RFC5988 Web Linking Model"@en .
as:Mention a owl:Class ;
rdfs:label "Mention"@en ;
rdfs:subClassOf as:Link ;
rdfs:comment "A specialized Link that represents an @mention"@en .
as:Note a owl:Class ;
rdfs:label "Note"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "A Short note, typically less than a single paragraph. A \"tweet\" is an example, or a \"status update\""@en .
as:Object a owl:Class ;
rdfs:label "Object"@en .
as:Offer a owl:Class ;
rdfs:label "Offer"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "To Offer something to someone or something"@en .
as:Page a owl:Class ;
rdfs:label "Page"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "A Web Page"@en .
as:Person a owl:Class ;
rdfs:label "Person"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "A Person"@en .
as:Organization a owl:Class ;
rdfs:label "Organization"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "An Organization"@en .
as:Profile a owl:Class ;
rdfs:label "Profile"@en;
rdfs:subClassOf as:Object ;
rdfs:comment "A Profile Document"@en .
as:Place a owl:Class ;
rdfs:label "Place"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "A physical or logical location"@en .
as:Question a owl:Class ;
rdfs:label "Question"@en;
rdfs:subClassOf as:IntransitiveActivity ;
rdfs:comment "A question of any sort."@en .
as:Reject a owl:Class ;
rdfs:label "Reject"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "Actor rejects the Object"@en .
as:Remove a owl:Class ;
rdfs:label "Remove"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "To Remove Something"@en .
as:Service a owl:Class ;
rdfs:label "Service"@en ;
rdfs:subClassOf as:Object ;
rdfs:comment "A service provided by some entity"@en .
as:TentativeAccept a owl:Class ;
rdfs:label "TentativeAccept"@en ;
rdfs:subClassOf as:Accept ;
rdfs:comment "Actor tentatively accepts the Object"@en .
as:TentativeReject a owl:Class ;
rdfs:label "TentativeReject"@en ;
rdfs:subClassOf as:Reject ;
rdfs:comment "Actor tentatively rejects the object"@en .
as:Tombstone a owl:Class ;
rdfs:label "Tombstone"@en;
rdfs:subClassOf as:Object ;
rdfs:comment "A placeholder for a deleted object"@en .
as:Undo a owl:Class ;
rdfs:label "Undo"@en ;
rdfs:subClassOf as:Activity ;
rdfs:comment "To Undo Something. This would typically be used to indicate that a previous Activity has been undone."@en .
as:Update a owl:Class ;
rdfs:label "Update"@en ;
rdfs:comment "To Update/Modify Something"@en ;
rdfs:subClassOf as:Activity .
as:Video a owl:Class ;
rdfs:label "Video"@en ;
rdfs:comment "A Video document of any kind."@en ;
rdfs:subClassOf as:Document .
rdf:nil a as:OrderedItems .

View file

@ -0,0 +1,7 @@
from importlib.metadata import version, PackageNotFoundError
try:
__version__ = version(__name__)
except PackageNotFoundError:
# package not installed
__version__ = "0.0.0"

View file

@ -0,0 +1,673 @@
id: https://github.com/p2p_ld/linkml-activitypub
name: linkml-activitypub
title: linkml-activitypub
description: |-
LinkML representation of Activitypub (ActivityStreams) Schema
license: GNU GPL v3.0
see_also:
- https://linkml-activitypub.readthedocs.io
- https://github.com/p2p_ld/linkml-activitypub
imports:
- linkml:types
prefixes:
as: http://www.w3.org/ns/activitystreams#
linkml: https://w3id.org/linkml/
owl: http://www.w3.org/2002/07/owl#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
xml: http://www.w3.org/XML/1998/namespace
xsd: http://www.w3.org/2001/XMLSchema#
rdfs: http://www.w3.org/2000/01/rdf-schema#
default_prefix: as
types:
langString:
classes:
Object:
slots:
- attachment
- attachments
- attributedTo
- audience
- author
- bcc
- bto
- cc
- content
- context
- generator
- icon
- image
- inReplyTo
- location
- name
- preview
- provider
- replies
- summary
- tag
- tags
- to
- url
- downstreamDuplicates
- duration
- endTime
- id
- mediaType
- objectType
- published
- rating
- startTime
- updated
- upstreamDuplicates
class_uri: as:Object
Property:
class_uri: rdf:Property
Statement:
class_uri: rdf:Statement
Accept:
comments:
- Actor accepts the Object@en
is_a: Activity
class_uri: as:Accept
Activity:
comments:
- An Object representing some form of Action that has been taken@en
is_a: Object
slots:
- actor
- instrument
- object
- origin
- result
- target
- verb
class_uri: as:Activity
Add:
comments:
- To Add an Object or Link to Something@en
is_a: Activity
class_uri: as:Add
Announce:
comments:
- Actor announces the object to the target@en
is_a: Activity
class_uri: as:Announce
Application:
comments:
- Represents a software application of any sort@en
is_a: Object
class_uri: as:Application
Arrive:
comments:
- To Arrive Somewhere (can be used, for instance, to indicate that a particular
entity is currently located somewhere, e.g. a \"check-in\")@en
is_a: IntransitiveActivity
class_uri: as:Arrive
Article:
comments:
- A written work. Typically several paragraphs long. For example, a blog post
or a news article.@en
is_a: Object
class_uri: as:Article
Audio:
comments:
- An audio file@en
is_a: Document
class_uri: as:Audio
Block:
is_a: Ignore
class_uri: as:Block
Collection:
comments:
- An ordered or unordered collection of Objects or Links@en
is_a: Object
slots:
- current
- first
- items
- last
- totalItems
class_uri: as:Collection
CollectionPage:
comments:
- A subset of items from a Collection@en
is_a: Collection
slots:
- next
- partOf
- prev
class_uri: as:CollectionPage
Create:
comments:
- To Create Something@en
is_a: Activity
class_uri: as:Create
Delete:
comments:
- To Delete Something@en
is_a: Activity
class_uri: as:Delete
Dislike:
comments:
- The actor dislikes the object@en
is_a: Activity
class_uri: as:Dislike
Document:
comments:
- Represents a digital document/file of any sort@en
is_a: Object
class_uri: as:Document
Event:
comments:
- An Event of any kind@en
is_a: Object
class_uri: as:Event
Flag:
comments:
- To flag something (e.g. flag as inappropriate, flag as spam, etc)@en
is_a: Activity
class_uri: as:Flag
Follow:
comments:
- To Express Interest in Something@en
is_a: Activity
class_uri: as:Follow
Group:
comments:
- A Group of any kind.@en
is_a: Object
class_uri: as:Group
Ignore:
comments:
- Actor is ignoring the Object@en
is_a: Activity
class_uri: as:Ignore
Image:
comments:
- An Image file@en
is_a: Document
class_uri: as:Image
IntransitiveActivity:
comments:
- An Activity that has no direct object@en
is_a: Activity
class_uri: as:IntransitiveActivity
Invite:
comments:
- To invite someone or something to something@en
is_a: Offer
class_uri: as:Invite
Join:
comments:
- To Join Something@en
is_a: Activity
class_uri: as:Join
Leave:
comments:
- To Leave Something@en
is_a: Activity
class_uri: as:Leave
Like:
comments:
- To Like Something@en
is_a: Activity
class_uri: as:Like
Link:
comments:
- Represents a qualified reference to another resource. Patterned after the RFC5988
Web Linking Model@en
slots:
- attributedTo
- name
- preview
- height
- href
- hreflang
- id
- mediaType
- rel
- width
class_uri: as:Link
Listen:
comments:
- The actor listened to the object@en
is_a: Activity
class_uri: as:Listen
Mention:
comments:
- A specialized Link that represents an @mention@en
is_a: Link
class_uri: as:Mention
Move:
comments:
- The actor is moving the object. The target specifies where the object is moving
to. The origin specifies where the object is moving from.
is_a: Activity
class_uri: as:Move
Note:
comments:
- A Short note, typically less than a single paragraph. A \"tweet\" is an example,
or a \"status update\"@en
is_a: Object
class_uri: as:Note
Offer:
comments:
- To Offer something to someone or something@en
is_a: Activity
class_uri: as:Offer
OrderedItems:
class_uri: as:OrderedItems
Organization:
comments:
- An Organization@en
is_a: Object
class_uri: as:Organization
Page:
comments:
- A Web Page@en
is_a: Object
class_uri: as:Page
Person:
comments:
- A Person@en
is_a: Object
class_uri: as:Person
Place:
comments:
- A physical or logical location@en
is_a: Object
slots:
- accuracy
- altitude
- latitude
- longitude
- radius
- units
class_uri: as:Place
Profile:
comments:
- A Profile Document@en
is_a: Object
slots:
- describes
class_uri: as:Profile
Question:
comments:
- A question of any sort.@en
is_a: IntransitiveActivity
slots:
- anyOf
- oneOf
class_uri: as:Question
Read:
comments:
- The actor read the object@en
is_a: Activity
class_uri: as:Read
Reject:
comments:
- Actor rejects the Object@en
is_a: Activity
class_uri: as:Reject
Relationship:
comments:
- Represents a Social Graph relationship between two Individuals (indicated by
the 'a' and 'b' properties)@en
is_a: Object
slots:
- object
- relationship
- subject
class_uri: as:Relationship
Remove:
comments:
- To Remove Something@en
is_a: Activity
class_uri: as:Remove
Service:
comments:
- A service provided by some entity@en
is_a: Object
class_uri: as:Service
TentativeAccept:
comments:
- Actor tentatively accepts the Object@en
is_a: Accept
class_uri: as:TentativeAccept
TentativeReject:
comments:
- Actor tentatively rejects the object@en
is_a: Reject
class_uri: as:TentativeReject
Tombstone:
comments:
- A placeholder for a deleted object@en
is_a: Object
slots:
- formerType
- deleted
class_uri: as:Tombstone
Travel:
comments:
- The actor is traveling to the target. The origin specifies where the actor is
traveling from.
is_a: IntransitiveActivity
class_uri: as:Travel
Undo:
comments:
- To Undo Something. This would typically be used to indicate that a previous
Activity has been undone.@en
is_a: Activity
class_uri: as:Undo
Update:
comments:
- To Update/Modify Something@en
is_a: Activity
class_uri: as:Update
Video:
comments:
- A Video document of any kind.@en
is_a: Document
class_uri: as:Video
View:
comments:
- The actor viewed the object@en
is_a: Activity
class_uri: as:View
slots:
predicate:
slot_uri: rdf:predicate
multivalued: true
subject:
comments:
- On a Relationship object, identifies the subject. e.g. when saying \"John is
connected to Sally\", 'subject' refers to 'John'@en
is_a: subject
slot_uri: as:subject
multivalued: true
actor:
comments:
- Subproperty of as:attributedTo that identifies the primary actor@en
is_a: attributedTo
slot_uri: as:actor
multivalued: true
anyOf:
comments:
- Describes a possible inclusive answer or option for a question.@en
slot_uri: as:anyOf
multivalued: true
attachment:
slot_uri: as:attachment
multivalued: true
attachments:
slot_uri: as:attachments
multivalued: true
attributedTo:
comments:
- Identifies an entity to which an object is attributed@en
slot_uri: as:attributedTo
multivalued: true
audience:
slot_uri: as:audience
multivalued: true
author:
comments:
- Identifies the author of an object. Deprecated. Use as:attributedTo instead@en
is_a: attributedTo
slot_uri: as:author
multivalued: true
bcc:
slot_uri: as:bcc
multivalued: true
bto:
slot_uri: as:bto
multivalued: true
cc:
slot_uri: as:cc
multivalued: true
context:
comments:
- Specifies the context within which an object exists or an activity was performed@en
slot_uri: as:context
multivalued: true
current:
slot_uri: as:current
multivalued: true
describes:
comments:
- On a Profile object, describes the object described by the profile@en
slot_uri: as:describes
multivalued: true
range: Object
first:
slot_uri: as:first
multivalued: true
formerType:
comments:
- On a Tombstone object, describes the former type of the deleted object@en
slot_uri: as:formerType
multivalued: true
range: Object
generator:
slot_uri: as:generator
multivalued: true
icon:
slot_uri: as:icon
multivalued: true
image:
slot_uri: as:image
multivalued: true
inReplyTo:
slot_uri: as:inReplyTo
multivalued: true
instrument:
comments:
- Indentifies an object used (or to be used) to complete an activity@en
slot_uri: as:instrument
multivalued: true
items:
slot_uri: as:items
multivalued: true
last:
slot_uri: as:last
multivalued: true
location:
slot_uri: as:location
multivalued: true
next:
slot_uri: as:next
multivalued: true
object:
slot_uri: as:object
multivalued: true
oneOf:
comments:
- Describes a possible exclusive answer or option for a question.@en
slot_uri: as:oneOf
multivalued: true
origin:
comments:
- For certain activities, specifies the entity from which the action is directed.@en
slot_uri: as:origin
multivalued: true
partOf:
slot_uri: as:partOf
multivalued: true
prev:
slot_uri: as:prev
multivalued: true
preview:
slot_uri: as:preview
multivalued: true
provider:
slot_uri: as:provider
multivalued: true
relationship:
comments:
- On a Relationship object, describes the type of relationship@en
is_a: predicate
slot_uri: as:relationship
multivalued: true
range: Property
replies:
slot_uri: as:replies
multivalued: true
range: Collection
result:
slot_uri: as:result
multivalued: true
tag:
slot_uri: as:tag
multivalued: true
tags:
slot_uri: as:tags
multivalued: true
target:
slot_uri: as:target
multivalued: true
to:
slot_uri: as:to
multivalued: true
url:
comments:
- Specifies a link to a specific representation of the Object@en
slot_uri: as:url
multivalued: true
accuracy:
comments:
- Specifies the accuracy around the point established by the longitude and latitude@en
slot_uri: as:accuracy
multivalued: true
altitude:
comments:
- The altitude of a place@en
slot_uri: as:altitude
multivalued: true
content:
comments:
- The content of the object.@en
slot_uri: as:content
multivalued: true
deleted:
comments:
- Specifies the date and time the object was deleted@en
slot_uri: as:deleted
multivalued: true
downstreamDuplicates:
slot_uri: as:downstreamDuplicates
multivalued: true
duration:
comments:
- The duration of the object@en
slot_uri: as:duration
multivalued: true
endTime:
comments:
- The ending time of the object@en
slot_uri: as:endTime
multivalued: true
height:
comments:
- The display height expressed as device independent pixels@en
slot_uri: as:height
multivalued: true
href:
comments:
- The target URI of the Link@en
slot_uri: as:href
multivalued: true
hreflang:
comments:
- A hint about the language of the referenced resource@en
slot_uri: as:hreflang
multivalued: true
id:
slot_uri: as:id
multivalued: true
latitude:
comments:
- The latitude@en
slot_uri: as:latitude
multivalued: true
longitude:
comments:
- The longitude@en
slot_uri: as:longitude
multivalued: true
mediaType:
comments:
- The MIME Media Type@en
slot_uri: as:mediaType
multivalued: true
name:
slot_uri: rdfs:name
multivalued: true
objectType:
slot_uri: as:objectType
multivalued: true
published:
comments:
- Specifies the date and time the object was published@en
slot_uri: as:published
multivalued: true
radius:
comments:
- Specifies a radius around the point established by the longitude and latitude@en
slot_uri: as:radius
multivalued: true
rating:
comments:
- A numeric rating (>= 0.0, <= 5.0) for the object@en
slot_uri: as:rating
multivalued: true
rel:
comments:
- The RFC 5988 or HTML5 Link Relation associated with the Link@en
slot_uri: as:rel
multivalued: true
startTime:
comments:
- The starting time of the object@en
slot_uri: as:startTime
multivalued: true
summary:
comments:
- A short summary of the object@en
slot_uri: as:summary
multivalued: true
totalItems:
comments:
- The total number of items in a logical collection@en
slot_uri: as:totalItems
multivalued: true
units:
comments:
- Identifies the unit of measurement used by the radius, altitude and accuracy
properties. The value can be expressed either as one of a set of predefined
units or as a well-known common URI that identifies units.@en
slot_uri: as:units
multivalued: true
updated:
comments:
- Specifies when the object was last updated@en
slot_uri: as:updated
multivalued: true
upstreamDuplicates:
slot_uri: as:upstreamDuplicates
multivalued: true
verb:
slot_uri: as:verb
multivalued: true
width:
comments:
- Specifies the preferred display width of the content, expressed in terms of
device independent pixels.@en
slot_uri: as:width
multivalued: true

View file

@ -0,0 +1 @@
from .activitystreams import *

View file

@ -0,0 +1,632 @@
# Auto generated from activitypub.yaml by pythongen.py version: 0.9.0
# Generation date: 2022-09-06T10:01:50
# Schema: my_datamodel
#
# id: https://w3id.org/my_org/my_datamodel
# description: Enter a detailed description of your project here
# license: https://creativecommons.org/publicdomain/zero/1.0/
import dataclasses
import re
from jsonasobj2 import as_dict
from typing import Optional, List, Union, Dict, ClassVar, Any
from dataclasses import dataclass
from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue
from linkml_runtime.utils.slot import Slot
from linkml_runtime.utils.metamodelcore import empty_list, empty_dict
from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str
from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from linkml_runtime.utils.enumerations import EnumDefinitionImpl
from rdflib import URIRef
from linkml_runtime.utils.curienamespace import CurieNamespace
from linkml_runtime.utils.metamodelcore import Bool, XSDDate
metamodel_version = "1.7.0"
version = None
# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs
# Namespaces
PATO = CurieNamespace('PATO',
'http://purl.obolibrary.org/obo/PATO_')
BIOLINK = CurieNamespace('biolink',
'https://w3id.org/biolink/')
FAMREL = CurieNamespace('famrel',
'http://example.org/famrel/')
LINKML = CurieNamespace('linkml',
'https://w3id.org/linkml/')
MY_DATAMODEL = CurieNamespace('my_datamodel',
'https://w3id.org/my_org/my_datamodel')
PROV = CurieNamespace('prov',
'http://www.w3.org/ns/prov#')
SCHEMA = CurieNamespace('schema',
'http://schema.org/')
DEFAULT_ = MY_DATAMODEL
# Types
# Class references
class NamedThingId(extended_str):
pass
class PersonId(NamedThingId):
pass
class OrganizationId(NamedThingId):
pass
@dataclass
class Registry(YAMLRoot):
"""
Top level data container
"""
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = MY_DATAMODEL.Registry
class_class_curie: ClassVar[str] = "my_datamodel:Registry"
class_name: ClassVar[str] = "Registry"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.Registry
persons: Optional[Union[
Dict[Union[str, PersonId], Union[dict, "Person"]],
List[Union[dict, "Person"]]
]] = empty_dict()
organizations: Optional[Union[
Dict[Union[str, OrganizationId], Union[dict, "Organization"]],
List[Union[dict, "Organization"]]
]] = empty_dict()
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
self._normalize_inlined_as_list(
slot_name="persons",
slot_type=Person,
key_name="id",
keyed=True
)
self._normalize_inlined_as_list(
slot_name="organizations",
slot_type=Organization,
key_name="id",
keyed=True
)
super().__post_init__(**kwargs)
@dataclass
class NamedThing(YAMLRoot):
"""
A generic grouping for any identifiable entity
"""
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = MY_DATAMODEL.NamedThing
class_class_curie: ClassVar[str] = "my_datamodel:NamedThing"
class_name: ClassVar[str] = "NamedThing"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.NamedThing
id: Union[str, NamedThingId] = None
name: Optional[str] = None
description: Optional[str] = None
image: Optional[str] = None
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self._is_empty(self.id):
self.MissingRequiredField("id")
if not isinstance(self.id, NamedThingId):
self.id = NamedThingId(self.id)
if self.name is not None and not isinstance(self.name, str):
self.name = str(self.name)
if self.description is not None \
and not isinstance(self.description, str):
self.description = str(self.description)
if self.image is not None and not isinstance(self.image, str):
self.image = str(self.image)
super().__post_init__(**kwargs)
@dataclass
class Person(NamedThing):
"""
A person (alive, dead, undead, or fictional).
"""
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = SCHEMA.Person
class_class_curie: ClassVar[str] = "schema:Person"
class_name: ClassVar[str] = "Person"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.Person
id: Union[str, PersonId] = None
primary_email: Optional[str] = None
birth_date: Optional[str] = None
age_in_years: Optional[int] = None
current_address: Optional[Union[dict, "Address"]] = None
has_familial_relationships: Optional[Union[
Union[dict, "FamilialRelationship"],
List[Union[dict, "FamilialRelationship"]]
]] = empty_list()
aliases: Optional[Union[str, List[str]]] = empty_list()
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self._is_empty(self.id):
self.MissingRequiredField("id")
if not isinstance(self.id, PersonId):
self.id = PersonId(self.id)
if self.primary_email is not None \
and not isinstance(self.primary_email, str):
self.primary_email = str(self.primary_email)
if self.birth_date is not None \
and not isinstance(self.birth_date, str):
self.birth_date = str(self.birth_date)
if self.age_in_years is not None \
and not isinstance(self.age_in_years, int):
self.age_in_years = int(self.age_in_years)
if self.current_address is not None \
and not isinstance(self.current_address, Address):
self.current_address = Address(**as_dict(self.current_address))
if not isinstance(self.has_familial_relationships, list):
self.has_familial_relationships = [self.has_familial_relationships] \
if self.has_familial_relationships is not None \
else []
self.has_familial_relationships = [
v if isinstance(v, FamilialRelationship)
else FamilialRelationship(**as_dict(v))
for v in self.has_familial_relationships]
if not isinstance(self.aliases, list):
self.aliases = [self.aliases] if self.aliases is not None else []
self.aliases = [v if isinstance(v, str) else str(v)
for v in self.aliases]
super().__post_init__(**kwargs)
@dataclass
class HasAliases(YAMLRoot):
"""
A mixin applied to any class that can have aliases/alternateNames
"""
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = MY_DATAMODEL.HasAliases
class_class_curie: ClassVar[str] = "my_datamodel:HasAliases"
class_name: ClassVar[str] = "HasAliases"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.HasAliases
aliases: Optional[Union[str, List[str]]] = empty_list()
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if not isinstance(self.aliases, list):
self.aliases = [self.aliases] if self.aliases is not None else []
self.aliases = [v if isinstance(v, str) else str(v)
for v in self.aliases]
super().__post_init__(**kwargs)
@dataclass
class Organization(NamedThing):
"""
An organization such as a company or university
"""
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = SCHEMA.Organization
class_class_curie: ClassVar[str] = "schema:Organization"
class_name: ClassVar[str] = "Organization"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.Organization
id: Union[str, OrganizationId] = None
mission_statement: Optional[str] = None
founding_date: Optional[str] = None
aliases: Optional[Union[str, List[str]]] = empty_list()
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self._is_empty(self.id):
self.MissingRequiredField("id")
if not isinstance(self.id, OrganizationId):
self.id = OrganizationId(self.id)
if self.mission_statement is not None \
and not isinstance(self.mission_statement, str):
self.mission_statement = str(self.mission_statement)
if self.founding_date is not None \
and not isinstance(self.founding_date, str):
self.founding_date = str(self.founding_date)
if not isinstance(self.aliases, list):
self.aliases = [self.aliases] if self.aliases is not None else []
self.aliases = [v if isinstance(v, str) else str(v)
for v in self.aliases]
super().__post_init__(**kwargs)
@dataclass
class Address(YAMLRoot):
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = SCHEMA.PostalAddress
class_class_curie: ClassVar[str] = "schema:PostalAddress"
class_name: ClassVar[str] = "Address"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.Address
street: Optional[str] = None
city: Optional[str] = None
postal_code: Optional[str] = None
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self.street is not None and not isinstance(self.street, str):
self.street = str(self.street)
if self.city is not None and not isinstance(self.city, str):
self.city = str(self.city)
if self.postal_code is not None \
and not isinstance(self.postal_code, str):
self.postal_code = str(self.postal_code)
super().__post_init__(**kwargs)
@dataclass
class Relationship(YAMLRoot):
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = MY_DATAMODEL.Relationship
class_class_curie: ClassVar[str] = "my_datamodel:Relationship"
class_name: ClassVar[str] = "Relationship"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.Relationship
started_at_time: Optional[Union[str, XSDDate]] = None
ended_at_time: Optional[Union[str, XSDDate]] = None
related_to: Optional[str] = None
type: Optional[str] = None
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self.started_at_time is not None \
and not isinstance(self.started_at_time, XSDDate):
self.started_at_time = XSDDate(self.started_at_time)
if self.ended_at_time is not None \
and not isinstance(self.ended_at_time, XSDDate):
self.ended_at_time = XSDDate(self.ended_at_time)
if self.related_to is not None \
and not isinstance(self.related_to, str):
self.related_to = str(self.related_to)
if self.type is not None and not isinstance(self.type, str):
self.type = str(self.type)
super().__post_init__(**kwargs)
@dataclass
class FamilialRelationship(Relationship):
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = MY_DATAMODEL.FamilialRelationship
class_class_curie: ClassVar[str] = "my_datamodel:FamilialRelationship"
class_name: ClassVar[str] = "FamilialRelationship"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.FamilialRelationship
type: Union[str, "FamilialRelationshipType"] = None
related_to: Union[str, PersonId] = None
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self._is_empty(self.type):
self.MissingRequiredField("type")
if not isinstance(self.type, FamilialRelationshipType):
self.type = FamilialRelationshipType(self.type)
if self._is_empty(self.related_to):
self.MissingRequiredField("related_to")
if not isinstance(self.related_to, PersonId):
self.related_to = PersonId(self.related_to)
super().__post_init__(**kwargs)
# Enumerations
class PersonStatus(EnumDefinitionImpl):
ALIVE = PermissibleValue(text="ALIVE",
description="the person is living",
meaning=PATO["0001421"])
DEAD = PermissibleValue(text="DEAD",
description="the person is deceased",
meaning=PATO["0001422"])
UNKNOWN = PermissibleValue(text="UNKNOWN",
description="the vital status is not known")
_defn = EnumDefinition(
name="PersonStatus",
)
class FamilialRelationshipType(EnumDefinitionImpl):
SIBLING_OF = PermissibleValue(text="SIBLING_OF",
meaning=FAMREL["01"])
PARENT_OF = PermissibleValue(text="PARENT_OF",
meaning=FAMREL["02"])
CHILD_OF = PermissibleValue(text="CHILD_OF",
meaning=FAMREL["01"])
_defn = EnumDefinition(
name="FamilialRelationshipType",
)
# Slots
class slots:
pass
slots.id = Slot(
uri=SCHEMA.identifier,
name="id",
curie=SCHEMA.curie('identifier'),
model_uri=MY_DATAMODEL.id,
domain=None,
range=URIRef
)
slots.name = Slot(
uri=SCHEMA.name,
name="name",
curie=SCHEMA.curie('name'),
model_uri=MY_DATAMODEL.name,
domain=None,
range=Optional[str]
)
slots.description = Slot(
uri=SCHEMA.description,
name="description",
curie=SCHEMA.curie('description'),
model_uri=MY_DATAMODEL.description,
domain=None,
range=Optional[str]
)
slots.image = Slot(
uri=SCHEMA.image,
name="image",
curie=SCHEMA.curie('image'),
model_uri=MY_DATAMODEL.image,
domain=None,
range=Optional[str]
)
slots.primary_email = Slot(
uri=SCHEMA.email,
name="primary_email",
curie=SCHEMA.curie('email'),
model_uri=MY_DATAMODEL.primary_email,
domain=None,
range=Optional[str]
)
slots.birth_date = Slot(
uri=SCHEMA.birthDate,
name="birth_date",
curie=SCHEMA.curie('birthDate'),
model_uri=MY_DATAMODEL.birth_date,
domain=None,
range=Optional[str]
)
slots.employed_at = Slot(
uri=MY_DATAMODEL.employed_at,
name="employed_at",
curie=MY_DATAMODEL.curie('employed_at'),
model_uri=MY_DATAMODEL.employed_at,
domain=None,
range=Optional[Union[str, OrganizationId]]
)
slots.is_current = Slot(
uri=MY_DATAMODEL.is_current,
name="is_current",
curie=MY_DATAMODEL.curie('is_current'),
model_uri=MY_DATAMODEL.is_current,
domain=None,
range=Optional[Union[bool, Bool]]
)
slots.has_familial_relationships = Slot(
uri=MY_DATAMODEL.has_familial_relationships,
name="has_familial_relationships",
curie=MY_DATAMODEL.curie('has_familial_relationships'),
model_uri=MY_DATAMODEL.has_familial_relationships,
domain=None,
range=Optional[Union[
Union[dict, FamilialRelationship],
List[Union[dict, FamilialRelationship]]
]]
)
slots.current_address = Slot(
uri=MY_DATAMODEL.current_address, name="current_address",
curie=MY_DATAMODEL.curie('current_address'),
model_uri=MY_DATAMODEL.current_address, domain=None,
range=Optional[Union[dict, Address]]
)
slots.age_in_years = Slot(
uri=MY_DATAMODEL.age_in_years, name="age_in_years",
curie=MY_DATAMODEL.curie('age_in_years'),
model_uri=MY_DATAMODEL.age_in_years, domain=None, range=Optional[int]
)
slots.related_to = Slot(
uri=MY_DATAMODEL.related_to,
name="related_to",
curie=MY_DATAMODEL.curie('related_to'),
model_uri=MY_DATAMODEL.related_to,
domain=None,
range=Optional[str]
)
slots.type = Slot(
uri=MY_DATAMODEL.type,
name="type",
curie=MY_DATAMODEL.curie('type'),
model_uri=MY_DATAMODEL.type,
domain=None,
range=Optional[str]
)
slots.street = Slot(
uri=MY_DATAMODEL.street,
name="street",
curie=MY_DATAMODEL.curie('street'),
model_uri=MY_DATAMODEL.street,
domain=None,
range=Optional[str]
)
slots.city = Slot(
uri=MY_DATAMODEL.city,
name="city",
curie=MY_DATAMODEL.curie('city'),
model_uri=MY_DATAMODEL.city,
domain=None,
range=Optional[str]
)
slots.mission_statement = Slot(
uri=MY_DATAMODEL.mission_statement,
name="mission_statement",
curie=MY_DATAMODEL.curie('mission_statement'),
model_uri=MY_DATAMODEL.mission_statement,
domain=None,
range=Optional[str]
)
slots.founding_date = Slot(
uri=MY_DATAMODEL.founding_date,
name="founding_date",
curie=MY_DATAMODEL.curie('founding_date'),
model_uri=MY_DATAMODEL.founding_date,
domain=None,
range=Optional[str]
)
slots.postal_code = Slot(
uri=MY_DATAMODEL.postal_code,
name="postal_code",
curie=MY_DATAMODEL.curie('postal_code'),
model_uri=MY_DATAMODEL.postal_code,
domain=None,
range=Optional[str]
)
slots.started_at_time = Slot(
uri=PROV.startedAtTime,
name="started_at_time",
curie=PROV.curie('startedAtTime'),
model_uri=MY_DATAMODEL.started_at_time,
domain=None,
range=Optional[Union[str, XSDDate]]
)
slots.ended_at_time = Slot(
uri=PROV.endedAtTime,
name="ended_at_time",
curie=PROV.curie('endedAtTime'),
model_uri=MY_DATAMODEL.ended_at_time,
domain=None,
range=Optional[Union[str, XSDDate]]
)
slots.registry__persons = Slot(
uri=MY_DATAMODEL.persons,
name="registry__persons",
curie=MY_DATAMODEL.curie('persons'),
model_uri=MY_DATAMODEL.registry__persons,
domain=None,
range=Optional[Union[
Dict[Union[str, PersonId], Union[dict, Person]],
List[Union[dict, Person]]
]]
)
slots.registry__organizations = Slot(
uri=MY_DATAMODEL.organizations,
name="registry__organizations",
curie=MY_DATAMODEL.curie('organizations'),
model_uri=MY_DATAMODEL.registry__organizations,
domain=None,
range=Optional[Union[
Dict[Union[str, OrganizationId], Union[dict, Organization]],
List[Union[dict, Organization]]
]]
)
slots.hasAliases__aliases = Slot(
uri=MY_DATAMODEL.aliases,
name="hasAliases__aliases",
curie=MY_DATAMODEL.curie('aliases'),
model_uri=MY_DATAMODEL.hasAliases__aliases,
domain=None,
range=Optional[Union[str, List[str]]]
)
slots.related_to = Slot(
uri=MY_DATAMODEL.related_to,
name="related to",
curie=MY_DATAMODEL.curie('related_to'),
model_uri=MY_DATAMODEL.related_to,
domain=None,
range=Union[str, PersonId]
)
slots.Person_primary_email = Slot(
uri=SCHEMA.email,
name="Person_primary_email",
curie=SCHEMA.curie('email'),
model_uri=MY_DATAMODEL.Person_primary_email,
domain=Person,
range=Optional[str],
pattern=re.compile(r'^\S+@[\S+\.]+\S+')
)
slots.FamilialRelationship_type = Slot(
uri=MY_DATAMODEL.type,
name="FamilialRelationship_type",
curie=MY_DATAMODEL.curie('type'),
model_uri=MY_DATAMODEL.FamilialRelationship_type,
domain=FamilialRelationship,
range=Union[str, "FamilialRelationshipType"]
)
slots.FamilialRelationship_related_to = Slot(
uri=MY_DATAMODEL.related_to,
name="FamilialRelationship_related to",
curie=MY_DATAMODEL.curie('related_to'),
model_uri=MY_DATAMODEL.FamilialRelationship_related_to,
domain=FamilialRelationship,
range=Union[str, PersonId]
)

25
mkdocs.yml Normal file
View file

@ -0,0 +1,25 @@
---
site_name: "linkml_activitypub"
theme:
name: material
# palette:
# scheme: slate
# primary: cyan
features:
- content.tabs.link
plugins:
- search
- mermaid2
nav:
# - Home: home.md
- Index: index.md
- About: about.md
site_url: https://linkml-activitypub.readthedocs.io/
repo_url: https://github.com/p2p_ld/linkml-activitypub
# Uncomment this block to enable use of Google Analytics.
# Replace the property value with your own ID.
# extra:
# analytics:
# provider: google
# property: G-XXXXXXXXXX

30
pyproject.toml Normal file
View file

@ -0,0 +1,30 @@
[tool.poetry]
name = "linkml-activitypub"
version = "0.1.0"
description = "LinkML representation of ActivityStreams Schema"
authors = ["Jonny Saunders <sneakers-the-rat@protonmail.com>"]
license = "GNU GPL v3.0"
readme = "README.md"
include = ["README.md", "linkml_activitypub/activitypub.yaml", "generated"]
[tool.poetry.dependencies]
python = "^3.9"
linkml-runtime = "^1.1.24"
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "pep440"
[tool.poetry.dev-dependencies]
linkml = "^1.3.5"
mkdocs-material = "^8.2.8"
mkdocs-mermaid2-plugin = "^0.6.0"
schemasheets = "^0.1.14"
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry.extras]
docs = ["linkml", "mkdocs-material"]