PREFIX qb4o: <http://purl.org/qb4olap/cubes#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

<http://purl.org/linked-data/cube#DimensionProperty> a rdfs:Class .

qb4o:hasHierarchy a rdf:Property ;
  rdfs:label "set of hierarchies in a dimensoin"@en ;
  rdfs:comment "Indicates the hierarchies that compose the dimension"@en ;
  rdfs:domain <http://purl.org/linked-data/cube#DimensionProperty> ;
  rdfs:range qb4o:Hierarchy .

qb4o:RollupProperty a rdfs:Class ;
  rdfs:label "Rollup property"@en ;
  rdfs:comment "The class of properties which represent the rollup relationships."@en ;
  rdfs:subClassOf <http://www.w3.org/2002/07/owl#TransitiveProperty> .

qb4o:rollup a rdf:Property ;
  rdfs:label "rollup function"@en ;
  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:range qb4o:HierarchyStep .

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

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

<http://purl.org/linked-data/cube#ComponentProperty> a rdfs:Class .

qb4o:LevelMember a rdfs:Class ;
  rdfs:label "Level member"@en ;
  rdfs:comment "The class of components which represent the members of a level"@en ;
  rdfs:subClassOf <http://www.w3.org/2004/02/skos/core#Concept> .

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

<http://www.w3.org/2004/02/skos/core#Concept> a rdfs:Class .

<http://www.w3.org/2002/07/owl#TransitiveProperty> a rdfs:Class .

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

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

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

qb4o:childLevel a rdf:Property ;
  rdfs:label "child level"@en ;
  rdfs:comment "Child level property in a HierarchyStep"@en ;
  rdfs:domain qb4o:HierarchyStep ;
  rdfs:range qb4o:LevelProperty .

qb4o:parentLevel a rdf:Property ;
  rdfs:label "parent level"@en ;
  rdfs:comment "Parent level property in a HierarchyStep"@en ;
  rdfs:domain qb4o:HierarchyStep ;
  rdfs:range qb4o:LevelProperty .

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

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

qb4o:inDimension a rdf:Property ;
  rdfs:label "hierarchy belongs to dimension"@en ;
  rdfs:comment "Indicates to which dimension the hierarchy belongs"@en ;
  rdfs:domain qb4o:Hierarchy ;
  rdfs:range <http://purl.org/linked-data/cube#DimensionProperty> .

qb4o:LevelProperty a rdfs:Class ;
  rdfs:label "Level property"@en ;
  rdfs:comment "The class of components which represent the levels of a hierarchy"@en ;
  rdfs:subClassOf <http://purl.org/linked-data/cube#ComponentProperty> .

qb4o:hasID a rdf:Property ;
  rdfs:label "Level has ID attribute"@en ;
  rdfs:comment "Indicates the attribute that identifies level members. Necessary to automatize ROLAP to QB4OLAP"@en ;
  rdfs:domain qb4o:LevelProperty ;
  rdfs:range <http://purl.org/linked-data/cube#AttributeProperty> .

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

<https://w3id.org/linkml/Any> a rdfs:Class ;
  rdfs:comment "An unconstrained type or object"@en .

<http://purl.org/linked-data/cube#DataStructureDefinition> a rdfs:Class .

qb4o:isCuboidOf a rdf:Property ;
  rdfs:label "is cuboid of"@en ;
  rdfs:comment "Indicates to which cube a cuboid corresponds"@en ;
  rdfs:domain <http://purl.org/linked-data/cube#DataStructureDefinition> ;
  rdfs:range <http://purl.org/linked-data/cube#DataStructureDefinition> .

rdf:Property a rdfs:Class .

<http://purl.org/linked-data/cube#AttributeProperty> a rdfs:Class .

<http://purl.org/linked-data/cube#componentProperty> a rdf:Property ;
  rdfs:range <https://w3id.org/linkml/Any> .

qb4o:aggregateFunction a rdf:Property ;
  rdfs:label "aggregate function"@en ;
  rdfs:comment "An alternative to qb:componentProperty which makes explicit that the component is an aggregate function"@en ;
  rdfs:range qb4o:AggregateFunction ;
  rdfs:subPropertyOf <http://purl.org/linked-data/cube#componentProperty> .

qb4o:cardinality a rdf:Property ;
  rdfs:label "cardinality constraint"@en ;
  rdfs:comment "An alternative to qb:componentProperty which allows to specify a cardinality constraint in fact-level relationship"@en ;
  rdfs:range qb4o:Cardinality ;
  rdfs:subPropertyOf <http://purl.org/linked-data/cube#componentProperty> .

qb4o:level a rdf:Property ;
  rdfs:label "level"@en ;
  rdfs:comment "An alternative to qb:componentProperty which makes explicit that the component is a level"@en ;
  rdfs:range qb4o:LevelProperty ;
  rdfs:subPropertyOf <http://purl.org/linked-data/cube#componentProperty> .

qb4o:AggregateFunction a rdfs:Class ;
  rdfs:label "Aggregate function"@en ;
  rdfs:comment "Class that represents aggregate functions that are applied to compute measure aggregate values"@en ;
  rdfs:subClassOf <http://purl.org/linked-data/cube#ComponentProperty> .

qb4o:Count a qb4o:AggregateFunction ;
  rdfs:label "COUNT"@en ;
  rdfs:comment "Returns the number of elements in a set of elements (the cardinality of the set)."@en .

qb4o:Avg a qb4o:AggregateFunction ;
  rdfs:label "AVG"@en ;
  rdfs:comment "Returns the arithmetic mean of a set of numeric values."@en .

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

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

qb4o:Sum a qb4o:AggregateFunction ;
  rdfs:label "SUM"@en ;
  rdfs:comment "Returns the numeric value obtained by adding a set of numeric values."@en .

qb4o:Cardinality a rdfs:Class ;
  rdfs:label "Cardinality"@en ;
  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 .

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

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

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

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