Nullifying Values in Part7/8

Message
Author
HansTeijgeler
Posts: 283
Joined: Sun Jan 22, 2012 10:02 pm

Re: Nullifying Values in Part7/8

#21 Post by HansTeijgeler »

@Onno

Not really small, but hopefully clarifying:
plant lifecycle model-20140201.png
plant lifecycle model-20140201.png (238.5 KiB) Viewed 13477 times

Andrew.Prosser

Re: Nullifying Values in Part7/8

#22 Post by Andrew.Prosser »

While the diagram may be significant to you I'm afraid I haven't got a clue how that demonstrates the representation of an unset property in a system within a temporal part. As Keith has pointed out there is a need to say for this temporal part property x has an unspecified value. It is not sufficient just to say property x is not defined within the temporal part.

HansTeijgeler
Posts: 283
Joined: Sun Jan 22, 2012 10:02 pm

Re: Nullifying Values in Part7/8

#23 Post by HansTeijgeler »

@Andy - Why would you want to specify what isn't there?
But if you insist, why don't you leave the value blank, e.g.:

<tpl:valPropertyValue rdf:datatype="&xsd;float"></tpl:valPropertyValue>

In the triple format that results in: ""^^http://www.w3.org/2001/XMLSchema#float

Andrew.Prosser

Re: Nullifying Values in Part7/8

#24 Post by Andrew.Prosser »

A couple of reasons why empty values are not sufficient...

1) "" is not a valid float value, all validators that check data types should swear at you
2) With string values there is a difference between an intentionally empty string and an unset/null value. Our customers/Partners are insisting we know the difference and report it.
3) I have no idea what it means in terms of template expansion/usage if people just start leaving empty roles. It would be good to understand/explore the implications since it could greatly affect the semantic understanding and usefulness of the information presented.

Andrew.Prosser

Re: Nullifying Values in Part7/8

#25 Post by Andrew.Prosser »

Options discussed in the Part 8 working group :

Code: Select all

<!-- Current indirect property in Part 8 representation with scale -->
<owl:Thing>
	<rdf:type rdf:resource="&tpl;IndividualHasIndirectPropertywithValue"/>
	<tpl:hasPossessor rdf:Resource="#MyDataObject"/>
	<tpl:hasIndirectPropertyType rdf:resource="&rdl;SomeProperty"/>
	<tpl:valPropertyValue rdf:datatype="&xsd;float">10.0</tpl:valPropertyValue>
	<tpl:hasScale rdf:resource="&rdl;DegreesCelsius"/>
</owl:Thing>

<!-- option a : Use of empty strings to represent nulls
Notes: 
- An empty string for a string property does not have the same meaning as null.
- A template role with a type of xsd:double or xsd:anyURI is not permitted to have an empty string as a value.
- The type associated with the roles would need to be relaxed to support plain literals or the current type
- for unit qualified values would both the value and scale need to be nullified???
-->
<owl:Thing>
	<rdf:type rdf:resource="&tpl;IndividualHasIndirectPropertywithValue"/>
	<tpl:hasPossessor rdf:Resource="#MyDataObject"/>
	<tpl:hasIndirectPropertyType rdf:resource="&rdl;SomeProperty"/>
	<tpl:valPropertyValue/>  <!-- data type defaults to rdf:PlainLiteral, value is an empty string -->
	<tpl:hasScale/>          <!-- data type defaults to rdf:PlainLiteral, value is an empty string -->
</owl:Thing>

<!-- option b : new template for nulls -->
<owl:Thing>
	<rdf:type rdf:resource="&tpl:NullProperty"/>
	<tpl:hasPossessor rdf:Resource="#MyDataObject"/>
	<tpl:hasPropertyType rdf:resource="&rdl;SomeProperty"/>
</owl:Thing>

<!-- option c : status of property on property templates
- Notes :
- Could the status roles be lists of status values so that status isn't limited to being one per property??
- Since the property can't be null it would have to be assigned a value even if the status was null
-->
<!-- single status option -->
<owl:Thing>
	<rdf:type rdf:resource="&tpl;IndividualHasIndirectPropertywithValue"/>
	<tpl:hasPossessor rdf:Resource="#MyDataObject"/>
	<tpl:hasIndirectPropertyType rdf:resource="&rdl;SomeProperty"/>
	<tpl:valPropertyValue rdf:datatype="&xsd;float">0.0</tpl:valPropertyValue>
	<tpl:hasScale rdf:resource="&rdl;DegreesCelsius"/>
	<tpl:hasStatus rdf:resource="&rdl;null"/>
</owl:Thing>
<!-- list of statuses option -->
<owl:Thing>
	<rdf:type rdf:resource="&tpl;IndividualHasIndirectPropertywithValue"/>
	<tpl:hasPossessor rdf:Resource="#MyDataObject"/>
	<tpl:hasIndirectPropertyType rdf:resource="&rdl;SomeProperty"/>
	<tpl:valPropertyValue rdf:datatype="&xsd;float">0.0</tpl:valPropertyValue>
	<tpl:hasScale rdf:resource="&rdl;DegreesCelsius"/>
	<tpl:hasStatuses rdf:parseType="Collection">
		<rdf:Description rdf:about="&rdl;null"/>
		<rdf:Description rdf:about="&rdl;Status1"/>
	</tpl:hasStatuses
</owl:Thing>


<!-- option d : status of property in separate templates
- Note :
- Properties would have to be assigned identities so that they can be referenced from several templates
-->
<owl:Thing>
	<rdf:type rdf:resource="&tpl;IndividualHasIndirectPropertywithValue"/>
	<tpl:hasPossessor rdf:Resource="#MyDataObject"/>
	<tpl:hasProperty rdf:Resource="#MyObjectsPropertyID"/>
	<tpl:hasIndirectPropertyType rdf:resource="&rdl;SomeProperty"/>
	<tpl:valPropertyValue rdf:datatype="&xsd;float">10.0</tpl:valPropertyValue>
	<tpl:hasScale rdf:resource="&rdl;DegreesCelsius"/>
</owl:Thing>
<owl:Thing>
	<rdf:type rdf:resource="&tpl:PropertyStatus"/>
	<tpl:hasPossessor rdf:Resource="#MyDataObject"/>
	<tpl:hasProperty rdf:Resource="#MyObjectsPropertyID"/>
	<tpl:hasPropertyType rdf:resource="&rdl;SomeProperty"/>
	<tpl:hasStatus rdf:resource="&rdl;null"/>
</owl:Thing>

<!-- option e : use of xsi:nil
- this is not valid RDF in the way that it is intended in xsi.
- the nil statement actually forces the creatoon of a blank node that has an xsi:nil predicate with a plainLiteral value
-->
<owl:Thing>
	<rdf:type rdf:resource="&tpl;IndividualHasIndirectPropertywithValue"/>
	<tpl:hasPossessor rdf:Resource="#MyDataObject"/>
	<tpl:hasProperty rdf:Resource="#MyObjectsPropertyID"/>
	<tpl:hasIndirectPropertyType rdf:resource="&rdl;SomeProperty"/>
	<tpl:valPropertyValue xsi:nil="true"/>
	<tpl:hasScale  xsi:nil="true"/>
</owl:Thing>

this becomes the following when parsed :-

<owl:Thing>
	<rdf:type rdf:resource="&tpl;IndividualHasIndirectPropertywithValue"/>
	<tpl:hasPossessor rdf:Resource="#MyDataObject"/>
	<tpl:hasProperty rdf:Resource="#MyObjectsPropertyID"/>
	<tpl:hasIndirectPropertyType rdf:resource="&rdl;SomeProperty"/>
	<tpl:valPropertyValue>
		<rdf:Description>
			<xsi:nil rdf:datatype="&rdf;PlainLiteral">true</xsi:nil>
		</rdf:Description>
	</tpl:valPropertyValue>
	<tpl:hasScale  xsi:nil="true">
		<rdf:Description>
			<xsi:nil rdf:datatype="&rdf;PlainLiteral">true</xsi:nil>
		</rdf:Description>
	</tpl:hasScale>
</owl:Thing>

HansTeijgeler
Posts: 283
Joined: Sun Jan 22, 2012 10:02 pm

Re: Nullifying Values in Part7/8

#26 Post by HansTeijgeler »

@Andy
xsi:nil isn't valid RDF, unfortunately.

You might add the use of an unrealistic number, such as '99999'.

I don't know why scales should be NULL. On each project that is well known.

Post Reply