@base <http://purl.org/qb4olap/cubes> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <http://www.semanticweb.org/owl/owlapi/turtle#> .
@prefix qb: <../linked-data/cube#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix qb4o: <#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix scovo: <../NET/scovo#> .
@prefix dbpedia: <http://dbpedia.org/resource/> .
@prefix dcterms: <../dc/terms/> .
@prefix voaf: <../vocommons/voaf#> .
@prefix vann: <../vocab/vann/> .

<>
    dcterms:contributor [
        foaf:mbox "lorenae@fing.edu.uy"
    ], [
        foaf:mbox "avaisman@itba.edu.ar"
    ] ;
    dcterms:created "2012-12-06"^^xsd:date ;
    dcterms:creator [
        foaf:mbox "lorenae@fing.edu.uy"
    ], [
        foaf:mbox "avaisman@itba.edu.ar"
    ] ;
    dcterms:license <http://www.opendatacommons.org/licenses/pddl/1.0/> ;
    dcterms:modified "2015-07-11"^^xsd:date ;
    dcterms:title "QB4OLAP: a vocabulary for publishing OLAP data cubes" ;
    vann:preferredNamespacePrefix "qb4o" ;
    vann:preferredNamespaceUri "http://purl.org/qb4olap/cubes#" ;
    a voaf:Vocabulary, owl:Ontology ;
    rdfs:comment "This vocabulary, named QB4OLAP, is an extension to the DataCube vocabulary that allows to represent OLAP cubes in RDF, and to implement OLAP operators (such as Roll-up, Slice, and Dice) as SPARQL queries directly on this RDF representation." ;
    rdfs:label "The QB4OLAP cube vocabulary, an extension to QB" ;
    owl:imports <../linked-data/cube#> ;
    owl:versionInfo "1.3" .

qb4o:AggregateFunction
    a rdfs:Class, owl:Class ;
    rdfs:comment "Class that represents aggregate functions that are applied to compute measure aggregate values"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "Aggregate function"@en ;
    rdfs:subClassOf qb:ComponentProperty .

qb4o:Avg
    a qb4o:AggregateFunction ;
    rdfs:comment "Returns the arithmetic mean of a set of numeric values."@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "AVG"@en ;
    owl:sameAs dbpedia:Average .

qb4o:Cardinality
    a rdfs:Class, owl:Class ;
    rdfs:comment "Class that represents different cardinalities restrictions. These may be applied to  hierarchy steps or to the relationship between facts and dimension levels"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "Cardinality"@en .

qb4o:Count
    a qb4o:AggregateFunction ;
    rdfs:comment "Returns the number of elements in a set of elements (the cardinality of the set)."@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "COUNT"@en ;
    owl:sameAs dbpedia:Counting .

qb4o:Hierarchy
    a rdfs:Class, owl:Class ;
    rdfs:comment "The class of components which represent the hierarchies of a dimension"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "Hierarchy"@en .

qb4o:HierarchyStep
    a rdfs:Class, owl:Class ;
    rdfs:comment "Class that represents a pair of levels (childLevel, parentLevel) in a dimension hierarchy"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "hierarchy step"@en .

qb4o:LevelAttribute
    a rdfs:Class, owl:Class ;
    rdfs:comment "The class of properties that represent level attributes"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "Level attribute" ;
    rdfs:subClassOf rdf:Property .

qb4o:LevelMember
    a rdfs:Class, owl:Class ;
    rdfs:comment "The class of components which represent the members of a level"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "Level member"@en ;
    rdfs:subClassOf skos:Concept .

qb4o:LevelProperty
    a rdfs:Class, owl:Class ;
    rdfs:comment "The class of components which represent the levels of a hierarchy"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "Level property"@en ;
    rdfs:subClassOf qb:ComponentProperty .

qb4o:ManyToMany
    a qb4o:Cardinality ;
    rdfs:comment "Represents N-M cardinality constraint"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "N-M cardinality"@en .

qb4o:ManyToOne
    a qb4o:Cardinality ;
    rdfs:comment "Represents N-1 cardinality constraint"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "N-1 cardinality"@en .

qb4o:Max
    a qb4o:AggregateFunction ;
    rdfs:comment "Returns the maximum element in a set of elements, where a partial order is defined."@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "MAX"@en ;
    owl:sameAs dbpedia:Max .

qb4o:Min
    a qb4o:AggregateFunction ;
    rdfs:comment "Returns the minimum element in a set of elements, where a partial order is defined."@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "MIN"@en ;
    owl:sameAs dbpedia:Min .

qb4o:OneToMany
    a qb4o:Cardinality ;
    rdfs:comment "Represents 1-N cardinality constraint"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "1-N cardinality"@en .

qb4o:OneToOne
    a qb4o:Cardinality ;
    rdfs:comment "Represents 1-1 cardinality constraint"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "1_1 cardinality"@en .

qb4o:RollupProperty
    a rdfs:Class, owl:Class ;
    rdfs:comment "The class of properties which represent the rollup relationships."@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "Rollup property"@en ;
    rdfs:subClassOf owl:TransitiveProperty .

qb4o:Sum
    a qb4o:AggregateFunction ;
    rdfs:comment "Returns the numeric value obtained by adding a set of numeric values."@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "SUM"@en ;
    owl:sameAs dbpedia:Summation .

qb4o:aggregateFunction
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "An alternative to qb:componentProperty which makes explicit that the component is an aggregate function"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "aggregate function"@en ;
    rdfs:range qb4o:AggregateFunction ;
    rdfs:subPropertyOf qb:componentProperty .

qb4o:cardinality
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "An alternative to qb:componentProperty which allows to specify a cardinality constraint in fact-level relationship"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "cardinality"@en, "cardinality constraint"@en ;
    rdfs:range qb4o:Cardinality ;
    rdfs:subPropertyOf qb:componentProperty .

qb4o:childLevel
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Child level property in a HierarchyStep"@en ;
    rdfs:domain qb4o:HierarchyStep ;
    rdfs:isDefinedBy <> ;
    rdfs:label "child level"@en ;
    rdfs:range qb4o:LevelProperty .

qb4o:hasAttribute
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Indicates the attributes in an level"@en ;
    rdfs:domain qb4o:LevelProperty ;
    rdfs:isDefinedBy <> ;
    rdfs:label "Level has attribute"@en ;
    rdfs:range qb4o:LevelAttribute .

qb4o:hasHierarchy
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Indicates the hierarchies that compose the dimension"@en ;
    rdfs:domain qb:DimensionProperty ;
    rdfs:isDefinedBy <> ;
    rdfs:label "set of hierarchies in a dimensoin"@en ;
    rdfs:range qb4o:Hierarchy .

qb4o:hasID
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Indicates the attribute that identifies level members. Necessary to automatize ROLAP to QB4OLAP"@en ;
    rdfs:domain qb4o:LevelProperty ;
    rdfs:isDefinedBy <> ;
    rdfs:label "Level has ID attribute"@en ;
    rdfs:range qb:AttributeProperty .

qb4o:hasLevel
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Indicates the levels that compose the hierarchy"@en ;
    rdfs:domain qb4o:Hierarchy ;
    rdfs:isDefinedBy <> ;
    rdfs:label "set of levels in hierarchy"@en ;
    rdfs:range qb4o:LevelProperty .

qb4o:inDimension
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Indicates to which dimension the hierarchy belongs"@en ;
    rdfs:domain qb4o:Hierarchy ;
    rdfs:isDefinedBy <> ;
    rdfs:label "hierarchy belongs to dimension"@en ;
    rdfs:range qb:DimensionProperty .

qb4o:inHierarchy
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Indicates to which hierarchy a hierarchy step (pair of levels) belongs"@en ;
    rdfs:domain qb4o:HierarchyStep ;
    rdfs:isDefinedBy <> ;
    rdfs:label "hierarchy step belongs to hierarchy"@en ;
    rdfs:range qb4o:Hierarchy .

qb4o:inLevel
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Indicates to which level the level attribute belongs"@en ;
    rdfs:domain qb4o:LevelAttribute ;
    rdfs:isDefinedBy <> ;
    rdfs:label "level attribute in level"@en ;
    rdfs:range qb4o:LevelProperty .

qb4o:isCuboidOf
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Indicates to which cube a cuboid corresponds"@en ;
    rdfs:domain qb:DataStructureDefinition ;
    rdfs:isDefinedBy <> ;
    rdfs:label "is cuboid of"@en ;
    rdfs:range qb:DataStructureDefinition .

qb4o:level
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "An alternative to qb:componentProperty which makes explicit that the component is a level"@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "level"@en ;
    rdfs:range qb4o:LevelProperty ;
    rdfs:subPropertyOf qb:componentProperty .

qb4o:memberOf
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Indicates the level to which the level member belongs"@en ;
    rdfs:domain qb4o:LevelMember ;
    rdfs:isDefinedBy <> ;
    rdfs:label "level member is member of level"@en ;
    rdfs:range qb4o:LevelProperty .

qb4o:parentLevel
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "Parent level property in a HierarchyStep"@en ;
    rdfs:domain qb4o:HierarchyStep ;
    rdfs:isDefinedBy <> ;
    rdfs:label "parent level"@en ;
    rdfs:range qb4o:LevelProperty .

qb4o:pcCardinality
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "A property which allows to specify a cardinality constraint in a parent-child relationship"@en ;
    rdfs:domain qb4o:HierarchyStep ;
    rdfs:isDefinedBy <> ;
    rdfs:label "cardinality"@en, "cardinality constraint"@en ;
    rdfs:range qb4o:Cardinality .

qb4o:rollup
    a rdf:Property, owl:ObjectProperty ;
    rdfs:comment "A property which allows to specify the predicate that implements the rollup relationship in a hierarchy step."@en ;
    rdfs:domain qb4o:RollupProperty ;
    rdfs:isDefinedBy <> ;
    rdfs:label "rollup function"@en ;
    rdfs:range qb4o:HierarchyStep .

