Hi all,I have an ontology with class time containing the attributes (year, month, week, day, hour, minute, second). Now I have set some typical constraints for each attribute and I am stuck with these. For example, the attribute 'hour' can occur max 1x in time with a value between 0 and 23 (an hour cannot be negative and after 23 hours it should be referred to as 'day' (see first picture below for property shape).These constraints are standard of type 'string', hence resulting in ValueErrors (see second picture), since the EDG software implements these values automatically as a string.While I have found a way to convert the elements by manually removing the quotation marks within the source code (see third picture), this consumes quite a lot of time. Therefore I would like to know if there is an general build-in option to change the datatype from string to integer?
--<hour_properties.PNG>property characterisics
<time_error.PNG>ValueError
<adjust_sourcecode.PNG>source code
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/369b6925-4dcb-4563-9915-31d663a84025%40googlegroups.com.
<hour_properties.PNG>
<time_error.PNG>
<adjust_sourcecode.PNG>
On Jul 25, 2019, at 9:23 AM, Stefan Verweij <stefan....@wur.nl> wrote:
I have tried that indeed, by selecting integer from the dropdown list at datatype at Type of Values in the UI. But then I get another error that says the datatype doesn't match the values at max inclusive (see picture again)
<datatype_error.PNG>
Op donderdag 25 juli 2019 15:10:54 UTC+2 schreef Irene Polikoff:Have you tried adding sh:datatype XSD:integer constraint? Or do you want values to be strings?
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/9f23dec7-eb5e-409a-b794-dac26436820e%40googlegroups.com.
<datatype_error.PNG>
...
Let’s say you have something like
g:C1-testrdf:type sh:PropertyShape ;sh:path g:test ;sh:maxInclusive "23" ;sh:minInclusive "0" ;.Add the datatype constraint. Then change (using source code panel) “23” and “0” to 23 and 0.To get to:g:C1-testrdf:type sh:PropertyShape ;sh:path g:test ;sh:datatype xsd:integer ;sh:maxInclusive 23 ;sh:minInclusive 0 ;.Basically, if you set sh:datatype xsd:integer constraint before you enter min/max values and save it, then min/max values constraints will be saved as integers.But if you add the integer constraint after entering min/max, then it would be saved as a string. The same happens if you enter both of them in a single edit transaction since the system does not know yet that it must be a digit.So, in the future, enter the integer constraint first, save it. Then you can enter values constraints and they will be integers.
On Jul 25, 2019, at 9:23 AM, Stefan Verweij <stefan...@wur.nl> wrote:
I have tried that indeed, by selecting integer from the dropdown list at datatype at Type of Values in the UI. But then I get another error that says the datatype doesn't match the values at max inclusive (see picture again)<datatype_error.PNG>
Op donderdag 25 juli 2019 15:10:54 UTC+2 schreef Irene Polikoff:Have you tried adding sh:datatype XSD:integer constraint? Or do you want values to be strings?--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/6c17415d-c2cb-4719-a415-fb6d8e7076c9%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/6c17415d-c2cb-4719-a415-fb6d8e7076c9%40googlegroups.com.


To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/034acc64-0c2b-4259-8c98-b647ed999d9b%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/034acc64-0c2b-4259-8c98-b647ed999d9b%40googlegroups.com.
Have you tried adding sh:datatype XSD:integer constraint? Or do you want values to be strings?
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/d8992643-d56c-4579-b1e3-ab406af547be%40googlegroups.com.
Seems to me you’re trying to manage two concepts you cannot record as one: “happened at time” and “time taken to occur”.I’ve seen both xsd:duration and xsd:dateTime used in real, operational ontologies in customer projects. However, the main use I’ve seen for xsd:duration is properties about things that live for years like "equipment life”. For data about experiments or similar, I’ve seen xsd:dateTime used far more often.
A few alternatives:
1 - Perhaps two dateTime properties of the action/activity are all you need: startedOrHappenedAt and endedAt. If endedAt is missing then you know it happened instantly, if not then duration = endedAt - startedOrHappenedAt.2 - Alternatively, you could use startedAt and endedAt and set endedAt to have the same value as startedAt for the “instantly” case.3 - Alternatively, choose the smallest value allowed for xsd:duration and use that to mean “instantly”. People sometimes choose a seldom-used value of a datatype and give it a specific meaning.
The advantage of 2 is that you also record when something happened, not just how long it took to happen, and so you can order activities and also always calculate if activities overlapped in time. 1 is one less triple in the “instantly” case. 3 is perhaps best if you are only ever comparing how long things took, not when they happened.A fourth option you might consider is two subclasses of Activity: InstantaneousActivity and ContinuousActivity rather than trying to use a Boolean (which very often means a subclass is missing).Cheers,David
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/d8992643-d56c-4579-b1e3-ab406af547be%40googlegroups.com.