Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2019-12-23 09:56:40 +01:00
parent e06cf2a447
commit 48080db7a0
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
9 changed files with 3797 additions and 6 deletions

View File

@ -0,0 +1,13 @@
defmodule Mobilizon.Vocabulary do
use RDF.Vocabulary.Namespace
defvocab ActivityStreams,
base_iri: "http://www.w3.org/ns/activitystreams#",
file: "activitystreams.jsonld",
strict: false
defvocab Schema,
base_iri: "http://schema.org/",
file: "schema.org.jsonld"
end

View File

@ -71,7 +71,8 @@ defmodule Mobilizon.Mixfile do
{:icalendar, github: "tcitworld/icalendar"},
{:exgravatar, "~> 2.0.1"},
{:httpoison, "~> 1.0"},
{:json_ld, "~> 0.3"},
{:rdf, "~> 0.7"},
{:json_ld, path: "../../jsonld-ex"},
{:jason, "~> 1.1"},
{:ex_crypto, "~> 0.10.0"},
{:http_sign, "~> 0.1.1"},

View File

@ -22,7 +22,7 @@
"credo": {:hex, :credo, "1.1.5", "caec7a3cadd2e58609d7ee25b3931b129e739e070539ad1a0cd7efeeb47014f4", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"},
"dataloader": {:hex, :dataloader, "1.0.6", "fb724d6d3fb6acb87d27e3b32dea3a307936ad2d245faf9cf5221d1323d6a4ba", [:mix], [{:ecto, ">= 0.0.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm"},
"db_connection": {:hex, :db_connection, "2.2.0", "e923e88887cd60f9891fd324ac5e0290954511d090553c415fbf54be4c57ee63", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm"},
"decimal": {:hex, :decimal, "1.8.0", "ca462e0d885f09a1c5a342dbd7c1dcf27ea63548c65a65e67334f4b61803822e", [:mix], [], "hexpm"},
"decimal": {:hex, :decimal, "1.8.1", "a4ef3f5f3428bdbc0d35374029ffcf4ede8533536fa79896dd450168d9acdf3c", [:mix], [], "hexpm"},
"dialyxir": {:hex, :dialyxir, "1.0.0-rc.7", "6287f8f2cb45df8584317a4be1075b8c9b8a69de8eeb82b4d9e6c761cf2664cd", [:mix], [{:erlex, ">= 0.2.5", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm"},
"earmark": {:hex, :earmark, "1.4.2", "3aa0bd23bc4c61cf2f1e5d752d1bb470560a6f8539974f767a38923bb20e1d7f", [:mix], [], "hexpm"},
"ecto": {:hex, :ecto, "3.1.7", "fa21d06ef56cdc2fdaa62574e8c3ba34a2751d44ea34c30bc65f0728421043e5", [:mix], [{:decimal, "~> 1.6", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"},
@ -101,7 +101,7 @@
"postgrex": {:hex, :postgrex, "0.15.3", "5806baa8a19a68c4d07c7a624ccdb9b57e89cbc573f1b98099e3741214746ae4", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"},
"progress_bar": {:hex, :progress_bar, "2.0.0", "447285f533b4b8717881fdb7160c7360c2f2ab57276f8904ce6d40482857e573", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm"},
"ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm"},
"rdf": {:hex, :rdf, "0.6.2", "1b85e37c135e232febeebda6b04ac4aba5f5e2bb1c3a2a6665ed4ccec19ade70", [:mix], [{:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm"},
"rdf": {:hex, :rdf, "0.7.0", "ed3cc0c4d28c9ca6417f2c884f40eef7fd7022ef33c3a909a696bb4d11c5fea4", [:mix], [{:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm"},
"rsa_ex": {:hex, :rsa_ex, "0.4.0", "e28dd7dc5236e156df434af0e4aa822384c8866c928e17b785d4edb7c253b558", [:mix], [], "hexpm"},
"sleeplocks": {:hex, :sleeplocks, "1.1.1", "3d462a0639a6ef36cc75d6038b7393ae537ab394641beb59830a1b8271faeed3", [:rebar3], [], "hexpm"},
"slugger": {:hex, :slugger, "0.3.0", "efc667ab99eee19a48913ccf3d038b1fb9f165fa4fbf093be898b8099e61b6ed", [:mix], [], "hexpm"},

View File

@ -0,0 +1,374 @@
{
"@context": {
"@vocab": "_:",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"as": "https://www.w3.org/ns/activitystreams#",
"ldp": "http://www.w3.org/ns/ldp#",
"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"
}
}
}

View File

@ -0,0 +1,962 @@
@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 ;
owl:imports <http://www.w3.org/ns/prov#> .
#################################################################
#
# 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:startIndex a owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "startIndex"@en ;
rdfs:comment "In a strictly ordered logical collection, specifies the index position of the first item in the items list"@en ;
rdfs:range xsd:nonNegativeInteger ;
rdfs:domain as:OrderedCollectionPage .
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:OrderedCollectionPage a owl:Class ;
rdfs:label "OrderedCollectionPage"@en;
rdfs:subClassOf as:OrderedCollection, as:CollectionPage ;
rdfs:comment "An ordered subset of items from an OrderedCollection"@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:OrderedCollection a owl:Class ;
rdfs:label "OrderedCollection"@en ;
rdfs:comment "A variation of Collection in which items are strictly ordered"@en;
rdfs:subClassOf [
a owl:Class;
owl:intersectionOf (
as:Collection
[
a owl:Restriction;
owl:onProperty as:items ;
owl:allValuesFrom [
a owl:Class ;
owl:intersectionOf (
as:OrderedItems
[
a owl:Class ;
owl:complementOf [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
]
]
)
]
]
)
] .
as:OrderedItems a owl:Class ;
rdfs:label "OrderedItems"@en ;
rdfs:comment "A rdf:List variant for Objects and Links"@en ;
rdfs:subClassOf [
a owl:Class;
owl:intersectionOf (
rdf:List
[
a owl:Restriction;
owl:onProperty rdf:first ;
owl:allValuesFrom [
a owl:Class ;
owl:unionOf ( as:Object as:Link )
]
]
[
a owl:Restriction;
owl:allValuesFrom as:OrderedItems ;
owl:onProperty rdf:rest
]
)
] .
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 .

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,6 @@
"http://mobilizon.com/@tcit"
],
"id": "https://framapiaf.org/users/admin/statuses/99512778738411822/activity",
"nickname": "lain",
"object": {
"atomUri": "https://framapiaf.org/users/admin/statuses/99512778738411822",
"attachment": [],

View File

@ -8,11 +8,10 @@
},
"object": {
"type": "Follow",
"object": "http://mastodon.example.org/users/admin",
"object": "http://mastodon.example.org/users/afdmin",
"id": "http://localtesting.pleroma.lol/users/lain#follows/4",
"actor": "http://localtesting.pleroma.lol/users/lain"
},
"nickname": "lain",
"id": "http://mastodon.example.org/users/admin#rejects/follows/4",
"actor": "http://mastodon.example.org/users/admin",
"@context": [

View File

@ -0,0 +1,15 @@
defmodule Mobilizon.VocabularyTest do
use ExUnit.Case, async: false
alias Mobilizon.Vocabulary
alias JSON.LD
alias Mobilizon.Service.ActivityPub.Utils
describe "test" do
test "test" do
assert "test/fixtures/mastodon-post-activity.json" |> File.read!() |> Jason.decode!() |> JSON.LD.expand() |> hd |> JSON.LD.compact(Utils.make_json_ld_header()) == "toto"
# assert "test/fixtures/mastodon-reject-activity.json" |> File.read!() |> Jason.decode!() |> JSON.LD.expand() == "toto"
end
end
end