@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix rb: <https://w3id.org/riverbench/schema/metadata#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix j.0: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

dct:hasPart
    rdfs:subPropertyOf dct:relation .

dct:isPartOf
    a owl:ObjectProperty ;
    rdfs:subPropertyOf dct:relation .

dcat:DatasetSeries
    a owl:Class ;
    rdfs:label "Dataset series"@en ;
    rdfs:subClassOf dcat:Dataset .

dcat:inCatalog
    a owl:ObjectProperty ;
    rdfs:domain dcat:Resource ;
    rdfs:range dcat:Catalog ;
    rdfs:subPropertyOf dct:isPartOf .

dcat:resource
    a owl:ObjectProperty ;
    rdfs:subPropertyOf dct:hasPart .

dcat:seriesMember
    a owl:ObjectProperty ;
    rdfs:comment "Indicates which datasets are included in the profile"@en ;
    rdfs:label "Includes dataset"@en ;
    rdfs:subPropertyOf dct:relation .

<https://w3id.org/riverbench/schema/metadata>
    dc:description "Ontology for describing datasets and profiles in the RiverBench benchmark suite."@en ;
    dc:title "RiverBench metadata ontology"@en ;
    dct:created "2023-04-30T00:00:00"^^xsd:dateTime ;
    dct:creator [
        foaf:homepage <https://github.com/Ostrzyciel>, <https://orcid.org/0000-0002-2543-9461> ;
        foaf:name "Piotr Sowiński" ;
        foaf:nick "Ostrzyciel"
    ] ;
    dct:issued "2023-05-05T00:00:00"^^xsd:dateTime ;
    dct:license <https://spdx.org/licenses/CC-BY-4.0> ;
    vann:preferredNamespacePrefix "rb" ;
    vann:preferredNamespaceUri "https://w3id.org/riverbench/schema/metadata#" ;
    j.0:citation "Please cite this work according to the instructions here: https://w3id.org/riverbench/documentation/licensing/"@en ;
    a owl:Ontology ;
    owl:imports <http://www.w3.org/ns/dcat>, <https://w3id.org/stax/1.0.1/ontology> ;
    owl:versionIRI <https://w3id.org/riverbench/schema/metadata/dev> .

rb:BlankNodeCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of blank nodes in the dataset."@en ;
    rdfs:label "Blank node count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:Category
    a owl:Class ;
    rdfs:comment "Class for benchmark categories in RiverBench. A category groups tasks and profiles that are compatible with each other. Each task and profile in a category has a name prefixed with the name of the category (e.g., all tasks in the \"stream\" category start with \"stream-\")."@en ;
    rdfs:label "Benchmark category"@en ;
    rdfs:subClassOf dcat:Resource ;
    owl:disjointWith rb:CategoryMember .

rb:CategoryMember
    a owl:Class ;
    rdfs:comment "Superclass for both profiles and tasks"@en ;
    rdfs:label "Member of a benchmark category"@en ;
    rdfs:subClassOf dcat:Resource .

rb:CustomShaclTarget
    a owl:Class ;
    rdfs:comment "A class for all custom SHACL-like node targets in RiverBench. See also rb:targetCustom."@en ;
    rdfs:label "Custom SHACL target"@en .

rb:Dataset
    a owl:Class ;
    rdfs:comment "A dataset in the RiverBench benchmark suite"@en ;
    rdfs:label "RiverBench dataset"@en ;
    rdfs:subClassOf dcat:Dataset, [
        a owl:Restriction ;
        owl:onProperty <https://w3id.org/stax/ontology#hasStreamTypeUsage> ;
        owl:someValuesFrom <https://w3id.org/stax/ontology#ConcreteRdfStreamType>
    ] .

rb:DatatypeLiteralCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of datatype literals (NOT of type rdf:langString) in the dataset."@en ;
    rdfs:label "Datatype literal count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:Distribution
    a owl:Class ;
    rdfs:comment "A distribution of a dataset in the RiverBench benchmark suite."@en ;
    rdfs:label "RiverBench dataset distribution"@en ;
    rdfs:subClassOf dcat:Distribution, [
        a owl:Restriction ;
        owl:onProperty <https://w3id.org/stax/ontology#hasStreamTypeUsage> ;
        owl:someValuesFrom <https://w3id.org/stax/ontology#ConcreteRdfStreamType>
    ] .

rb:DistributionType
    a owl:Class ;
    rdfs:comment "Type of dataset distribution, indicating the corresponding streaming task formulation."@en ;
    rdfs:label "RiverBench distribution type"@en .

rb:GraphCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of RDF graphs in the dataset, including the default graph."@en ;
    rdfs:label "Graph count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:IriCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of IRIs in the dataset."@en ;
    rdfs:label "IRI count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:LanguageLiteralCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of language literals in the dataset."@en ;
    rdfs:label "Language string count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:LiteralCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of literals in the dataset."@en ;
    rdfs:label "Literal count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:ObjectCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of objects in the dataset."@en ;
    rdfs:label "Object count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:PredicateCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of predicates in the dataset."@en ;
    rdfs:label "Predicate count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:Profile
    a owl:Class ;
    rdfs:comment "Benchmark profile grouping several datasets in RiverBench. Each profile belongs to one benchmark category (rb:Category)."@en ;
    rdfs:label "Benchmark profile"@en ;
    rdfs:subClassOf dcat:DatasetSeries, rb:CategoryMember ;
    owl:disjointWith rb:Task .

rb:QuotedTripleCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of quoted triples in the dataset."@en ;
    rdfs:label "Quoted triple count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:RiverBench
    a owl:Class ;
    rdfs:comment "RiverBench – RDF streaming benchmark suite"@en ;
    rdfs:label "RiverBench suite"@en ;
    rdfs:subClassOf dcat:Catalog .

rb:SimpleLiteralCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of simple literals (of type xsd:string) in the dataset."@en ;
    rdfs:label "Simple literal count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:StatementCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of RDF statements in the dataset."@en ;
    rdfs:label "Statement count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:StatementCountStreamElementSplit
    a owl:Class ;
    rdfs:comment "The number of statements in an element was the criterion for splitting the stream elements."@en ;
    rdfs:label "Stream elements split by statement count"@en ;
    rdfs:subClassOf rb:StreamElementSplit .

rb:Statistics
    a owl:Class ;
    rdfs:comment "Class for statistics objects about distributions"@en ;
    rdfs:label "Statistics"@en .

rb:StatisticsSet
    a owl:Class ;
    rdfs:comment "Class for groupings (sets) of statistics about distributions"@en ;
    rdfs:label "Statistics set"@en .

rb:StreamElementSplit
    a owl:Class ;
    rdfs:comment "Describes how was the stream split into individual elements."@en ;
    rdfs:label "Stream element split"@en .

rb:SubjectCountStatistics
    a owl:Class ;
    rdfs:comment "Statistics about the number of subjects in the dataset."@en ;
    rdfs:label "Subject count statistics"@en ;
    rdfs:subClassOf rb:Statistics .

rb:Task
    a owl:Class ;
    rdfs:comment "Class for specific benchmark tasks (e.g., end-to-end streaming latency). Each task belongs to one benchmark category (rb:Category)."@en ;
    rdfs:label "Benchmark task"@en ;
    rdfs:subClassOf rb:CategoryMember .

rb:TimeStreamElementSplit
    a owl:Class ;
    rdfs:comment "The elements correspond to different instants or intervals of time."@en ;
    rdfs:label "Stream elements split by time"@en ;
    rdfs:subClassOf rb:StreamElementSplit .

rb:TopicStreamElementSplit
    a owl:Class ;
    rdfs:comment "The elements correspond to different topics/subjects in the dataset."@en ;
    rdfs:label "Stream elements split by topic"@en ;
    rdfs:subClassOf rb:StreamElementSplit .

rb:conformanceProperty
    a owl:DatatypeProperty ;
    rdfs:comment "Base property for all conformance data properties"@en ;
    rdfs:label "Conformance property"@en ;
    rdfs:range xsd:boolean ;
    rdfs:subPropertyOf owl:topDataProperty .

rb:conformsToRdf11
    a owl:DatatypeProperty ;
    rdfs:comment "Whether the dataset is RDF 1.1-compliant, i.e., does not use any non-standard features, like generalized triples."@en ;
    rdfs:label "Conforms to W3C RDF 1.1 specification"@en ;
    rdfs:range xsd:boolean ;
    rdfs:seeAlso <https://www.w3.org/TR/rdf11-concepts/> ;
    rdfs:subPropertyOf rb:conformanceProperty .

rb:conformsToRdfStarDraft_20211217
    a owl:DatatypeProperty ;
    rdfs:comment "Whether the dataset is RDF-star compliant, i.e., does not use any non-standard features. Note that all standard RDF 1.1 datasets also qualify, as RDF-star is a superset of RDF 1.1."@en ;
    rdfs:label "Conforms to W3C RDF-star draft specification as of December 17, 2021"@en ;
    rdfs:range xsd:boolean ;
    rdfs:seeAlso <https://www.w3.org/2021/12/rdf-star.html> ;
    rdfs:subPropertyOf rb:conformanceProperty .

rb:flatDistribution
    a owl:NamedIndividual, rb:DistributionType ;
    rdfs:comment "The dataset is distributed as a single flat file."@en ;
    rdfs:label "Flat distribution"@en .

rb:fullDistribution
    a owl:NamedIndividual, rb:DistributionType ;
    rdfs:comment "A full distribution, including all data in the dataset."@en ;
    rdfs:label "Full distribution"@en .

rb:hasCategory
    a owl:ObjectProperty ;
    rdfs:comment "Indicates that a benchmark category belongs to this benchmark suite."@en ;
    rdfs:domain rb:RiverBench ;
    rdfs:label "Has benchmark category"@en ;
    rdfs:range rb:Category ;
    rdfs:subPropertyOf dcat:resource .

rb:hasCategoryMember
    a owl:ObjectProperty ;
    rdfs:comment "For benchmark categories, indicates their members (profiles or tasks)."@en ;
    rdfs:domain rb:Category ;
    rdfs:label "Has category member"@en ;
    rdfs:range rb:CategoryMember ;
    rdfs:subPropertyOf dct:hasPart ;
    owl:inverseOf rb:inCategory .

rb:hasDatasetShape
    a owl:ObjectProperty ;
    rdfs:comment "Specifies the SHACL shape of distributions that are allowed in a given benchmark profile."@en ;
    rdfs:domain rb:Profile ;
    rdfs:label "Has dataset shape"@en ;
    rdfs:range sh:NodeShape ;
    rdfs:subPropertyOf rb:hasShape .

rb:hasDistributionShape
    a owl:ObjectProperty ;
    rdfs:comment "Specifies the SHACL shape of distributions that are allowed in a given benchmark profile."@en ;
    rdfs:domain rb:Profile ;
    rdfs:label "Has distribution shape"@en ;
    rdfs:range sh:NodeShape ;
    rdfs:subPropertyOf rb:hasShape .

rb:hasDistributionType
    a owl:ObjectProperty ;
    rdfs:comment "Indicates the type of RiverBench dataset distribution"@en ;
    rdfs:domain rb:Distribution ;
    rdfs:label "Has distribution type"@en ;
    rdfs:range rb:DistributionType .

rb:hasFileName
    a owl:DatatypeProperty ;
    rdfs:comment "Canonical file name of this distribution"@en ;
    rdfs:domain rb:Distribution ;
    rdfs:label "Has file name"@en ;
    rdfs:range xsd:string .

rb:hasProfile
    a owl:ObjectProperty ;
    rdfs:comment "For benchmark categories this property indicates profiles that belong to the category."@en ;
    rdfs:domain rb:Category ;
    rdfs:label "Has benchmark profile"@en ;
    rdfs:range rb:Profile ;
    rdfs:subPropertyOf rb:hasCategoryMember .

rb:hasShape
    a owl:ObjectProperty ;
    rdfs:comment "Property for specifying the desired SHACL shape of something (e.g., a dataset or a distribution)."@en ;
    rdfs:label "Has shape"@en ;
    rdfs:range sh:NodeShape .

rb:hasStatistics
    a owl:ObjectProperty ;
    rdfs:comment "Has a dataset statistics object"@en ;
    rdfs:domain rb:StatisticsSet ;
    rdfs:label "Has statistics"@en ;
    rdfs:range rb:Statistics .

rb:hasStatisticsSet
    a owl:ObjectProperty ;
    rdfs:comment "Indicates the grouping (set) of statistics for a given distribution. Multiple distributions can share one set of statistics, but a distribution must have exactly one statistics set."@en ;
    rdfs:domain rb:Distribution ;
    rdfs:label "Has statistics set"@en ;
    rdfs:range rb:StatisticsSet .

rb:hasStreamElementCount
    a owl:DatatypeProperty ;
    rdfs:comment "Number of elements in the stream"@en ;
    rdfs:label "Has stream element count"@en ;
    rdfs:subPropertyOf owl:topDataProperty .

rb:hasStreamElementSplit
    a owl:ObjectProperty ;
    rdfs:comment "Indicates how the stream was split into elements."@en ;
    rdfs:domain rb:Dataset ;
    rdfs:label "Has stream element split"@en ;
    rdfs:range rb:StreamElementSplit ;
    rdfs:subPropertyOf owl:topObjectProperty .

rb:hasSubjectShape
    a owl:ObjectProperty ;
    rdfs:comment """Indicates the subject node in an RDF subject graph stream, using SHACL. The value of this property should be a SHACL sh:NodeShape with a specified target (e.g., sh:targetSubjectsOf). Only the target will be considered, restrictions on the shape will be ignored.

This property is required for RDF subject graph streams. Only sh:targetClass, sh:targetSubjectsOf, and sh:targetObjectsOf are allowed as the target specification.

This property can be specified multiple times. The different target specifications will then be treated as alternatives."""@en ;
    rdfs:domain rb:TopicStreamElementSplit ;
    rdfs:label "Has subject shape"@en ;
    rdfs:range sh:NodeShape ;
    rdfs:subPropertyOf rb:hasShape .

rb:hasTask
    a owl:ObjectProperty ;
    rdfs:comment "For benchmark categories this property indicates tasks that belong to the category."@en ;
    rdfs:domain rb:Category ;
    rdfs:label "Has benchmark task"@en ;
    rdfs:range rb:Task ;
    rdfs:subPropertyOf rb:hasCategoryMember .

rb:hasTemporalProperty
    a owl:ObjectProperty ;
    rdfs:comment "The IRI of the property that is used in the stream to denote time at which the event occured."@en ;
    rdfs:domain rb:TimeStreamElementSplit ;
    rdfs:label "Has temporal property"@en .

rb:hasVersion
    a owl:DatatypeProperty ;
    rdfs:comment "Version tag of an artifact"@en ;
    rdfs:label "Has version"@en ;
    rdfs:range xsd:string .

rb:inCategory
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "Indicates that the subject (either a task or a profile) is in benchmark category. This property is functional (each task/profile must be in exactly one benchmark category)."@en ;
    rdfs:domain rb:CategoryMember ;
    rdfs:label "In benchmark category"@en ;
    rdfs:range rb:Category ;
    rdfs:subPropertyOf dct:isPartOf .

rb:isSubsetOfProfile
    a owl:ObjectProperty, owl:TransitiveProperty ;
    rdfs:comment "Indicates that this profile's datasets are all in the other profile"@en ;
    rdfs:domain rb:Profile ;
    rdfs:label "Is subset of profile"@en ;
    rdfs:range rb:Profile ;
    rdfs:subPropertyOf dct:relation ;
    owl:inverseOf rb:isSupersetOfProfile .

rb:isSupersetOfProfile
    a owl:ObjectProperty, owl:TransitiveProperty ;
    rdfs:comment "Indicates that this profile contains all datasets of the other profile"@en ;
    rdfs:domain rb:Profile ;
    rdfs:label "Is superset of profile"@en ;
    rdfs:range rb:Profile ;
    rdfs:subPropertyOf dct:relation .

rb:jellyDistribution
    a owl:NamedIndividual, rb:DistributionType ;
    rdfs:comment "A streaming distribution in the Jelly binary format."@en ;
    rdfs:label "Jelly distribution"@en .

rb:maximum
    a owl:DatatypeProperty ;
    rdfs:comment "Maximum value of a distribution"@en ;
    rdfs:label "Maximum"@en ;
    rdfs:range xsd:decimal ;
    rdfs:subPropertyOf rb:statisticalProperty .

rb:mean
    a owl:DatatypeProperty ;
    rdfs:comment "Arithmetic mean of a distribution"@en ;
    rdfs:label "Mean"@en ;
    rdfs:range xsd:decimal ;
    rdfs:subPropertyOf rb:statisticalProperty .

rb:minimum
    a owl:DatatypeProperty ;
    rdfs:comment "Minimum value of a distribution"@en ;
    rdfs:label "Minimum"@en ;
    rdfs:range xsd:decimal ;
    rdfs:subPropertyOf rb:statisticalProperty .

rb:partialDistribution
    a owl:NamedIndividual, rb:DistributionType ;
    rdfs:comment "A partial distribution, including only a subset of the data in the dataset. The rb:hasStreamElementCount property indicates the length of this distribution."@en ;
    rdfs:label "Partial distribution"@en .

rb:standardDeviation
    a owl:DatatypeProperty ;
    rdfs:comment "Standard deviation of a distribution"@en ;
    rdfs:label "Standard deviation"@en ;
    rdfs:range xsd:decimal ;
    rdfs:subPropertyOf rb:statisticalProperty .

rb:statisticalProperty
    a owl:DatatypeProperty ;
    rdfs:comment "The base statistical property." ;
    rdfs:domain rb:Statistics ;
    rdfs:label "Statistical property"@en .

rb:streamDistribution
    a owl:NamedIndividual, rb:DistributionType ;
    rdfs:comment "The dataset is distributed as a stream of RDF datasets or RDF graphs (grouped RDF stream in RDF-STaX)."@en ;
    rdfs:label "Stream distribution"@en .

rb:sum
    a owl:DatatypeProperty ;
    rdfs:comment "Sum of all values in the distribution. In statistics about counts, this corresponds to the total number of given elements in the dataset."@en ;
    rdfs:label "Sum"@en ;
    rdfs:range xsd:decimal ;
    rdfs:subPropertyOf rb:statisticalProperty .

rb:targetCustom
    a owl:ObjectProperty ;
    rdfs:comment "Custom SHACL-like node target used in RiverBench for datasets where SHACL does not provide adequate means for targeting them (e.g., for RDF-star)."@en ;
    rdfs:domain sh:NodeShape ;
    rdfs:label "Target custom"@en ;
    rdfs:range rb:CustomShaclTarget .

rb:uniqueCount
    a owl:DatatypeProperty ;
    rdfs:comment "Only used for count statistics. Indicates how many unique elements are in the entire dataset. The value is estimated with a Bloom filter and is accurate to ~1%."@en ;
    rdfs:label "Unique count (estimated)"@en ;
    rdfs:range xsd:integer ;
    rdfs:subPropertyOf rb:statisticalProperty .

rb:usesGeneralizedRdfDatasets
    a owl:DatatypeProperty ;
    rdfs:comment "Whether the dataset uses the non-standard generalized datasets feature. A \"dataset\" here is used in the same meaning as in the RDF 1.1 specification."@en ;
    rdfs:label "Uses generalized RDF datasets"@en ;
    rdfs:range xsd:boolean ;
    rdfs:seeAlso <https://www.w3.org/TR/rdf11-concepts/#section-generalized-rdf> ;
    rdfs:subPropertyOf rb:conformanceProperty .

rb:usesGeneralizedTriples
    a owl:DatatypeProperty ;
    rdfs:comment "Whether the dataset uses the non-standard generalized triples feature"@en ;
    rdfs:label "Uses generalized triples"@en ;
    rdfs:range xsd:boolean ;
    rdfs:seeAlso "https://www.w3.org/TR/rdf11-concepts/#section-generalized-rdf"@en ;
    rdfs:subPropertyOf rb:conformanceProperty .

rb:usesRdfStar
    a owl:DatatypeProperty ;
    rdfs:comment "Whether the dataset uses RDF-star features."@en ;
    rdfs:label "Uses RDF-star"@en ;
    rdfs:range xsd:boolean ;
    rdfs:seeAlso "https://www.w3.org/2021/12/rdf-star.html"@en ;
    rdfs:subPropertyOf rb:conformanceProperty .

rb:yagoTarget
    a owl:NamedIndividual, rb:CustomShaclTarget ;
    rdfs:comment "Custom SHACL-like target for the yago-annotated-facts dataset in RiverBench. Targets the subject of any quoted triple in the graph. There is always exactly one such unique subject."@en ;
    rdfs:label "YAGO annotated facts target"@en .

