diff --git a/README.md b/README.md index 40d62be..5203df7 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,50 @@ Intermediate files are in the `data` directory - `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... +Then the final schema in `linkml_activitypub/activitypub.yaml`: +- Reorder to match ActivityStreams +- Ensure correct + - inheritance + - `multivalued` +- Prune extra properties and classes to match those in [ActivityStreams2](https://www.w3.org/TR/activitystreams-vocabulary/) normative definition + - Then re-add the ones that declare a class in their domain, even if the class doesn't list that property in its definition + - Except for those types that seem to be metaclasses: + - `attributedTo` (-> `actor`) +- Added LinkML properties (where needed): + - Classes + - `disjoint_with` + - `see_also` when references given + - Properties + - `description` + - `domain` + - `range` + - `minumum_value` + - `maximum_value` +- Added missing slots + - `closed` + - `startIndex` +- Handle special property cases + - `items` is marked as `list_elements_ordered: true` on `OrderedCollection` and false on `Collection` +- Made types + - anyURI as `xsd:anyURI`, did not try and find a validator pattern. The spec alternatingly uses its own anyURI prop and `xsd:anyURI` +- Made enums + - `unitEnum` - for `unit` +- Copied Notes to class `description` rather than `comments` +- Added schema prefixes: + - `schema`: https://schema.org/ - for specifying IETF BCP 47 language codes + + +## Notes + +Need properties... + + +## Errata + +- `OrderedCollectionPage` is not a subclass of, and doesn't mix in `CollectionPage` since it would then have an ambiguous + class definition, since `OrderedCollection` inherits from `Collection` but asserts that the `list_items_ordered` slot is `true` + rather than `false`. Instead, the slots from `CollectionPage` are just duplicated. + - Accordingly, the domain and range of slots that include `CollectionPage` also include `OrderedCollectionPage # References diff --git a/linkml_activitypub/activitypub.yaml b/linkml_activitypub/activitypub.yaml index ba2fdc3..2f6e519 100644 --- a/linkml_activitypub/activitypub.yaml +++ b/linkml_activitypub/activitypub.yaml @@ -2,14 +2,18 @@ id: https://github.com/p2p_ld/linkml-activitypub name: linkml-activitypub title: linkml-activitypub description: |- - LinkML representation of Activitypub (ActivityStreams) Schema + LinkML representation of Activitypub (ActivityStreams) Schema. + + We are referring to this as an "ActivityPub" schema because wherever AP differs from ActivityStreams, + we favor ActivityPub. license: GNU GPL v3.0 see_also: - https://linkml-activitypub.readthedocs.io - https://github.com/p2p_ld/linkml-activitypub + - https://www.w3.org/TR/activitystreams-vocabulary/ imports: -- linkml:types + - linkml:types prefixes: as: http://www.w3.org/ns/activitystreams# linkml: https://w3id.org/linkml/ @@ -18,19 +22,48 @@ prefixes: xml: http://www.w3.org/XML/1998/namespace xsd: http://www.w3.org/2001/XMLSchema# rdfs: http://www.w3.org/2000/01/rdf-schema# + schema: https://schema.org/ + unit: http://qudt.org/2.1/vocab/unit/ default_prefix: as types: langString: + anyURI: + typeof: xsd:anyURI + +enums: + unitEnum: + permissible_values: + cm: + meaning: unit:CM + feet: + meaning: unit:FT + inches: + meaning: unit:IN + km: + meaning: unit:KiloM + m: + meaning: unit:M + miles: + meaning: unit:MI + classes: + Property: + class_uri: rdf:Property + Statement: + class_uri: rdf:Statement + + # ---------------------------- + # Core Types + Object: + description: Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. slots: - attachment - attachments - attributedTo - audience - - author - bcc - bto - cc @@ -43,14 +76,11 @@ classes: - location - name - preview - - provider - replies - summary - tag - - tags - to - url - - downstreamDuplicates - duration - endTime - id @@ -60,22 +90,28 @@ classes: - rating - startTime - updated - - upstreamDuplicates class_uri: as:Object + disjoint_with: as:Link + Link: + description: A Link is an indirect, qualified reference to a resource identified by a URL. The fundamental model for links is established by [ RFC5988]. Many of the properties defined by the Activity Vocabulary allow values that are either instances of Object or Link. When a Link is used, it establishes a qualified relation connecting the subject (the containing object) to the resource identified by the href. Properties of the Link are properties of the reference as opposed to properties of the resource. + slots: + - name + - preview + - height + - href + - hreflang + - id + - mediaType + - rel + - width + class_uri: as:Link + disjoint_with: as:Object + see_also: + - https://www.w3.org/TR/activitystreams-vocabulary/#bib-RFC5988 - 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 + description: An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. is_a: Object slots: - actor @@ -84,590 +120,839 @@ classes: - 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 + description: + - 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 + + Collection: + description: A Collection is a subtype of Object that represents ordered or unordered sets of Object or Link instances. Refer to the Activity Streams 2.0 Core specification for a complete description of the Collection type. + is_a: Object + slots: + - current + - first + - items + - last + - totalItems + class_uri: as:Collection + slot_usage: + items: + list_items_ordered: false + + OrderedCollection: + description: A subtype of Collection in which members of the logical collection are assumed to always be strictly ordered. + is_a: Collection + slot_usage: + items: + list_items_ordered: true + + CollectionPage: + description: Used to represent distinct subsets of items from a Collection. Refer to the Activity Streams 2.0 Core for a complete description of the CollectionPage object. + is_a: Collection + slots: + - next + - partOf + - prev + class_uri: as:CollectionPage + + OrderedCollectionPage: + description: Used to represent ordered subsets of items from an OrderedCollection. Refer to the Activity Streams 2.0 Core for a complete description of the OrderedCollectionPage object. + is_a: OrderedCollection + slots: + - startIndex + - next + - partOf + - prev + class_uri: as:OrderedCollectionPage + slot_usage: + items: + list_items_ordered: false + + # ---------------------------- + # Extended Types + + Accept: + description: Indicates that the actor accepts the object. The target property can be used in certain circumstances to indicate the context into which the object has been accepted. + is_a: Activity + class_uri: as:Accept + + TentativeAccept: + description: A specialization of Accept indicating that the acceptance is tentative. + is_a: Accept + class_uri: as:TentativeAccept + + Add: + description: Indicates that the actor has added the object to the target. If the target property is not explicitly specified, the target would need to be determined implicitly by context. The origin can be used to identify the context from which the object originated. + is_a: Activity + class_uri: as:Add + + Arrive: + description: An IntransitiveActivity that indicates that the actor has arrived at the location. The origin can be used to identify the context from which the actor originated. The target typically has no defined meaning. + is_a: IntransitiveActivity + class_uri: as:Arrive + + Create: + description: Indicates that the actor has created the object. + is_a: Activity + class_uri: as:Create + + Delete: + description: Indicates that the actor has deleted the object. If specified, the origin indicates the context from which the object was deleted. + is_a: Activity + class_uri: as:Delete + + Follow: + description: Indicates that the actor is "following" the object. Following is defined in the sense typically used within Social systems in which the actor is interested in any activity performed by or on the object. The target and origin typically have no defined meaning. + is_a: Activity + class_uri: as:Follow + + Ignore: + description: Indicates that the actor is ignoring the object. The target and origin typically have no defined meaning. + is_a: Activity + class_uri: as:Ignore + Join: - comments: - - To Join Something@en + description: Indicates that the actor has joined the object. The target and origin typically have no defined meaning. is_a: Activity class_uri: as:Join + Leave: - comments: - - To Leave Something@en + description: Indicates that the actor has left the object. The target and origin typically have no meaning. is_a: Activity class_uri: as:Leave + Like: - comments: - - To Like Something@en + description: Indicates that the actor likes, recommends or endorses the object. The target and origin typically have no defined meaning. 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 + + Offer: + description: Indicates that the actor is offering the object. If specified, the target indicates the entity to which the object is being offered. + is_a: Activity + class_uri: as:Offer + + Invite: + description: A specialization of Offer in which the actor is extending an invitation for the object to the target. + is_a: Offer + class_uri: as:Invite + + Reject: + description: Indicates that the actor is rejecting the object. The target and origin typically have no defined meaning. + is_a: Activity + class_uri: as:Reject + + TentativeReject: + description: A specialization of Reject in which the rejection is considered tentative. + is_a: Reject + class_uri: as:TentativeReject + + Remove: + description: Indicates that the actor is removing the object. If specified, the origin indicates the context from which the object is being removed. + is_a: Activity + class_uri: as:Remove + + Undo: + description: Indicates that the actor is undoing the object. In most cases, the object will be an Activity describing some previously performed action (for instance, a person may have previously "liked" an article but, for whatever reason, might choose to undo that like at some later point in time). The target and origin typically have no defined meaning. + is_a: Activity + class_uri: as:Undo + + Update: + description: Indicates that the actor has updated the object. Note, however, that this vocabulary does not define a mechanism for describing the actual set of modifications made to object. The target and origin typically have no defined meaning. + is_a: Activity + class_uri: as:Update + + View: + description: Indicates that the actor has viewed the object. + is_a: Activity + class_uri: as:View + Listen: - comments: - - The actor listened to the object@en + description: Indicates that the actor has listened to the object. is_a: Activity class_uri: as:Listen - Mention: - comments: - - A specialized Link that represents an @mention@en - is_a: Link - class_uri: as:Mention + + Read: + description: Indicates that the actor has read the object. + is_a: Activity + class_uri: as:Read + 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. + description: Indicates that the actor has moved object from origin to target. If the origin or target are not specified, either can be determined by context. is_a: Activity class_uri: as:Move + + Travel: + description: Indicates that the actor is traveling to target from origin. Travel is an IntransitiveObject whose actor specifies the direct object. If the target or origin are not specified, either can be determined by context. + is_a: IntransitiveActivity + class_uri: as:Travel + + Announce: + description: Indicates that the actor is calling the target's attention the object. The origin typically has no defined meaning. + is_a: Activity + class_uri: as:Announce + + Block: + description: Indicates that the actor is blocking the object. Blocking is a stronger form of Ignore. The typical use is to support social systems that allow one user to block activities or content of other users. The target and origin typically have no defined meaning. + is_a: Ignore + class_uri: as:Block + + Flag: + description: Indicates that the actor is "flagging" the object. Flagging is defined in the sense common to many social platforms as reporting content as being inappropriate for any number of reasons. + is_a: Activity + class_uri: as:Flag + + Dislike: + description: Indicates that the actor dislikes the object. + is_a: Activity + class_uri: as:Dislike + + Question: + description: > + Represents a question being asked. Question objects are an extension of IntransitiveActivity. That is, the Question object is an Activity, but the direct object is the question itself and therefore it would not contain an object property. + + Either of the anyOf and oneOf properties MAY be used to express possible answers, but a Question object MUST NOT have both properties. + is_a: IntransitiveActivity + slots: + - anyOf + - oneOf + class_uri: as:Question + + # ------------------ + # Actor Types + + Application: + description: Describes a software application. + is_a: Object + class_uri: as:Application + + Group: + description: Represents a formal or informal collective of Actors. + is_a: Object + class_uri: as:Group + + Organization: + description: Represents an organization. + is_a: Object + class_uri: as:Organization + + Person: + description: Represents an individual person. + is_a: Object + class_uri: as:Person + + Service: + description: Represents a service of any kind. + is_a: Object + class_uri: as:Service + + # ----------------------- + # Object and Link Types + + Relationship: + description: > + Describes a relationship between two individuals. The subject and object properties are used to identify the connected individuals. + + See 5.2 Representing Relationships Between Entities for additional information. + is_a: Object + slots: + - object + - relationship + - subject + class_uri: as:Relationship + see_also: + - https://www.w3.org/TR/activitystreams-vocabulary/#connections + + Document: + description: Represents a document of any kind. + is_a: Object + class_uri: as:Document + + Article: + description: + is_a: Object + class_uri: as:Article + + Audio: + description: Represents an audio document of any kind. + is_a: Document + class_uri: as:Audio + + Image: + description: An image document of any kind + is_a: Document + class_uri: as:Image + + Video: + description: Represents a video document of any kind. + is_a: Document + class_uri: as:Video + Note: - comments: - - A Short note, typically less than a single paragraph. A \"tweet\" is an example, - or a \"status update\"@en + description: Represents a short written work typically less than a single paragraph in length. 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 + description: Represents a Web Page. is_a: Object class_uri: as:Page - Person: - comments: - - A Person@en + + Event: + description: Represents any kind of event. is_a: Object - class_uri: as:Person + class_uri: as:Event + Place: - comments: - - A physical or logical location@en + description: Represents a logical or physical location. See 5.3 Representing Places for additional information. is_a: Object slots: - - accuracy - - altitude - - latitude - - longitude - - radius - - units + - accuracy + - altitude + - latitude + - longitude + - radius + - units class_uri: as:Place + see_also: + - https://www.w3.org/TR/activitystreams-vocabulary/#places + + Mention: + description: A specialized Link that represents an @mention. + is_a: Link + class_uri: as:Mention + Profile: - comments: - - A Profile Document@en + description: A Profile is a content object that describes another Object, typically used to describe Actor Type objects. The describes property is used to reference the object being described by the profile. 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 + Tombstone: + description: A Tombstone represents a content object that has been deleted. It can be used in Collections to signify that there used to be an object at this position, but it has been deleted. + is_a: Object + slots: + - formerType + - deleted + class_uri: as:Tombstone + + # -------------------------------- + # Not real but still used classes??? + # + + OrderedItems: + class_uri: as:OrderedItems + description: > + OrderedItems is not a real class in the ActivityStreams specification, but + it is used as the container of the items in `OrderedCollections` + 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 + id: + description: Provides the globally unique identifier for an Object or Link. + slot_uri: as:id + domain: + - as:Object + - as:Link + range: anyURI + type: + description: Identifies the Object or Link type. Multiple values may be specified. + domain: + - as:Object + - as:Link + range: anyURI multivalued: true actor: - comments: - - Subproperty of as:attributedTo that identifies the primary actor@en + description: Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link. 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 + domain: as:Activity + range: + - as:Object + - as:Link attachment: + description: Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email. slot_uri: as:attachment multivalued: true - attachments: - slot_uri: as:attachments - multivalued: true + domain: as:Object + range: + - as:Object + - as:Link attributedTo: - comments: - - Identifies an entity to which an object is attributed@en + description: Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity. slot_uri: as:attributedTo multivalued: true + domain: + - as:Link + - as:Object + range: + - as:Link + - as:Object audience: + description: Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant. 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 + domain: Object + range: + - Object + - Link bcc: + description: Identifies one or more Objects that are part of the private secondary audience of this Object. slot_uri: as:bcc multivalued: true + domain: Object + range: + - Object + - Link bto: + description: Identifies an Object that is part of the private primary audience of this Object. slot_uri: as:bto multivalued: true + domain: Object + range: + - Object + - Link cc: + description: Identifies an Object that is part of the public secondary audience of this Object. slot_uri: as:cc multivalued: true + domain: Object + range: + - Object + - Link context: - comments: - - Specifies the context within which an object exists or an activity was performed@en + description: > + Identifies the context within which the object exists or an activity was performed. + + The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event. slot_uri: as:context multivalued: true + domain: Object + range: + - Object + - Link current: + description: In a paged Collection, indicates the page that contains the most recently updated member items. 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 + domain: as:Collection + range: + - as:CollectionPage + - as:OrderedCollectionPage + - as:Link first: + description: In a paged Collection, indicates the furthest preceeding page of items in the collection. 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 + domain: as:Collection + range: + - as:CollectionPage + - as:OrderedCollectionPage + - as:Link generator: + description: Identifies the entity (e.g. an application) that generated the object. slot_uri: as:generator multivalued: true + domain: as:Object + range: + - as:Object + - as:Link icon: + description: Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size. slot_uri: as:icon multivalued: true + domain: as:Object + range: + - as:Image + - as:Link image: + description: Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed. slot_uri: as:image multivalued: true + domain: as:Object + range: + - as:Image + - as:Link inReplyTo: + description: Indicates one or more entities for which this object is considered a response. slot_uri: as:inReplyTo multivalued: true + domain: as:Object + range: + - as:Object + - as:Link instrument: - comments: - - Indentifies an object used (or to be used) to complete an activity@en + description: Identifies one or more objects used (or to be used) in the completion of an Activity. slot_uri: as:instrument multivalued: true - items: - slot_uri: as:items - multivalued: true + domain: Activity + range: + - Object + - Link last: + description: In a paged Collection, indicates the furthest proceeding page of the collection. slot_uri: as:last - multivalued: true + domain: Collection + range: + - CollectionPage + - OrderedCollectionPage + - Link location: + description: Indicates one or more physical or logical locations associated with the object. slot_uri: as:location multivalued: true - next: - slot_uri: as:next - multivalued: true - object: - slot_uri: as:object + domain: Object + range: + - Object + - Link + items: + description: Identifies the items contained in a collection. The items might be ordered or unordered. + slot_uri: as:items multivalued: true + domain: Collection + range: + - Object + - Link oneOf: - comments: - - Describes a possible exclusive answer or option for a question.@en + description: Identifies an exclusive option for a Question. Use of oneOf implies that the Question can have only a single answer. To indicate that a Question can have multiple answers, use anyOf. slot_uri: as:oneOf multivalued: true + domain: Question + range: + - Object + - Link + anyOf: + description: Identifies an inclusive option for a Question. Use of anyOf implies that the Question can have multiple answers. To indicate that a Question can have only one answer, use oneOf. + slot_uri: as:anyOf + multivalued: true + domain: Question + range: + - Object + - Link + closed: + description: Indicates that a question has been closed, and answers are no longer accepted. + domain: Question + range: + - Object + - Link + - xsd:dateTime + - xsd:boolean origin: - comments: - - For certain activities, specifies the entity from which the action is directed.@en + description: Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". slot_uri: as:origin multivalued: true - partOf: - slot_uri: as:partOf + domain: Activity + range: + - Object + - Link + next: + description: In a paged Collection, indicates the next page of items. + slot_uri: as:next + domain: + - CollectionPage + - OrderedCollectionPage + range: + - CollectionPage + - OrderedCollectionPage + - Link + object: + description: > + When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. + + When used within a Relationship describes the entity to which the subject is related. + slot_uri: as:object multivalued: true + domain: + - Activity + - Relationship + range: + - Object + - Link prev: + description: In a paged Collection, identifies the previous page of items. slot_uri: as:prev - multivalued: true + domain: + - CollectionPage + - OrderedCollectionPage + range: + - CollectionPage + - OrderedCollectionPage + - Link preview: + description: Identifies an entity that provides a preview of this object. slot_uri: as:preview multivalued: true - provider: - slot_uri: as:provider + domain: + - Link + - Object + range: + - Link + - Object + result: + description: Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource. + slot_uri: as:result multivalued: true + domain: Activity + range: + - Object + - Link + replies: + description: Identifies a Collection containing objects considered to be responses to this object. + slot_uri: as:replies + domain: Object + range: Collection + tag: + description: One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference. + slot_uri: as:tag + multivalued: true + domain: Object + range: + - Object + - Link + target: + description: Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John's wishlist. An activity can have more than one target. + slot_uri: as:target + multivalued: true + domain: Activity + range: + - Object + - Link + to: + description: Identifies an entity considered to be part of the public primary audience of an Object + slot_uri: as:to + multivalued: true + domain: Object + range: + - Object + - Link + url: + description: Identifies one or more links to representations of the object + slot_uri: as:url + multivalued: true + domain: Object + range: + - xsd:anyURI + - Link + accuracy: + description: Indicates the accuracy of position coordinates on a Place objects. Expressed in properties of percentage. e.g. "94.0" means "94.0% accurate". + slot_uri: as:accuracy + domain: Place + range: xsd:float + minimum_value: 0 + maximum_value: 100 + altitude: + description: Indicates the altitude of a place. The measurement units is indicated using the units property. If units is not specified, the default is assumed to be "m" indicating meters. + slot_uri: as:altitude + domain: Object + range: xsd:float + content: + description: The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. + slot_uri: as:content + multivalued: true + domain: Object + range: + - xsd:string + - rdf:langString + name: + description: A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values. + slot_uri: rdfs:name + multivalued: true + domain: + - Object + - Link + range: + - xsd:string + - rdf:langString + duration: + description: When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object's approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S"). + slot_uri: as:duration + domain: Object + range: xsd:duration + see_also: + - https://www.w3.org/TR/xmlschema11-2/ + height: + description: On a Link, specifies a hint as to the rendering height in device-independent pixels of the linked resource. + slot_uri: as:height + domain: Link + range: xsd:nonNegativeInteger + minimum_value: 0 + href: + description: The target resource pointed to by a Link. + slot_uri: as:href + domain: Link + range: xsd:anyURI + hreflang: + description: Hints as to the language used by the target resource. Value MUST be a [BCP47] Language-Tag. + slot_uri: as:hreflang + is_a: schema:inLanguage + notes: Inheriting from schema:inLanguage in order to specify IETF BCP47 language codes since there isn't a formal ontology I can find + domain: Link + range: string + partOf: + description: Identifies the Collection to which a CollectionPage objects items belong. + slot_uri: as:partOf + domain: + - CollectionPage + - OrderedCollectionPage + range: + - Link + - Collection + latitude: + description: The latitude of a place + slot_uri: as:latitude + domain: Place + range: xsd:float + longitude: + description: The longitude of a place + slot_uri: as:longitude + domain: Place + range: xsd:float + mediaType: + description: > + When used on a Link, identifies the MIME media type of the referenced resource. + + When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content. + slot_uri: as:mediaType + is_a: schema:encodingFormat + notes: Like hreflang, casting as schema:encodingFormat to specify a MIME type + domain: + - Link + - Object + range: string + endTime: + description: The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude. + slot_uri: as:endTime + domain: Object + range: datetime + published: + description: The date and time at which the object was published + slot_uri: as:published + domain: Object + range: datetime + startTime: + description: The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin. + slot_uri: as:startTime + domain: Object + range: datetime + radius: + description: The radius from the given latitude and longitude for a Place. The units is expressed by the units property. If units is not specified, the default is assumed to be "m" indicating "meters". + slot_uri: as:radius + domain: Place + range: xsd:float + minimum_value: 0 + rel: + description: > + A link relation associated with a Link. The value MUST conform to both the [HTML5] and [RFC5988] "link relation" definitions. + + In the [HTML5], any string not containing the "space" U+0020, "tab" (U+0009), "LF" (U+000A), "FF" (U+000C), "CR" (U+000D) or "," (U+002C) characters can be used as a valid link relation. + notes: No validation is done or type could be found for declaring the RCF5988 or HTML5 link relation types + slot_uri: as:rel + multivalued: true + domain: Link + range: string + startIndex: + description: A non-negative integer value identifying the relative position within the logical view of a strictly ordered collection. + domain: OrderedCollectionPage + range: xsd:nonNegativeInteger + minimum_value: 0 + summary: + description: A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided. + slot_uri: as:summary + multivalued: true + domain: Object + range: + - xsd:string + - rdf:langString + totalItems: + description: A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance. + slot_uri: as:totalItems + domain: Collection + range: xsd:nonNegativeInteger + minimum_value: 0.0 + units: + description: Specifies the measurement units for the radius and altitude properties on a Place object. If not specified, the default is assumed to be "m" for "meters". + slot_uri: as:units + domain: Place + any_of: + - range: unitEnum + - range: xsd:anyURI + updated: + description: The date and time at which the object was updated + slot_uri: as:updated + domain: Object + range: datetime + width: + description: On a Link, specifies a hint as to the rendering width in device-independent pixels of the linked resource. + slot_uri: as:width + domain: Link + range: xsd:nonNegativeInteger + minimum_value: 0 + subject: + description: On a Relationship object, the subject property identifies one of the connected individuals. For instance, for a Relationship object describing "John is related to Sally", subject would refer to John. + is_a: subject + slot_uri: as:subject + multivalued: true + domain: Relationship + range: + - as:Object + - as:Link relationship: - comments: - - On a Relationship object, describes the type of relationship@en + description: On a Relationship object, the relationship property identifies the kind of relationship that exists between subject and object. 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 + domain: Relationship + range: Object + describes: + description: On a Profile object, the describes property identifies the object described by the Profile. + slot_uri: as:describes + domain: Profile + range: Object + formerType: + description: On a Tombstone object, the formerType property identifies the type of the object that was deleted. + slot_uri: as:formerType multivalued: true + domain: Tombstone + range: Object deleted: - comments: - - Specifies the date and time the object was deleted@en + description: On a Tombstone object, the deleted property is a timestamp for when the object was deleted. 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 + domain: Tombstone + range: datetime + + + # These are extra properties that were in the OWL schema that we'll keep here in case ActivityPub reimplements them + # objectType: + # slot_uri: as:objectType + # multivalued: true + # rating: + # description: + # - A numeric rating (>= 0.0, <= 5.0) for the object@en + # slot_uri: as:rating + # multivalued: true + # upstreamDuplicates: + # slot_uri: as:upstreamDuplicates + # multivalued: true + # verb: + # slot_uri: as:verb + # multivalued: true + # author: + # description: + # - Identifies the author of an object. Deprecated. Use as:attributedTo instead@en + # is_a: attributedTo + # slot_uri: as:author + # multivalued: true + # predicate: + # slot_uri: rdf:predicate + # multivalued: true + # provider: + # slot_uri: as:provider + # multivalued: true + # downstreamDuplicates: + # slot_uri: as:downstreamDuplicates + # multivalued: true + + + diff --git a/linkml_activitypub/activitypub_actor.yaml b/linkml_activitypub/activitypub_actor.yaml new file mode 100644 index 0000000..ddf1935 --- /dev/null +++ b/linkml_activitypub/activitypub_actor.yaml @@ -0,0 +1,23 @@ +id: https://github.com/p2p_ld/linkml-activitypub +name: linkml-activitypub +title: linkml-activitypub +description: |- + Extension of ActivityPub/ActivityStreams to include an Actor class +license: GNU GPL v3.0 +see_also: + - https://linkml-activitypub.readthedocs.io + - https://github.com/p2p_ld/linkml-activitypub + +imports: +- linkml:types +- activitypub.yaml +prefixes: + asa: http://www.w3.org/ns/activitystreams# + 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: asa \ No newline at end of file