@prefix pr2g: <https://w3id.org/pr2graph#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
@prefix dct:  <http://purl.org/dc/terms/> .
@prefix dpv:  <https://w3id.org/dpv#> .

<https://w3id.org/pr2graph>
    a owl:Ontology ;
    rdfs:label "Pr²Graph Schema"@en ;
    dct:title "Pr²Graph — Privacy Practice Graph Ontology"@en ;
    dct:description "Ontology for the Pr²Graph Knowledge Graph, modelling data privacy practices extracted from website privacy policies. Part of the ISWC 2026 resource paper 'A Semantic Resource Suite for Privacy Policy Formalization'."@en ;
    dct:creator "Rui Zhao" ;
    dct:created "2026-08-05"^^xsd:date ;
    owl:versionIRI <https://w3id.org/pr2graph/1.0> ;
    owl:imports dpv: .

# ── Classes ──────────────────────────────────────────────────────────

pr2g:DataPractice
    a rdfs:Class ;
    rdfs:label "Data Practice"@en ;
    rdfs:comment "A privacy-relevant data practice described in a privacy policy. Central class linking together data, purposes, parties, and the original policy text for a single stated practice (e.g. a first-party collection, or a third-party disclosure)."@en .

pr2g:DataCollectionUse
    a rdfs:Class ;
    rdfs:subClassOf pr2g:DataPractice ;
    rdfs:label "Data Collection / Use"@en ;
    rdfs:comment "A first-party data collection-and-use practice: the service itself collects and uses personal data for a stated purpose."@en .

pr2g:DataSharingDisclosure
    a rdfs:Class ;
    rdfs:subClassOf pr2g:DataPractice ;
    rdfs:label "Data Sharing / Disclosure"@en ;
    rdfs:comment "A practice where personal data is shared with or disclosed to a third party for a stated purpose."@en .

pr2g:PrivacyPolicy
    a rdfs:Class ;
    rdfs:label "Privacy Policy"@en ;
    rdfs:comment "A privacy policy document of a service, containing the collection of DataPractice instances extracted from it."@en .

pr2g:Service
    a rdfs:Class ;
    rdfs:label "Service"@en ;
    rdfs:comment "An online service or website whose privacy policy is represented in the KG."@en .

pr2g:Website
    a rdfs:Class ;
    rdfs:subClassOf pr2g:Service ;
    rdfs:label "Website"@en ;
    rdfs:comment "A website whose privacy policy is represented in the KG."@en .

pr2g:Party
    a rdfs:Class ;
    rdfs:label "Party"@en ;
    rdfs:comment "A party (person, organisation, or group) involved in a data practice, such as the data controller, a third-party recipient, or the user."@en .

pr2g:FirstParty
    a rdfs:Class ;
    rdfs:subClassOf pr2g:Party ;
    rdfs:label "First Party"@en ;
    rdfs:comment "The first-party organisation (typically the data controller operating the service)."@en .

pr2g:ThirdParty
    a rdfs:Class ;
    rdfs:subClassOf pr2g:Party ;
    rdfs:label "Third Party"@en ;
    rdfs:comment "A third-party organisation that receives or processes personal data."@en .

pr2g:User
    a rdfs:Class ;
    rdfs:subClassOf pr2g:Party ;
    rdfs:label "User"@en ;
    rdfs:comment "The user (data subject) whose personal data is collected or shared."@en .

pr2g:Data
    a rdfs:Class ;
    rdfs:label "Data"@en ;
    rdfs:comment "A category of personal data involved in a practice. Grounded in DPV personal-data categories where applicable."@en .

pr2g:Purpose
    a rdfs:Class ;
    rdfs:label "Purpose"@en ;
    rdfs:comment "A stated purpose for which personal data is collected, used, or shared. Grounded in DPV purpose categories where applicable."@en .

pr2g:Text
    a rdfs:Class ;
    rdfs:label "Text"@en ;
    rdfs:comment "The original text segment (span) from the privacy policy from which a practice was extracted. Retained for auditability."@en .

# ── Vocabulary: ODRL constraint concept (not in the core schema diagram, but referenced in the paper's formal-policy mapping) ──

pr2g:Recipient
    a rdfs:Class ;
    rdfs:label "Recipient"@en ;
    rdfs:comment "Designates the party that receives personal data in a data-sharing practice. Used as an ODRL left-operand (odrl:leftOperand) in odrl:Constraint clauses to encode third-party-sharing restrictions in the DToU formal policy model."@en .

# ── Object Properties ────────────────────────────────────────────────

pr2g:hasDataPractice
    a owl:ObjectProperty ;
    rdfs:label "has data practice"@en ;
    rdfs:domain pr2g:PrivacyPolicy ;
    rdfs:range pr2g:DataPractice ;
    rdfs:comment "Links a PrivacyPolicy to one of its extracted DataPractice entries."@en .

pr2g:text
    a owl:ObjectProperty ;
    rdfs:label "text"@en ;
    rdfs:domain pr2g:DataPractice ;
    rdfs:range pr2g:Text ;
    rdfs:comment "The original text segment from which this data practice was extracted."@en .

pr2g:data
    a owl:ObjectProperty ;
    rdfs:label "data"@en ;
    rdfs:domain pr2g:DataPractice ;
    rdfs:range pr2g:Data ;
    rdfs:comment "The personal data involved in the practice."@en .

pr2g:purpose
    a owl:ObjectProperty ;
    rdfs:label "purpose"@en ;
    rdfs:domain pr2g:DataPractice ;
    rdfs:range pr2g:Purpose ;
    rdfs:comment "The purpose for which the data is collected, used, or shared in this practice."@en .

pr2g:user
    a owl:ObjectProperty ;
    rdfs:label "user"@en ;
    rdfs:domain pr2g:DataCollectionUse ;
    rdfs:range pr2g:Party ;
    rdfs:comment "The user (data subject) who provides the personal data in a first-party collection practice."@en .

pr2g:provider
    a owl:ObjectProperty ;
    rdfs:label "provider"@en ;
    rdfs:domain pr2g:DataPractice ;
    rdfs:range pr2g:Party ;
    rdfs:comment "The party that provides or controls the personal data (typically the first party / data controller)."@en .

pr2g:sharer
    a owl:ObjectProperty ;
    rdfs:label "sharer"@en ;
    rdfs:domain pr2g:DataSharingDisclosure ;
    rdfs:range pr2g:Party ;
    rdfs:comment "The party that shares the personal data with a third party (typically the first party / data controller)."@en .

pr2g:receiver
    a owl:ObjectProperty ;
    rdfs:label "receiver"@en ;
    rdfs:domain pr2g:DataSharingDisclosure ;
    rdfs:range pr2g:Party ;
    rdfs:comment "The third party that receives the shared personal data in a disclosure practice."@en .

pr2g:for
    a owl:ObjectProperty ;
    rdfs:label "for"@en ;
    rdfs:domain pr2g:PrivacyPolicy ;
    rdfs:range pr2g:Service ;
    rdfs:comment "The service to which this privacy policy belongs."@en .

# ── Datatype Properties ──────────────────────────────────────────────

pr2g:name
    a owl:DatatypeProperty ;
    rdfs:label "name"@en ;
    rdfs:domain pr2g:Party ;
    rdfs:range xsd:string ;
    rdfs:comment "The name of a party (first party, third party, or user)."@en .

pr2g:hasDomain
    a owl:DatatypeProperty ;
    rdfs:label "has domain"@en ;
    rdfs:domain pr2g:Website ;
    rdfs:range xsd:string ;
    rdfs:comment "The domain name (URL) of the website."@en .

pr2g:value
    a owl:DatatypeProperty ;
    rdfs:label "value"@en ;
    rdfs:domain pr2g:Text ;
    rdfs:range xsd:string ;
    rdfs:comment "The literal text content of the original policy segment."@en .
