Does RDF Data Cube use property as object?
Since I am reading the RDF Data Cube Vocabulary document , I am confused by one thing: MeasureProperties
(In the following example I use eg:lifeExpectancy
firstly defined as properties . However, when defining the data structure, they are used as objects . Is this allowed? see the following example taken directly from the spec document.
Thus, it is first self MeasureProperty
defined as rdf:property
. see the following example eg:lifeExpectancy
:
eg:lifeExpectancy a rdf:Property, qb:MeasureProperty;
rdfs:label "life expectancy"@en;
rdfs:subPropertyOf sdmx-measure:obsValue;
rdfs:range xsd:decimal .
later, this one is MeasureProperty
used to define the data structure:
eg:dsd-le a qb:DataStructureDefinition;
# The dimensions
[...]
# The measure(s)
qb:component [ qb:measure eg:lifeExpectancy];
# The attributes
[...]
as you can see, eg:lifeExpectancy
it is used here as an object which should not be resolved as this is a property!? or am I not mistaken?
later, when we actually express observations, eg:lifeExpectancy
is us as a property:
eg:o1 a qb:Observation;
qb:dataSet eg:dataset-le1 ;
eg:refArea ex-geo:newport_00pr ;
sdmx-dimension:sex sdmx-code:sex-M ;
sdmx-attribute:unitMeasure <http://dbpedia.org/resource/Year> ;
eg:lifeExpectancy 76.7 ;
.
How is it possible / allowed to be used eg:lifeExpectancy
as an object, as it is done in the qb:DataStructureDefinition
above?
source to share
The key is in the document you linked to:
6. Creating data structure definitions
A qb: DataStructureDefinition defines the structure of one or more datasets. In particular, it defines the sizes, attributes, and measures used in the dataset along with qualifying information such as ordering of sizes and the need for attributes or as desired.
The whole example that you showed us is as follows:
EXAMPLE 4
eg:dsd-le a qb:DataStructureDefinition; # The dimensions qb:component [ qb:dimension eg:refArea; qb:order 1 ]; qb:component [ qb:dimension eg:refPeriod; qb:order 2 ]; qb:component [ qb:dimension sdmx-dimension:sex; qb:order 3 ]; # The measure(s) qb:component [ qb:measure eg:lifeExpectancy]; # The attributes qb:component [ qb:attribute sdmx-attribute:unitMeasure; qb:componentRequired "true"^^xsd:boolean; qb:componentAttachment qb:DataSet; ] .
eg: dsd-le is a data structure definition and there are five components for it. Recall that the dataset structure was:
You can see that it takes three dimensions to index a single cell. You need a date range (for example, 2005 - 2007 ), an area (for example, Cardiff ), and a gender (for example, Male ). The values ββin these cells represent life expectancy values; that is, each value represents eb: lifeExpectancy . This tells us qb: component [qb: measure eg: lifeExpectancy] .
Other uses of properties in non-property positions
This section is a little more commentary on using properties as objects and objects in triplets. RDF makes little difference in the role that resources can play in triplets. The subjects of triplets can be IRIs and empty nodes; properties of triplets can only be IRI; and triplet objects are IRIs, empty nodes, or literals. In RDF triplets, you often need to use IRIs, which typically use properties like objects or things to describe them. For example,
# :hasParent used as property
:isaac :hasParent :abraham .
# :hasParent used as subject
:hasParent rdfs:label "has father"@en ;
rdfs:comment "used to indicate that the object is a parent of the subject"@en ;
rdf:type :FamilialRelationship .
# :hasParent used as object
:hasChild owl:inverseOf :hasParent .
Your specific example
Various uses of a property, generally RDF
It's worth seeing what actually happens in the example you mentioned. In the first:
eg:lifeExpectancy a rdf:Property, qb:MeasureProperty;
β¦ .
qb: MeasureProperty actually appears as a triplet object:
eg:lifeExpectancy rdf:type qb:MeasureProperty
which means qb: MeasureProperty is a class. As the name suggests, this is a property class. Ie, when you see x rdf: type qb: MeasureProperty , you can expect the x used in other triplets to be a property. eg: lifeExpectancy , then this is a property, although in this triple it is an item. Later we see a three
eg:o1 eg:lifeExpectancy 76.7 .
in which for example: lifeExpectancy is used as a property.
Various Uses of Property for RDF Data Cube
source to share