# QB4 MobOLAP: A Vocabulary Extension for Mobility OLAP on the Semantic Web
## 4 Results and Discussion
### Defining MD Data Instance in QB4 MobOLAP  
The previous sub-chapter has shown that the data cube schema can be represented using QB4 MobOLAP in the RDF format. This sub-chapter will explain the representation of the Delivery cube instance using QB4 MobOLAP. The notation Graph Instance (\(GI\)) represents the RDF Graph of the data cube instance. The notation fbf: is used for the prefix of \(GI\), and the subgraph that refers to the specific instance with the index \(i\) is denoted by \(GI\) (\(i\)). Level Members. A level \(l\) has a set of level members \(LM\) (\(l\)) =[\(lm_{1}\),..., \(lm_{y}\)]. Each level member \(lm_{i}\) has a unique IRI \(idl\) (\(lm_{i}\)) \(\in\)\(l\), linked in the cube instance graph \(GI\) with the qb4o:LevelMember predicate. A level member is related to its level by the qb4o:memberOf property. The RDF graph formulation of the level members \(LM\) (\(l\)) is represented as  
\[GI\;LM(l)=\{\text{(id ($l_{\text{mi}}$) rdf:type qb4o:LevelMember)}\}\cup\{\text{(id (lmi) qb4o:memberOf id (l))}\}\]  
Definition of Level Members' attributes. A level member has an attribute set \(l_{\text{m}}=\{a_{1},\)\(a_{2},\)\(\ldots,a_{\text{p}}\}\), which is used to describe the characteristics of the level member. Each attribute \(a_{\text{i}}\) is linked to the level member with the identifier id (\(a_{\text{i}}\)). Example 5  
#Measures  
ffb:Distance rdf:type qb:MeasureProperty;  
rdfs:range ssd:decimal. ffb:Duration rdf:type qb:MeasureProperty;  
rdfs:range ssd:Time. ffb:Route rdf:type qb:MeasureProperty;  
rdfs:domain qb4 mbo:MobilityPoint;  
rdfs:range geo:wkItLiteral;  
rdfs:subClassOf qb4 mbo: MobilityObject. ffb:Trajectory rdf:type qb:MeasureProperty;  
rdfs:domain geo:Linesring;  
rdfs:range geo:wkItLiteral;  
rdfs:subClassOf geo:SpatialObject. ffb:Load rdf:type qb:MeasureProperty;  
rdfs:domain qb4 mbo:MobilityInteger;  
rdfs:range geo:wkItLiteral;  
rdfs:subClassOf qb4 mbo:MobilityObject. #Cube Definition  
ffb:freshFruitBunchDelivery rdf:type qb:DataStructureDefinition;  
#Lowest level for each dimension  
qb:component [qb4c:level ffb:plantation;  
cardinality qb4c:ManyToOne];  
qb:component [qb4c:level ffb:truck;  
cardinality qb4c:ManyToOne];  
qbcomponent [qb4c:level ffb:date;  
cardinality qb4c:ManyToOne];  
#Cube measures  
qb:component [qb:measure ffb:Duration; qb4c:aggregateFunction  
qb4c:Avg];  
qb:component [qb:measure ffb:Distance; qb4c:aggregateFunction  
qb4c:Avg];  
qb:component [qb:measure ffb:Trajectory; qb4c:aggregateFunction  
qb4c:Control];  
qb:component [qb:measure ffb:Route; qb4c:aggregateFunction  
qb4 mbo:TCentroid];  
qb:component [qb:measure ffb:Load; qb4c:aggregateFunction  
qb4 mbo:TSum];  
Example: The triples below show how some level members of the FFB DW are represented in RDF. Example 6  
#Instance  
ffb:plantation_1 rdf:type qb4c:LevelMember;  
qb4c:memberOf ffb:plantation;  
ffb:plantationName \"PT. LestariPlantation\";  
ffb:plantationGeo \"POLYGON((-7.7737022 110.4307821, -7.7753163  
110.4306087,... ))\"geo:wkItLiteral  
ffb:PMOGeo \"POINT(-7.7753163 110.435160)\"...geo:wkItLiteral;  
ffb:gateGeo \"POINT(-7.7753163 110.4352012)\"...geo:wkItLiteral. ffb:idefeling_2 rdf:type qb4c:LevelMember;  
qb4c:memberOf ffb:afdeling;  
ffb:afdelingName \"Adeling AIfa\";  
ffb:afdelingGeo \"POLYGON((-7.7737022 110.4307821, -7.7753163  
110.4306087,... ))\"geo:wkItLiteral;  
skos:broader ffb:plantation_1. Fact Members. A fact \(F\) has a set of data members \(FM\) (\(F\)) = \(\{f_{1},f_{2},\ldots,f_{\rm i}\}\), which are the instances of the data cube. Each fact \(f_{\rm i}\in FM\) has a unique IRI id (\(f_{\rm i}\)) \(\in I\), which is linked in the cube instance graph \(GI\) with the qb:Observation predicate. A fact member f is related to a set of dimension level \(L(f_{i})\) = { 1, 1, 2,..., \(l_{r}\) ]and has a set of measure \(M(m_{i})\) = { \(m_{1}\), \(m_{2}\),..., \(m_{r}\)}. Each dimension level \(l_{j}\) is linked to level member with the identifier id-S (\(l_{j}\)) and each measure \(m_{k}\) is linked to the level member with the identifier id-S(\(m_{k}\)).