Just wanted to add that the posted example of a Relationship is a very simple one-to-one relationship. many-to-one / one-to-many / many-to-many can simply be done by having a “type”: “Collection” in subject / object / both …
Also very important is what we discuss in the next meeting, context
- this groups all the things and makes a Relationship in AP complete.
Two more examples:
[all examples are international in redaktor and name
is a multilanguage nameMap
, summary
= summaryMap
etc.]
The empathi
namespace prefix is the namespace https://w3id.org/empathi/
: empathi: An ontology for Emergency Managing and Planningabout Hazard Crises Specification
Example 1
A simple example from {type:["Video", "schema:Movie"]}
First relation is the ‘Profession’ of a ‘Person’ in a ‘Movie’.
But a Movie also has a “Cast”-concept, the relation would be:
{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Ruth Gordon plays Maude Chardin in “Harold and Maude (1971)”",
"type": ["Relationship", "Person"],
"subject": {
"type": "Person",
"name": "Ruth Gordon"
},
"relationship": "redaktor:leadPerforms",
"object": {
"type": ["redaktor:Character", "schema:Person"],
"name": "Maude",
"schema:givenName": "Maude",
"schema:fullName": "Chardin"
},
"context": {"id": "https://redaktor.me/wonderfulMovieId"}
}
The context
here is the Movie cause the Relation from Actor to Character might mainly differ per Movie but context
can also be a simple Note
or describing the performed empathi:ageRange
of the Character
or whatever.
Example 2
In one of my article about the Tsunami 2004 I did an Article about 5 “main actors” like Rajeswari, the nurse (one of my photos, was for “GEO”):
The Article had a timeline to describe strictly consecutive by time the situations of the actors but also by states or authorities.
This could be an OrderedCollection
of ["Relationship", "Event"]
-
now cheap software can parse Note
with only summary
, better software might do Event
with summary
/startTime
while scientific softwares can parse the whole Relation
.
In a journalistic software, the wikipedia paradigm “Everything is a Claim” is important too.
Assume that the following example also has a location
property.
I will describe it later cause of complexity.
I left out concrete times – cause I wish, the whole thing didn’t happen.
Here, the hrefs
used in summary are the HTML representations of subject
and object
and this way also handled by e.g. “microblogging-software” - some more link-rel left out…
{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "A <a href='...' rel='type'>Tsunami warning</a> for {location} was issued at {startTime} caused by <a href='...' rel='about'>Earthquake 9.1 Mw XSF</a>",
"type": ["Relationship", "Event", "Note"],
"startTime": "…",
"subject": {
"type": ["ntwc:TsunamiWarning", "Note"],
"name": "…",
"summaryMap": {...},
"startTime": "…"
},
"relationship": "empathi:causedBy",
"object": {
"type": ["empathi:Earthquake", "Event", "Note"],
"name": "…",
"summaryMap": {...},
"startTime": "…",
"endTime": "…",
},
"context": [
{"id": "https://redaktor.me/myArticleAPid"},
{"id": "https://redaktor.me/myTimelineAPid"}
]
}
We could now have it’s own attributedTo
to specify which authors made the claim for the Relationship
.
Many other Relationships derive from this and each context also specifies who made the subject
and object
claims (technically the nwtc:TsunamiWarning
can have its own attributedTo but there is a difference, the relator for Author - this is the same than rel="author"
in html). It should just have the Author-type if the information came directly in the markup by a system of the ntwc.
Otherwise the Author in the context is responsible
(US “accountable” or Germany “Verantwortlich im Sinne des Presserechts” / “V.i.S.d.P.”).
And location
is hard.
The team in my publishing house had compared lots and lots of Thesauri, Ontologies, Vocabularies (e.g. wikidata, Library of Congress and Deutsche Nationalbibliothek etc.)
Locations can have so many meanings.
Let’s say I am at a camera in this place and take a photo, then it might show the moon in full size but I am still in the youth center on earth, so what would location
for the Image mean? The youth center or the crater?
So, the problem is with complex location examples, we might need 2 explicit Relation
because of course, I will use the Place
which I already defined (useful here, cause users can click through until Events, software reasons “Upcoming” by startTime
, user sees that they can learn astro-photography there, user Accept
, yay).
So to not specify the same Place
again, we use Relationship
with extra relators:
[
['LocationCreated', {
loc: 'evp', pref:{en:'',de:''}, alt:{en:'Event place',de:''},
note: 'The location where the CreativeWork was created, which may not be the same as the location depicted in the Work.'
}], // https://schema.org/contentLocation
['LocationContent', {
loc: 'prp', pref:{en:'',de:''}, alt:{en:'Production place',de:''},
note: 'The location depicted or described in the content. For example, the location shown in a photograph or painting.'
}], // https://schema.org/locationCreated
['LocationPublication', {
loc: 'pub', pref:{en:'',de:''}, alt:{en:'Publication place',de:''},
note: 'The location where a resource is published.'
}],
['LocationManufacture', {
loc: 'mfp', pref:{en:'',de:''}, alt:{en:'Manufacture place',de:''},
note: 'The place of manufacture (e.g., printing, duplicating, casting, etc.) of a resource in a published form.'
}],
['LocationUniOrLibrary', {
loc: 'uvp', pref:{en:'',de:''}, alt:{en:'University place',de:''},
note: 'A place where a university that is associated with a resource is located.'+
'E.g., a university where an academic dissertation or thesis was presented or a library where it is available.'
}],
['LocationDistribution', {
loc: 'dbp', pref:{en:'',de:''}, alt:{en:'Distribution place',de:''},
note: 'A location from which a resource, e.g., a serial, is distributed.'
}],
['SpatialCoverage', {pref:{en:'',de:''}, alt:{en:'',de:''}}]
]; // https://schema.org/spatialCoverage