Skip to content

Commit

Permalink
Add address/location properties
Browse files Browse the repository at this point in the history
  • Loading branch information
hyfen committed Apr 25, 2024
1 parent 4b6d6dc commit 01b8589
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 6 deletions.
61 changes: 59 additions & 2 deletions schema/chronicle_schema_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
"see_also": "https://schema.org/ConsumeAction",
"comment": "The act of ingesting information/resources/food."
},
{
"id": "https://schema.chronicle.app/ContactPoint",
"subtype_ids": [
"https://schema.chronicle.app/PostalAddress"
],
"see_also": "https://schema.org/ContactPoint",
"comment": "A contact point—for example, a Customer Complaints department."
},
{
"id": "https://schema.chronicle.app/Country",
"subtype_ids": [
Expand Down Expand Up @@ -203,7 +211,8 @@
{
"id": "https://schema.chronicle.app/Intangible",
"subtype_ids": [
"https://schema.chronicle.app/Quantity"
"https://schema.chronicle.app/Quantity",
"https://schema.chronicle.app/StructuredValue"
],
"see_also": "https://schema.org/Intangible",
"comment": "A utility class that serves as the umbrella for a number of 'intangible' things such as quantities, structured values, etc."
Expand Down Expand Up @@ -345,6 +354,14 @@
"see_also": "https://schema.org/PodcastSeries",
"comment": "A podcast is an episodic series of digital audio or video files which a user can download and listen to."
},
{
"id": "https://schema.chronicle.app/PostalAddress",
"subtype_ids": [

],
"see_also": "https://schema.org/PostalAddress",
"comment": "The mailing address."
},
{
"id": "https://schema.chronicle.app/Quantity",
"subtype_ids": [
Expand Down Expand Up @@ -380,6 +397,14 @@
"see_also": "https://schema.org/State",
"comment": "A state or province of a country."
},
{
"id": "https://schema.chronicle.app/StructuredValue",
"subtype_ids": [
"https://schema.chronicle.app/ContactPoint"
],
"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."
},
{
"id": "https://schema.chronicle.app/Text",
"subtype_ids": [
Expand Down Expand Up @@ -436,9 +461,11 @@
{
"id": "https://schema.chronicle.app/address",
"domain": [
"https://schema.chronicle.app/Person"
"https://schema.chronicle.app/Person",
"https://schema.chronicle.app/Place"
],
"range": [
"https://schema.chronicle.app/PostalAddress",
"https://schema.chronicle.app/Text"
],
"many": false,
Expand Down Expand Up @@ -718,6 +745,20 @@
"comment": "Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.",
"see_also": "https://schema.org/keywords"
},
{
"id": "https://schema.chronicle.app/latitude",
"domain": [
"https://schema.chronicle.app/Place"
],
"range": [
"https://schema.chronicle.app/Number",
"https://schema.chronicle.app/Text"
],
"many": false,
"required": false,
"comment": "The latitude of a location. For example ```37.42242``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).",
"see_also": "https://schema.org/latitude"
},
{
"id": "https://schema.chronicle.app/location",
"domain": [
Expand All @@ -726,13 +767,28 @@
],
"range": [
"https://schema.chronicle.app/Place",
"https://schema.chronicle.app/PostalAddress",
"https://schema.chronicle.app/Text"
],
"many": true,
"required": false,
"comment": "The location of, for example, where an event is happening, where an organization is located, or where an action takes place.",
"see_also": "https://schema.org/location"
},
{
"id": "https://schema.chronicle.app/longitude",
"domain": [
"https://schema.chronicle.app/Place"
],
"range": [
"https://schema.chronicle.app/Number",
"https://schema.chronicle.app/Text"
],
"many": false,
"required": false,
"comment": "The longitude of a location. For example ```-122.08585``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).",
"see_also": "https://schema.org/longitude"
},
{
"id": "https://schema.chronicle.app/mentions",
"domain": [
Expand Down Expand Up @@ -845,6 +901,7 @@
"https://schema.chronicle.app/Message"
],
"range": [
"https://schema.chronicle.app/ContactPoint",
"https://schema.chronicle.app/Organization",
"https://schema.chronicle.app/Person"
],
Expand Down
12 changes: 11 additions & 1 deletion schema/chronicle_schema_v1.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version 1
set_base_graph 'schema.org', '22.0'
set_base_graph 'schema.org', '26.0'

pick_type :Thing do
pick_type :Action do
Expand Down Expand Up @@ -97,6 +97,12 @@
pick_type :Energy
pick_type :Mass
end

pick_type :StructuredValue do
pick_type :ContactPoint do
pick_type :PostalAddress
end
end
end

pick_type :Organization
Expand All @@ -117,6 +123,10 @@
pick_type :AdministrativeArea do
pick_all_subtypes
end

apply_property :address
apply_property :latitude
apply_property :longitude
end

apply_property :alternateName
Expand Down
41 changes: 38 additions & 3 deletions schema/chronicle_schema_v1.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
rdfs:seeAlso schemaorg:ConsumeAction;
rdfs:subClassOf :Action .

:ContactPoint a rdfs:Class;
rdfs:comment "A contact point—for example, a Customer Complaints department.";
rdfs:seeAlso schemaorg:ContactPoint;
rdfs:subClassOf :StructuredValue .

:Country a rdfs:Class;
rdfs:comment "A country.";
rdfs:seeAlso schemaorg:Country;
Expand Down Expand Up @@ -216,6 +221,11 @@
rdfs:seeAlso schemaorg:PodcastSeries;
rdfs:subClassOf :CreativeWorkSeries .
:PostalAddress a rdfs:Class;
rdfs:comment "The mailing address.";
rdfs:seeAlso schemaorg:PostalAddress;
rdfs:subClassOf :ContactPoint .
: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 All @@ -236,6 +246,11 @@
rdfs:seeAlso schemaorg:State;
rdfs:subClassOf :AdministrativeArea .
:StructuredValue a rdfs:Class;
rdfs: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.";
rdfs:seeAlso schemaorg:StructuredValue;
rdfs:subClassOf :Intangible .
:Text a rdfs:Class;
rdfs:comment "Data type: Text.";
rdfs:seeAlso schemaorg:Text;
Expand Down Expand Up @@ -268,8 +283,10 @@
rdfs:comment "Physical address of the item.";
rdfs:seeAlso schemaorg:address;
owl:maxCardinality 1;
:domainIncludes :Person;
:rangeIncludes :Text .
:domainIncludes :Person,
:Place;
:rangeIncludes :PostalAddress,
:Text .
:agent a rdf:Property;
rdfs:comment "The direct performer or driver of the action (animate or inanimate). E.g. *John* wrote a book.";
Expand Down Expand Up @@ -414,12 +431,29 @@
:rangeIncludes :Text,
:URL .
:latitude a rdf:Property;
rdfs:comment "The latitude of a location. For example ```37.42242``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).";
rdfs:seeAlso schemaorg:latitude;
owl:maxCardinality 1;
:domainIncludes :Place;
:rangeIncludes :Number,
:Text .
:location a rdf:Property;
rdfs:comment "The location of, for example, where an event is happening, where an organization is located, or where an action takes place.";
rdfs:seeAlso schemaorg:location;
:domainIncludes :Event,
:Organization;
:rangeIncludes :Place,
:PostalAddress,
:Text .
:longitude a rdf:Property;
rdfs:comment "The longitude of a location. For example ```-122.08585``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).";
rdfs:seeAlso schemaorg:longitude;
owl:maxCardinality 1;
:domainIncludes :Place;
:rangeIncludes :Number,
:Text .
:mentions a rdf:Property;
Expand Down Expand Up @@ -480,7 +514,8 @@
rdfs:comment "A sub property of participant. The participant who is at the receiving end of the action.";
rdfs:seeAlso schemaorg:recipient;
:domainIncludes :Message;
:rangeIncludes :Organization,
:rangeIncludes :ContactPoint,
:Organization,
:Person .
:result a rdf:Property;
Expand Down

0 comments on commit 01b8589

Please sign in to comment.