...
Model: The interval of OntoCommons project can be expressed in four different ways (as per “4.4.1 Means of specifying time intervals” in ISO8601). Although the screenshots below shows show the complete KG, in practice, the interval oc-period can have be expressed:
by a start and an end: oc-period have has only oc-start and oc-end.
by a duration and context information: oc-period has only oc-duration-exp-ymd.
by start and duration: oc-period has only oc-start and oc-duration-exp-ymd .
by end and duration: oc-period has only oc-end and oc-duration-exp-ymd.
Note: oc-period is expressed in two different wayways, in years, months and days and in days by oc-duration-exp-ymd and oc-duration-exp-d respectively.
...
The start instant and end instant of the period can be expressed in any granularity. In the following, the oc-start and oc-end are expressed in year.
...
Source:
View file | ||
---|---|---|
|
Querying the interval value:
Query the duration of the OntoCommons project in by duration and context information as specified in “4.4.4.2.1 Format with designators” of ISO8601. In the following query the expression using type time:TimeDuration with unit type time:unitDay is used for the duration value expression.
Code Block |
---|
PREFIX bfo: <http://purl.obolibrary.org/obo/>
PREFIX dt: <http://www.semanticweb.org/arkop/ontologies/2023/7/untitled-ontology-307#>
PREFIX iof: <https://spec.industrialontologies.org/ontology/core/Core/>
PREFIX time: <http://www.w3.org/2006/time#>
select ?duration where
{
BIND(dt:ontocommons-project as ?p)
?p bfo:BFO_0000199 ?int.
?int iof:hasValueExpressionAtAllTimes ?iex.
?iex a time:Duration;
time:numericDuration ?v;
time:unitType ?u.
BIND(IF(?u = time:unitDay, CONCAT("P", STR(?v), "D"),
IF(?u = time:unitMonth, CONCAT("P", STR(?v), "Y"),
IF(?u = time:unitYear, CONCAT("P", STR(?v), "D"),
"FORMAT NOT HANDLED"))) as ?duration)
} |
...
Query the duration of the OntoCommons project by start and duration as specified in “4.4.4.3 Representations of time interval identified by start and duration” of ISO8601. In the following query the expression using type time:DurationDescription is used for the duration value expression.
Code Block |
---|
PREFIX bfo: <http://purl.obolibrary.org/obo/>
PREFIX dt: <http://www.semanticweb.org/arkop/ontologies/2023/7/untitled-ontology-307#>
PREFIX iof: <https://spec.industrialontologies.org/ontology/core/Core/>
PREFIX time: <http://www.w3.org/2006/time#>
select ?start_duration where
{
BIND(dt:ontocommons-project as ?p)
?p bfo:BFO_0000199 ?int.
?int bfo:BFO_0000222 ?si;
bfo:BFO_0000224 ?ei.
?si iof:hasValueExpressionAtAllTimes ?six.
?six a iof:TemporalInstantValueExpression;
iof:hasDateTimeValue ?siv.
?int iof:hasValueExpressionAtAllTimes ?iex.
?iex a time:Duration;
time:numericDuration ?v;
time:unitType ?u.
BIND(IF(?u = time:unitDay, CONCAT("P", STR(?v), "D"),
IF(?u = time:unitMonth, CONCAT("P", STR(?v), "Y"),
IF(?u = time:unitYear, CONCAT("P", STR(?v), "D"),
"FORMAT NOT HANDLED"))) as ?duration)
BIND(CONCAT(STR(?siv),"/", ?duration) as ?start_duration)
} |
...
Query the duration of the OntoCommons project by duration and end as specified in “4.4.4.4 Representations of time interval identified by duration and end” of ISO8601. In the following query the expression using type time:DurationDescription is used for the duration value expression.
Code Block |
---|
PREFIX bfo: <http://purl.obolibrary.org/obo/>
PREFIX dt: <http://www.semanticweb.org/arkop/ontologies/2023/7/untitled-ontology-307#>
PREFIX iof: <https://spec.industrialontologies.org/ontology/core/Core/>
PREFIX time: <http://www.w3.org/2006/time#>
select ?end_duration where
{
BIND(dt:ontocommons-project as ?p)
?p bfo:BFO_0000199 ?int.
?int bfo:BFO_0000222 ?si;
bfo:BFO_0000224 ?ei.
?ei iof:hasValueExpressionAtAllTimes ?eix.
?eix a iof:TemporalInstantValueExpression;
iof:hasDateTimeValue ?eiv.
?int iof:hasValueExpressionAtAllTimes ?iex.
?iex a time:Duration;
time:numericDuration ?v;
time:unitType ?u.
BIND(IF(?u = time:unitDay, CONCAT("P", STR(?v), "D"),
IF(?u = time:unitMonth, CONCAT("P", STR(?v), "Y"),
IF(?u = time:unitYear, CONCAT("P", STR(?v), "D"),
"FORMAT NOT HANDLED"))) as ?duration)
BIND(CONCAT(?duration,"/",STR(?eiv)) as ?end_duration)
} |
...
Query the duration of the OntoCommons project by start and end as specified in “4.4.4.1 Representations of time intervals identified by start and end” of ISO8601.
Code Block |
---|
PREFIX bfo: <http://purl.obolibrary.org/obo/>
PREFIX dt: <http://www.semanticweb.org/arkop/ontologies/2023/7/untitled-ontology-307#>
PREFIX iof: <https://spec.industrialontologies.org/ontology/core/Core/>
PREFIX time: <http://www.w3.org/2006/time#>
select ?start_end where
{
BIND(dt:ontocommons-project as ?p)
?p bfo:BFO_0000199 ?int.
?int bfo:BFO_0000222 ?si;
bfo:BFO_0000224 ?ei.
?si iof:hasValueExpressionAtAllTimes ?six.
?six a iof:TemporalInstantValueExpression;
iof:hasDateTimeValue ?siv.
?ei iof:hasValueExpressionAtAllTimes ?eix.
?eix a iof:TemporalInstantValueExpression;
iof:hasDateTimeValue ?eiv.
BIND(CONCAT(STR(?siv),"/",STR(?eiv)) as ?start_end)
} |
...