From e96f3c0e5354af006710db4e3dc2e8d32068b65a Mon Sep 17 00:00:00 2001 From: tim Date: Wed, 6 Sep 2017 13:17:25 +0200 Subject: [PATCH 1/2] Generalize coala placeholder --- schema/vocab/coala.jsonld | 47 +++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/schema/vocab/coala.jsonld b/schema/vocab/coala.jsonld index 4978f1c..a62e1f8 100644 --- a/schema/vocab/coala.jsonld +++ b/schema/vocab/coala.jsonld @@ -9,7 +9,7 @@ }, "@graph": [ { - "@id": "/AbstractWork", + "@id": "coala:AbstractWork", "@type": "rdfs:Class", "rdfs:subClassOf": { "@id": "schema:CreativeWork" @@ -18,7 +18,7 @@ "rdfs:label": "AbstractWork" }, { - "@id": "/Copyright", + "@id": "coala:Copyright", "@type": "rdfs:Class", "rdfs:subClassOf": { "@id": "schema:Intangible" @@ -30,7 +30,7 @@ "rdfs:label": "Copyright" }, { - "@id": "/DigitalFingerprint", + "@id": "coala:DigitalFingerprint", "@type": "rdfs:Class", "rdfs:subClassOf": { "@id": "schema:Intangible" @@ -39,7 +39,7 @@ "rdfs:label": "DigitalFingerprint" }, { - "@id": "/Right", + "@id": "coala:Right", "@type": "rdfs:Class", "rdfs:subClassOf": { "@id": "schema:Intangible" @@ -51,7 +51,7 @@ "rdfs:label": "Right" }, { - "@id": "/RightsTransferAction", + "@id": "coala:RightsTransferAction", "@type": "rdfs:Class", "rdfs:subClassOf": { "@id": "schema:TransferAction" @@ -60,7 +60,7 @@ "rdfs:label": "RightsTransferAction" }, { - "@id": "/source", + "@id": "coala:source", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "coala:Right" @@ -75,7 +75,7 @@ "rdfs:label": "source" }, { - "@id": "/asserter", + "@id": "coala:asserter", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "schema:ReviewAction" @@ -90,7 +90,7 @@ "rdfs:label": "asserter" }, { - "@id": "/assertionSubject", + "@id": "coala:assertionSubject", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "schema:ReviewAction" @@ -105,7 +105,7 @@ "rdfs:label": "assertionSubject" }, { - "@id": "/assertionTruth", + "@id": "coala:assertionTruth", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "schema:ReviewAction" @@ -120,7 +120,7 @@ "rdfs:label": "assertionTruth" }, { - "@id": "/exclusive", + "@id": "coala:exclusive", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "coala:Right" @@ -132,7 +132,7 @@ "rdfs:label": "exclusive" }, { - "@id": "/fingerprintOf", + "@id": "coala:fingerprintOf", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "coala:DigitalFingerprint" @@ -152,7 +152,7 @@ "rdfs:label": "fingerprintOf" }, { - "@id": "/fingerprint", + "@id": "coala:fingerprint", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "coala:DigitalFingerprint" @@ -172,7 +172,7 @@ "rdfs:label": "fingerprint" }, { - "@id": "/manifestationOfWork", + "@id": "coala:manifestationOfWork", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "schema:CreativeWork" @@ -187,7 +187,7 @@ "rdfs:label": "manifestationOfWork" }, { - "@id": "/numberOfUses", + "@id": "coala:numberOfUses", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "coala:Right" @@ -199,7 +199,7 @@ "rdfs:label": "numberOfUses" }, { - "@id": "/percentageShares", + "@id": "coala:percentageShares", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "coala:Right" @@ -211,7 +211,7 @@ "rdfs:label": "percentageShares" }, { - "@id": "/rightContext", + "@id": "coala:rightContext", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "coala:Right" @@ -223,7 +223,7 @@ "rdfs:label": "rightContext" }, { - "@id": "/rightsOf", + "@id": "coala:rightsOf", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "coala:Copyright" @@ -238,7 +238,7 @@ "rdfs:label": "rightsOf" }, { - "@id": "/territory", + "@id": "coala:territory", "@type": "rdf:Property", "schema:domainIncludes": [ { @@ -258,7 +258,7 @@ "rdfs:label": "territory" }, { - "@id": "/transferContract", + "@id": "coala:transferContract", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "coala:RightsTransferAction" @@ -278,7 +278,7 @@ "rdfs:label": "transferContract" }, { - "@id": "/usageType", + "@id": "coala:usageType", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "coala:Right" @@ -290,7 +290,7 @@ "rdfs:label": "usageType" }, { - "@id": "/validFrom", + "@id": "coala:validFrom", "@type": "rdf:Property", "schema:domainIncludes": [ { @@ -318,7 +318,7 @@ "rdfs:label": "valueFrom" }, { - "@id": "/validThrough", + "@id": "coala:validThrough", "@type": "rdf:Property", "schema:domainIncludes": [ { @@ -345,6 +345,5 @@ "rdfs:comment": "The date after when the item is not valid.", "rdfs:label": "validThrough" } - ], - "@id": "#version" + ] } From ca15c2055b9d42b01647d64512ec3817cef70ee5 Mon Sep 17 00:00:00 2001 From: tim Date: Wed, 6 Sep 2017 13:42:17 +0200 Subject: [PATCH 2/2] Introduce new class: Manifestation - rename: manifestationOfWork => manifestationOf --- README.md | 8 ++++---- schema/README.md | 41 +++++++++++++++++++++++++-------------- schema/coala_context.json | 5 +++-- schema/vocab/coala.jsonld | 17 ++++++++++++---- 4 files changed, 46 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 1caa57e..2b1429e 100644 --- a/README.md +++ b/README.md @@ -1264,7 +1264,7 @@ Transforming to JSON-LD, we get: "@id": "#digitalManifestation", "@type": "Manifestation", "name": "The Fellowship of the Ring", - "manifestationOfWork": "#creation", + "manifestationOf": "#creation", "digitalWork": "", "fingerprints": [ "Qmbs2DxMBraF3U8F7vLAarGmZaSFry3vVY5zytuN3BxwaY", @@ -1276,7 +1276,7 @@ Transforming to JSON-LD, we get: "@id": "#physicalManifestation", "@type": "Manifestation", "name": "The Fellowship of the Ring", - "manifestationOfWork": "#creation", + "manifestationOf": "#creation", "datePublished": "29-07-1954", "locationCreated": "" } @@ -1303,7 +1303,7 @@ linked with hashes: "@context": { "/": "" }, "@type": "Manifestation", "name": "The Fellowship of the Ring", - "manifestationOfWork": { "/": "" }, + "manifestationOf": { "/": "" }, "digitalWork": { "/": "" }, "fingerprints": [ "Qmbs2DxMBraF3U8F7vLAarGmZaSFry3vVY5zytuN3BxwaY", @@ -1317,7 +1317,7 @@ linked with hashes: "@context": { "/": "" }, "@type": "Manifestation", "name": "The Fellowship of the Ring", - "manifestationOfWork": { "/": "" }, + "manifestationOf": { "/": "" }, "datePublished": "29-07-1954", "locationCreated": { "/": "" } } diff --git a/schema/README.md b/schema/README.md index 15e466e..9698c9f 100644 --- a/schema/README.md +++ b/schema/README.md @@ -76,10 +76,9 @@ Adhering to these patterns helps you to avoid the creation of models that are to an immutable context. For example, consider the [`Creation`](#rrm-creation) entity: although the schema allows a `Work` to declare its manifestations through the [workExample property](http://schema.org/workExample), doing so would inherently lock the `Work` into only these `Manifestation`s. You can avoid this -problem by declaring your `Work`s and `Manifestation`s separately, using the [`manifestationOfWork` -property](#rrm-creation) (alias of [`exampleOfWork`](http://schema.org/exampleOfWork)) in the -`Manifestation`s to create a link to its `Work`. Another feature of this pattern is that you only -have to declare a nested model once, even if multiple parents should be linked to it. +problem by declaring your `Work`s and `Manifestation`s separately, using the `Manifestation` class +and then link to `AbstractWork` using the `manifestationOf` (alias of [`exampleOfWork`](http://schema.org/exampleOfWork)) +property. When relying on inter-object links rather than nested objects, you may find that some properties from schema.org expect an object or value rather than a link. To handle this, you can either use an @@ -250,16 +249,18 @@ An example of a localizable `Place`: `Creation`s are represented by [schema.org/CreativeWork](http://schema.org/CreativeWork)s and its subtypes (such as [schema.org/Book](http://schema.org/Book)). To differentiate between the different -`CreationMode`s (`lcc:Manifestation` or `lcc:Work`), we define our own AbstractWork class -(subclassed from schema.org's CreativeWork) for `Work`s and allow `Manifestation`s to be of -CreativeWork (or any non-AbstractWork subtype of CreativeWork). +`CreationMode`s (`lcc:Manifestation` or `lcc:Work`), we define + +- our own `AbstractWork` class (subclassed from schema.org's CreativeWork) for in-perceivable creations; +- and a `Manifestation` class (subclassed from `coala:AbstractWork`) for perceivable creations. + `Manifestation`s that include a [`url`](http://schema.org/url) property are considered digital `Manifestation`s while all others are physical `Manifestation`s. See the [schema.org/CreativeWork definition](http://schema.org/CreativeWork) for the Linked Data context. -An additional `manifestationOfWork` (equivalent to [`exampleOfWork`](http://schema.org/exampleOfWork)) -property is defined to link `Manifestation`s back to their `Work`. `Manifestation`s must contain +An additional `manifestationOf` (equivalent to [`exampleOfWork`](http://schema.org/exampleOfWork)) +property is defined to link `Manifestation`s back to their `AbstractWork`. `Manifestation`s must contain a valid link in this property, and `Work`s must not contain this property. Our own vocabulary definitions for `Creation`s: @@ -275,9 +276,19 @@ Our own vocabulary definitions for `Creation`s: ... } -// ManifestationOfWork Property +// Manifestation Class +{ + "@id": "/Manifestation", + "@type": "rdfs:Class", + "rdfs:subClassOf": { + "@id": "coala:AbstractWork" + }, + ... +} + +// ManifestationOf Property { - "@id": "/manifestationOfWork", + "@id": "/manifestationOf", "@type": "rdf:Property", "schema:domainIncludes": { "@id": "schema:CreativeWork" @@ -320,7 +331,7 @@ An example of a `Work`, and its physical and digital `Manifestation`s: "@type": "Book", "@id": "", "name": "The Fellowship of the Ring", - "manifestationOfWork": "", + "manifestationOf": "", "isPartOf" "", "author": "", "datePublished": "29-07-1954", @@ -337,7 +348,7 @@ An example of a `Work`, and its physical and digital `Manifestation`s: "@type": "Book", "@id": "", "name": "The Fellowship of the Ring", - "manifestationOfWork": "", + "manifestationOf": "", "isPartOf" "", "author": "", "datePublished": "29-07-1954", @@ -364,7 +375,7 @@ An example of a `Work`, and its physical and digital `Manifestation`s: ], "@type": "Book", "name": "The Fellowship of the Ring", - "manifestationOfWork": { "/": "" }, + "manifestationOf": { "/": "" }, "isPartOf" { "/": "" }, "author": { "/": "" }, "datePublished": "29-07-1954", @@ -380,7 +391,7 @@ An example of a `Work`, and its physical and digital `Manifestation`s: ], "@type": "Book", "name": "The Fellowship of the Ring", - "manifestationOfWork": { "/": "" }, + "manifestationOf": { "/": "" }, "isPartOf" { "/": "" }, "author": { "/": "" }, "datePublished": "29-07-1954", diff --git a/schema/coala_context.json b/schema/coala_context.json index 5f60dfb..360b8e7 100644 --- a/schema/coala_context.json +++ b/schema/coala_context.json @@ -10,6 +10,7 @@ "schema": "http://schema.org/", "AbstractWork": "coala:AbstractWork", + "Manifestation": "coala:Manifestation", "Copyright": "coala:Copyright", "DigitalFingerprint": "coala:DigitalFingerprint", "Right": "coala:Right", @@ -30,8 +31,8 @@ "@type": "@id" }, "fingerprint": "coala:fingerprint", - "manifestationOfWork": { - "@id": "coala:manifestationOfWork", + "manifestationOf": { + "@id": "coala:manifestationOf", "@type": "@id" }, "numberOfUses": "coala:numberOfUses", diff --git a/schema/vocab/coala.jsonld b/schema/vocab/coala.jsonld index a62e1f8..35060f0 100644 --- a/schema/vocab/coala.jsonld +++ b/schema/vocab/coala.jsonld @@ -17,6 +17,15 @@ "rdfs:comment": "Abstract concept of a manifested Creation.", "rdfs:label": "AbstractWork" }, + { + "@id": "coala:Manifestation", + "@type": "rdfs:Class", + "rdfs:subClassOf": { + "@id": "coala:AbstractWork" + }, + "rdfs:comment": "A perceivable manifestation of an AbstractWork.", + "rdfs:label": "Manifestation" + }, { "@id": "coala:Copyright", "@type": "rdfs:Class", @@ -172,10 +181,10 @@ "rdfs:label": "fingerprint" }, { - "@id": "coala:manifestationOfWork", + "@id": "coala:manifestationOf", "@type": "rdf:Property", "schema:domainIncludes": { - "@id": "schema:CreativeWork" + "@id": "coala:Manifestation" }, "schema:rangeIncludes": { "@id": "coala:AbstractWork" @@ -183,8 +192,8 @@ "owl:equivalentProperty": { "@id": "schema:exampleOfWork" }, - "rdfs:comment": "The parent Work of this Manifestation.", - "rdfs:label": "manifestationOfWork" + "rdfs:comment": "The parent AbstractWork of this Manifestation.", + "rdfs:label": "manifestationOf" }, { "@id": "coala:numberOfUses",