Skip to content

Commit

Permalink
Add image property to Thing
Browse files Browse the repository at this point in the history
  • Loading branch information
hyfen committed Apr 25, 2024
1 parent 6faa8ee commit 9bb289e
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 1 deletion.
105 changes: 104 additions & 1 deletion schema/chronicle_schema_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
"see_also": "https://schema.org/AssessAction",
"comment": "The act of forming one's opinion, reaction or sentiment."
},
{
"id": "https://schema.chronicle.app/AudioObject",
"subtype_ids": [

],
"see_also": "https://schema.org/AudioObject",
"comment": "An audio file."
},
{
"id": "https://schema.chronicle.app/Book",
"subtype_ids": [
Expand Down Expand Up @@ -109,6 +117,7 @@
"https://schema.chronicle.app/Book",
"https://schema.chronicle.app/CreativeWorkSeries",
"https://schema.chronicle.app/Episode",
"https://schema.chronicle.app/MediaObject",
"https://schema.chronicle.app/Message",
"https://schema.chronicle.app/MusicPlaylist",
"https://schema.chronicle.app/MusicRecording"
Expand Down Expand Up @@ -200,6 +209,14 @@
"see_also": "https://schema.org/Float",
"comment": "Data type: Floating number."
},
{
"id": "https://schema.chronicle.app/ImageObject",
"subtype_ids": [

],
"see_also": "https://schema.org/ImageObject",
"comment": "An image file."
},
{
"id": "https://schema.chronicle.app/InsertAction",
"subtype_ids": [
Expand Down Expand Up @@ -257,6 +274,16 @@
"see_also": "https://schema.org/Mass",
"comment": "Properties that take Mass as values are of the form '<Number> <Mass unit of measure>'. E.g., '7 kg'."
},
{
"id": "https://schema.chronicle.app/MediaObject",
"subtype_ids": [
"https://schema.chronicle.app/AudioObject",
"https://schema.chronicle.app/ImageObject",
"https://schema.chronicle.app/VideoObject"
],
"see_also": "https://schema.org/MediaObject",
"comment": "A media object, such as an image, video, audio, or text object embedded in a web page or a downloadable dataset i.e. DataDownload. Note that a creative work may have many media objects associated with it on the same web page. For example, a page about a single song (MusicRecording) may have a music video (VideoObject), and a high and low bandwidth audio stream (2 AudioObject's)."
},
{
"id": "https://schema.chronicle.app/Message",
"subtype_ids": [
Expand Down Expand Up @@ -362,6 +389,14 @@
"see_also": "https://schema.org/PostalAddress",
"comment": "The mailing address."
},
{
"id": "https://schema.chronicle.app/QuantitativeValue",
"subtype_ids": [

],
"see_also": "https://schema.org/QuantitativeValue",
"comment": " A point value or interval for product characteristics and other purposes."
},
{
"id": "https://schema.chronicle.app/Quantity",
"subtype_ids": [
Expand Down Expand Up @@ -400,7 +435,8 @@
{
"id": "https://schema.chronicle.app/StructuredValue",
"subtype_ids": [
"https://schema.chronicle.app/ContactPoint"
"https://schema.chronicle.app/ContactPoint",
"https://schema.chronicle.app/QuantitativeValue"
],
"see_also": "https://schema.org/StructuredValue",
"comment": "Structured values are used when the value of a property has a more complex structure than simply being a textual value or a reference to another thing."
Expand Down Expand Up @@ -442,6 +478,14 @@
],
"see_also": "https://schema.org/UpdateAction",
"comment": "The act of managing by changing/editing the state of the object."
},
{
"id": "https://schema.chronicle.app/VideoObject",
"subtype_ids": [

],
"see_also": "https://schema.org/VideoObject",
"comment": "A video file."
}
],
"properties": [
Expand Down Expand Up @@ -653,6 +697,7 @@
"id": "https://schema.chronicle.app/duration",
"domain": [
"https://schema.chronicle.app/Episode",
"https://schema.chronicle.app/MediaObject",
"https://schema.chronicle.app/MusicRecording"
],
"range": [
Expand Down Expand Up @@ -704,6 +749,20 @@
"comment": "Position of the episode within an ordered group of episodes.",
"see_also": "https://schema.org/episodeNumber"
},
{
"id": "https://schema.chronicle.app/height",
"domain": [
"https://schema.chronicle.app/MediaObject"
],
"range": [
"https://schema.chronicle.app/Distance",
"https://schema.chronicle.app/QuantitativeValue"
],
"many": false,
"required": false,
"comment": "The height of the item.",
"see_also": "https://schema.org/height"
},
{
"id": "https://schema.chronicle.app/identifier",
"domain": [
Expand All @@ -718,6 +777,20 @@
"comment": "The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.\n ",
"see_also": "https://schema.org/identifier"
},
{
"id": "https://schema.chronicle.app/image",
"domain": [
"https://schema.chronicle.app/Thing"
],
"range": [
"https://schema.chronicle.app/ImageObject",
"https://schema.chronicle.app/URL"
],
"many": false,
"required": false,
"comment": "An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].",
"see_also": "https://schema.org/image"
},
{
"id": "https://schema.chronicle.app/inAlbum",
"domain": [
Expand Down Expand Up @@ -1127,6 +1200,22 @@
"comment": "URL of the item.",
"see_also": "https://schema.org/url"
},
{
"id": "https://schema.chronicle.app/value",
"domain": [
"https://schema.chronicle.app/QuantitativeValue"
],
"range": [
"https://schema.chronicle.app/Boolean",
"https://schema.chronicle.app/Number",
"https://schema.chronicle.app/StructuredValue",
"https://schema.chronicle.app/Text"
],
"many": false,
"required": false,
"comment": "The value of a [[QuantitativeValue]] (including [[Observation]]) or property value node.\\n\\n* For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is 'Number'.\\n* For [[PropertyValue]], it can be 'Text', 'Number', 'Boolean', or 'StructuredValue'.\\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.\\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.",
"see_also": "https://schema.org/value"
},
{
"id": "https://schema.chronicle.app/webFeed",
"domain": [
Expand All @@ -1139,6 +1228,20 @@
"required": false,
"comment": "The URL for a feed, e.g. associated with a podcast series, blog, or series of date-stamped updates. This is usually RSS or Atom.",
"see_also": "https://schema.org/webFeed"
},
{
"id": "https://schema.chronicle.app/width",
"domain": [
"https://schema.chronicle.app/MediaObject"
],
"range": [
"https://schema.chronicle.app/Distance",
"https://schema.chronicle.app/QuantitativeValue"
],
"many": false,
"required": false,
"comment": "The width of the item.",
"see_also": "https://schema.org/width"
}
]
}
15 changes: 15 additions & 0 deletions schema/chronicle_schema_v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,22 @@
apply_property :episodeNumber
end

pick_type :MediaObject do
pick_type :AudioObject
pick_type :ImageObject
pick_type :VideoObject

apply_property :duration
apply_property :width
apply_property :height
end

pick_type :MusicPlaylist do
pick_type :MusicAlbum do
apply_property :byArtist, many: true
end
end

pick_type :MusicRecording do
apply_property :inAlbum, many: true
apply_property :byArtist, many: true
Expand Down Expand Up @@ -109,6 +120,9 @@
apply_property :streetAddress
end
end
pick_type :QuantitativeValue do
apply_property :value
end
end
end

Expand Down Expand Up @@ -139,6 +153,7 @@
apply_property :alternateName
apply_property :description
apply_property :identifier
apply_property :image
apply_property :name
apply_property :subjectOf, many: true
apply_property :url
Expand Down
60 changes: 60 additions & 0 deletions schema/chronicle_schema_v1.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
rdfs:seeAlso schemaorg:AssessAction;
rdfs:subClassOf :Action .

:AudioObject a rdfs:Class;
rdfs:comment "An audio file.";
rdfs:seeAlso schemaorg:AudioObject;
rdfs:subClassOf :MediaObject .

:Book a rdfs:Class;
rdfs:comment "A book.";
rdfs:seeAlso schemaorg:Book;
Expand Down Expand Up @@ -126,6 +131,11 @@
rdfs:seeAlso schemaorg:Float;
rdfs:subClassOf :Number .
:ImageObject a rdfs:Class;
rdfs:comment "An image file.";
rdfs:seeAlso schemaorg:ImageObject;
rdfs:subClassOf :MediaObject .
:InsertAction a rdfs:Class;
rdfs:comment "The act of adding at a specific location in an ordered collection.";
rdfs:seeAlso schemaorg:InsertAction;
Expand Down Expand Up @@ -161,6 +171,11 @@
rdfs:seeAlso schemaorg:Mass;
rdfs:subClassOf :Quantity .
:MediaObject a rdfs:Class;
rdfs:comment "A media object, such as an image, video, audio, or text object embedded in a web page or a downloadable dataset i.e. DataDownload. Note that a creative work may have many media objects associated with it on the same web page. For example, a page about a single song (MusicRecording) may have a music video (VideoObject), and a high and low bandwidth audio stream (2 AudioObject's).";
rdfs:seeAlso schemaorg:MediaObject;
rdfs:subClassOf :CreativeWork .
:Message a rdfs:Class;
rdfs:comment "A single message from a sender to one or more organizations or people.";
rdfs:seeAlso schemaorg:Message;
Expand Down Expand Up @@ -226,6 +241,11 @@
rdfs:seeAlso schemaorg:PostalAddress;
rdfs:subClassOf :ContactPoint .
:QuantitativeValue a rdfs:Class;
rdfs:comment " A point value or interval for product characteristics and other purposes.";
rdfs:seeAlso schemaorg:QuantitativeValue;
rdfs:subClassOf :StructuredValue .
:Quantity a rdfs:Class;
rdfs:comment "Quantities such as distance, time, mass, weight, etc. Particular instances of say Mass are entities like '3 kg' or '4 milligrams'.";
rdfs:seeAlso schemaorg:Quantity;
Expand Down Expand Up @@ -270,6 +290,11 @@
rdfs:seeAlso schemaorg:UpdateAction;
rdfs:subClassOf :Action .
:VideoObject a rdfs:Class;
rdfs:comment "A video file.";
rdfs:seeAlso schemaorg:VideoObject;
rdfs:subClassOf :MediaObject .
<https://schema.chronicle.app> a owl:Ontology;
owl:versionInfo "1" .
Expand Down Expand Up @@ -385,6 +410,7 @@
rdfs:seeAlso schemaorg:duration;
owl:maxCardinality 1;
:domainIncludes :Episode,
:MediaObject,
:MusicRecording;
:rangeIncludes :Duration .
Expand All @@ -411,6 +437,14 @@
:rangeIncludes :Integer,
:Text .
:height a rdf:Property;
rdfs:comment "The height of the item.";
rdfs:seeAlso schemaorg:height;
owl:maxCardinality 1;
:domainIncludes :MediaObject;
:rangeIncludes :Distance,
:QuantitativeValue .
:identifier a rdf:Property;
rdfs:comment """The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.
""";
Expand All @@ -420,6 +454,14 @@
:rangeIncludes :Text,
:URL .
:image a rdf:Property;
rdfs:comment "An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].";
rdfs:seeAlso schemaorg:image;
owl:maxCardinality 1;
:domainIncludes :Thing;
:rangeIncludes :ImageObject,
:URL .
:inAlbum a rdf:Property;
rdfs:comment "The album to which this recording belongs.";
rdfs:seeAlso schemaorg:inAlbum;
Expand Down Expand Up @@ -632,9 +674,27 @@
:domainIncludes :Thing;
:rangeIncludes :URL .
:value a rdf:Property;
rdfs:comment "The value of a [[QuantitativeValue]] (including [[Observation]]) or property value node.\\n\\n* For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is 'Number'.\\n* For [[PropertyValue]], it can be 'Text', 'Number', 'Boolean', or 'StructuredValue'.\\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.\\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.";
rdfs:seeAlso schemaorg:value;
owl:maxCardinality 1;
:domainIncludes :QuantitativeValue;
:rangeIncludes :Boolean,
:Number,
:StructuredValue,
:Text .
:webFeed a rdf:Property;
rdfs:comment "The URL for a feed, e.g. associated with a podcast series, blog, or series of date-stamped updates. This is usually RSS or Atom.";
rdfs:seeAlso schemaorg:webFeed;
owl:maxCardinality 1;
:domainIncludes :PodcastSeries;
:rangeIncludes :URL .
:width a rdf:Property;
rdfs:comment "The width of the item.";
rdfs:seeAlso schemaorg:width;
owl:maxCardinality 1;
:domainIncludes :MediaObject;
:rangeIncludes :Distance,
:QuantitativeValue .

0 comments on commit 9bb289e

Please sign in to comment.