2012-01-05. Frozen archive - links may not resolve - see directory of files at MoinMoin wiki archive

> SpecificOrGenericProperties

Specific Properties or Generic Properties

Introduction

This document is intended as a contribution to the discussion of the proposed "accessibility" property, but also to highlight some general issues relating to design choices in the construction of RDF properties.

Background

RDF Schema is principally "property-centric"

Two Approaches

Example: Representing the characteristics of a physical material

Suppose we want a simple RDF vocabulary to represent some subset of the physical characteristics of a material e.g.

That's a somewhat random set of characteristics, and on their own they probably don't address much in the way of a real world requirement, but I chose them because they illustrate a combination of

In reality, things are more complex because there might be combinations of measurements/quantities involved, and I've also simplified the toxicity classification, but I think this simple version suffices for the purposes of this discussion.

Single Generic Property with "Broad" Range

With this approach a single property ([Prop]hasCharacteristic) is defined, with a range of the class of Characteristics,

Prop:hasCharacteristic rdfs:range Class:Characteristic .

where a Characteristic is something like "An aspect of a substance that can be measured or perceived." So individual examples of a characteristic would be "a boiling point of 100 degrees Celsius" or a "a density of 958.4 kilograms per cubic metre".

There's a difference between

So to express the information that some particular substance has six characteristics, we use multiple triples, each with the same predicate:

Thing:T12 Prop:hasCharacteristic Flammability:A1 ;
          Prop:hasCharacteristic Toxicity:T2 ;
          Prop:hasCharacteristic [ Prop:celsius "100"^^xsd:decimal ] ;
          Prop:hasCharacteristic [ Prop:kJoules "150"^^xsd:decimal ] ;
          Prop:hasCharacteristic [ Prop:celsius "200"^^xsd:decimal ] ;
          Prop:hasCharacteristic [ Prop:kJoules "250"^^xsd:decimal ] .

Thing:T34 Prop:hasProperty Flammability:B1 ;
          Prop:hasProperty Toxicity:T4 ;
          Prop:hasProperty [ Prop:celsius "300"^^xsd:decimal ] ;
          Prop:hasProperty [ Prop:kJoules "350"^^xsd:decimal ] ;
          Prop:hasProperty [ Prop:celsius "400"^^xsd:decimal ] ;
          Prop:hasProperty [ Prop:kJoules "450"^^xsd:decimal ] .

From that information alone, a consumer can't distinguish the specific type of characteristic e.g. boiling points from melting points, and even distinguishing flammability from toxicity requires that the consumer has prior knowledge of the resources identified by those URIs.

So a query like "list all things that have a flammability of A1" can be satisfied:

SELECT ?thing WHERE {
  ?thing Prop:hasCharacteristic Flammability:A1
}

But queries like "list all things with a boiling point over 200 degrees Celsius" can not be satisfied without additional information.

An RDFS-aware application can infer only that the values are characteristics.

The distinction between the different types of characteristic is provided as additional triples, e.g. to provides types for the values:

Thing:T12 Prop:hasCharacteristic Flammability:A1 ;
          Prop:hasCharacteristic Toxicity:T2 ;
          Prop:hasCharacteristic [ a Class:MeltingPoint ; Prop:celsius "100"^^xsd:decimal ] ;
          Prop:hasCharacteristic [ a Class:HeatOfFusion ; Prop:kJoules "150"^^xsd:decimal ] ;
          Prop:hasCharacteristic [ a Class:BoilingPoint ; Prop:celsius "200"^^xsd:decimal ] ;
          Prop:hasCharacteristic [ a Class:HeatOfVaporisation ; Prop:kJoules "250"^^xsd:decimal ] .

Flammability:A1 a Class:Flammability .
Toxicity:T2 a Class:Toxicity .

Thing:T34 Prop:hasCharacteristic Flammability:B1 ;
          Prop:hasCharacteristic Toxicity:T4 ;
          Prop:hasCharacteristic [ a Class:MeltingPoint ; Prop:celsius "300"^^xsd:decimal ] ;
          Prop:hasCharacteristic [ a Class:HeatOfFusion ; Prop:kJoules "350"^^xsd:decimal ] ;
          Prop:hasCharacteristic [ a Class:BoilingPoint ; Prop:celsius "400"^^xsd:decimal ] ;
          Prop:hasCharacteristic [ a Class:HeatOfVaporisation ; Prop:kJoules "450"^^xsd:decimal ] .

Flammability:B1 a Class:Flammability .
Toxicity:T4 a Class:Toxicity .

Now the characteristic-type-specific queries like "list all things with a boiling point over 200 degrees Celsius" can be satisfied:

SELECT ?thing ?c WHERE {
  ?thing Prop:hasCharacteristic ?char .
  ?char a Class:BoilingPoint .
  ?char Prop:celsius ?c .
  FILTER (?c > 200)
}
}

So, although this approach is based on the definition of the single property [Prop]hasCharacteristic, support for many typical queries requires the definition and use of a set of classes in addition to that property.

Examples

Multiple Specific Properties, each with Specified Range

With this approach multiple properties are defined, one for each of the distinct types of characteristics ([Prop]flammability, [Prop]toxicity, [Prop]boilingPoint, [Prop]meltingPoint, [Prop]heatOfFusion, ), each with a specified range:

Prop:flammability rdfs:range Class:Flammability . 
Prop:toxicity rdfs:range Class:Toxicity .
Prop:meltingPoint rdfs:range Class:MeltingPoint . 
Prop:boilingPoint rdfs:range Class:BoilingPoint . 
Prop:heatOfFusion rdfs:range Class:HeatOfFusion .
Prop:heatOfVaporisation rdfs:range Class:HeatOfVaporisation .

So to express the information that some particular substance has six characteristics, we use six triples, each with a different predicate:

Thing:T12 Prop:flammability Flammability:A1 ;
          Prop:toxicity Toxicity:T2 ;
          Prop:meltingPoint [ Prop:celsius "100"^^xsd:decimal ] ;
          Prop:heatOfFusion [ Prop:kJoules "150"^^xsd:decimal ] ;
          Prop:boilingPoint [ Prop:celsius "200"^^xsd:decimal ] ;
          Prop:heatOfVaporisation [ Prop:kJoules "250"^^xsd:decimal ] .

Thing:T34 Prop:flammability Flammability:B1 ;
          Prop:toxicity Toxicity:T4 ;
          Prop:meltingPoint [ Prop:celsius "300"^^xsd:decimal ] ;
          Prop:heatOfFusion [ Prop:kJoules "350"^^xsd:decimal ] ;
          Prop:boilingPoint [ Prop:celsius "400"^^xsd:decimal ] ;
          Prop:heatOfVaporisation [ Prop:kJoules "450"^^xsd:decimal ] .

From that information alone, a consumer can already distinguish e.g. boiling points from melting points, and flammability from toxicity. e.g. this is sufficient information to support simple queries like "list all things that have a flammability of A1":

SELECT ?thing WHERE {
  ?thing Prop:flammability Flammability:A1
}

and also characteristic-type-specific queries like "list all things with a boiling point over 200 degrees Celsius":

SELECT ?thing ?c WHERE {
  ?thing Prop:boilingPoint ?char .
  ?char Prop:celsius ?c .
  FILTER (?c > 200)
}
}

The formal inferences made by an RDFS-aware application, based on the rdfs:range assertions for the different properties, generates more specific information about the values.

And as in the previous approach, that typing information can also be explicitly provided

Thing:T12 Prop:flammability Flammability:A1 ;
          Prop:toxicity Toxicity:T2 ;
          Prop:meltingPoint [ a Class:Temperature ; Prop:celsius "100"^^xsd:decimal ] ;
          Prop:heatOfFusion [ a Class:AmountOfEnergy ; Prop:kJoules "150"^^xsd:decimal ] ;
          Prop:boilingPoint [ a Class:Temperature ; Prop:celsius "200"^^xsd:decimal ] ;
          Prop:heatOfVaporisation [ a Class:AmountOfEnergy ; Prop:kJoules "250"^^xsd:decimal ] .

Flammability:A1 a Class:Flammability .
Toxicity:T2 a Class:Toxicity .

Thing:T34 Prop:flammability Flammability:B1 ;
          Prop:toxicity Toxicity:T4 ;
          Prop:meltingPoint [ a Class:Temperature ; Prop:celsius "300"^^xsd:decimal ] ;
          Prop:heatOfFusion [ a Class:AmountOfEnergy ; Prop:kJoules "350"^^xsd:decimal ] ;
          Prop:boilingPoint [ a Class:Temperature ; Prop:celsius "400"^^xsd:decimal ] ;
          Prop:heatOfVaporisation [ a Class:AmountOfEnergy ; Prop:kJoules "450"^^xsd:decimal ] .

Flammability:B1 a Class:Flammability .
Toxicity:T4 a Class:Toxicity .