@prefix caveat: <https://w3id.org/intellicat/caveat#> .
@prefix iao:    <http://purl.obolibrary.org/obo/> .
@prefix owl:    <http://www.w3.org/2002/07/owl#> .
@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:    <http://www.w3.org/2001/XMLSchema#> .

<https://w3id.org/intellicat/caveat/modules/document-schema> a owl:Ontology ;
    rdfs:comment "Schema for annotating scientific documents with CAVEAT classifications. Defines the AnnotatedDocument class and properties for linking documents to unreliability modes, detection markers, scientific domains, and corpus families. This module defines the schema (TBox); specific document annotations are ABox data maintained by consumers."@en .

# =============================================================================
# DOCUMENT CLASS
# =============================================================================

caveat:AnnotatedDocument a owl:Class ;
    rdfs:subClassOf iao:IAO_0000030 ;
    rdfs:label "annotated document"@en ;
    caveat:definition "An information content entity representing a scientific publication that has been annotated with one or more CAVEAT unreliability modes, detection markers, and/or scientific domain classifications."@en .

caveat:CorpusFamily a owl:Class ;
    rdfs:label "corpus family"@en ;
    caveat:definition "A collection of annotated documents that share a common origin, production method, or thematic pattern, and are analyzed as a group. Examples: all papers from a specific papermill, all publications by a specific fraudulent author, all papers in a specific pseudoscience domain."@en .

# =============================================================================
# CLASSIFICATION PROPERTIES
# =============================================================================

caveat:primaryUnreliabilityMode a owl:ObjectProperty ;
    rdfs:label "primary unreliability mode"@en ;
    rdfs:comment "The principal unreliability mode for this document. Each document should have exactly one primary mode."@en ;
    rdfs:domain caveat:AnnotatedDocument ;
    rdfs:range caveat:UnreliabilityMode .

caveat:secondaryUnreliabilityMode a owl:ObjectProperty ;
    rdfs:label "secondary unreliability mode"@en ;
    rdfs:comment "An additional unreliability mode for this document. A document may have zero or more secondary modes."@en ;
    rdfs:domain caveat:AnnotatedDocument ;
    rdfs:range caveat:UnreliabilityMode .

caveat:detectionMarkerObserved a owl:ObjectProperty ;
    rdfs:label "detection marker observed"@en ;
    rdfs:comment "A detection marker that has been observed in this document."@en ;
    rdfs:domain caveat:AnnotatedDocument ;
    rdfs:range caveat:DetectionMarker .

caveat:claimedDomain a owl:ObjectProperty ;
    rdfs:label "claimed domain"@en ;
    rdfs:comment "The scientific domain (OpenAlex topic) that this document claims to contribute to."@en ;
    rdfs:domain caveat:AnnotatedDocument ;
    rdfs:range caveat:OpenAlexTopic .

caveat:corpusFamily a owl:ObjectProperty ;
    rdfs:label "member of corpus family"@en ;
    rdfs:comment "The corpus family to which this document belongs."@en ;
    rdfs:domain caveat:AnnotatedDocument ;
    rdfs:range caveat:CorpusFamily .

# =============================================================================
# CORPUS FAMILY PROPERTIES
# =============================================================================

caveat:estimatedSize a owl:DatatypeProperty ;
    rdfs:label "estimated corpus size"@en ;
    rdfs:comment "Approximate number of documents in this corpus family."@en ;
    rdfs:domain caveat:CorpusFamily .

# =============================================================================
# RETRACTION PROPERTIES
# =============================================================================

caveat:RetractionRecord a owl:Class ;
    rdfs:label "retraction record"@en ;
    rdfs:comment "Structured record of a paper's retraction status, including date, reason, severity, and any associated consequences."@en .

caveat:retractionStatus a owl:ObjectProperty ;
    rdfs:label "retraction status"@en ;
    rdfs:domain caveat:AnnotatedDocument ;
    rdfs:range caveat:RetractionRecord .

caveat:retractionDate a owl:DatatypeProperty ;
    rdfs:label "retraction date"@en ;
    rdfs:domain caveat:RetractionRecord ;
    rdfs:range xsd:date .

caveat:retractionReason a owl:DatatypeProperty ;
    rdfs:label "retraction reason"@en ;
    rdfs:domain caveat:RetractionRecord ;
    rdfs:range xsd:string .

caveat:retractionSeverityValue a owl:DatatypeProperty ;
    rdfs:label "retraction severity value"@en ;
    rdfs:comment "Severity classification for this retraction record, used for document-level annotation and stratified reporting. Expected values: catastrophic, major, standard."@en ;
    rdfs:domain caveat:RetractionRecord ;
    rdfs:range xsd:string .

caveat:retractionNoticeDOI a owl:DatatypeProperty ;
    rdfs:label "retraction notice DOI"@en ;
    rdfs:domain caveat:RetractionRecord ;
    rdfs:range xsd:string .

caveat:associatedPerson a owl:ObjectProperty ;
    rdfs:label "associated person"@en ;
    rdfs:domain caveat:RetractionRecord ;
    rdfs:comment "Person associated with the misconduct, used for named-person scoring in TRACES."@en .

caveat:personName a owl:DatatypeProperty ;
    rdfs:label "person name"@en ;
    rdfs:range xsd:string .

caveat:legalConsequences a owl:DatatypeProperty ;
    rdfs:label "legal consequences"@en ;
    rdfs:range xsd:string ;
    rdfs:comment "Free text describing legal consequences: 'none', 'criminal conviction', 'civil settlement', etc."@en .