@prefix caveat: <https://w3id.org/intellicat/caveat#> .
@prefix skos:   <http://www.w3.org/2004/02/skos/core#> .
@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/scientific-domains> a owl:Ontology ;
    rdfs:comment "Scientific domain classification via alignment to OpenAlex topics. Defines the schema for representing the four-level OpenAlex hierarchy (domain > field > subfield > topic) and sibling relationships."@en .

# =============================================================================
# OPENALEX HIERARCHY CLASSES
# =============================================================================

caveat:OpenAlexDomain a owl:Class ;
    rdfs:subClassOf skos:Concept ;
    rdfs:label "OpenAlex domain"@en ;
    caveat:definition "The highest level of the OpenAlex topic hierarchy. Approximately 4 domains exist (e.g., Life Sciences, Physical Sciences, Social Sciences, Health Sciences)."@en .

caveat:OpenAlexField a owl:Class ;
    rdfs:subClassOf skos:Concept ;
    rdfs:label "OpenAlex field"@en ;
    caveat:definition "The second level of the OpenAlex topic hierarchy, a child of a domain. Approximately 25 fields exist (e.g., Medicine, Physics, Chemistry)."@en .

caveat:OpenAlexSubfield a owl:Class ;
    rdfs:subClassOf skos:Concept ;
    rdfs:label "OpenAlex subfield"@en ;
    caveat:definition "The third level of the OpenAlex topic hierarchy, a child of a field. Approximately 250 subfields exist (e.g., Immunology, Nuclear Physics)."@en .

caveat:OpenAlexTopic a owl:Class ;
    rdfs:subClassOf skos:Concept ;
    rdfs:label "OpenAlex topic"@en ;
    caveat:definition "The most granular level of the OpenAlex topic hierarchy. Approximately 4500 topics exist. This is the level at which CAVEAT anchors its scientific domain classification."@en .

# =============================================================================
# HIERARCHY PROPERTIES
# =============================================================================

caveat:parentDomain a owl:ObjectProperty ;
    rdfs:subPropertyOf skos:broader ;
    rdfs:label "parent domain"@en ;
    rdfs:domain caveat:OpenAlexField ;
    rdfs:range caveat:OpenAlexDomain .

caveat:parentField a owl:ObjectProperty ;
    rdfs:subPropertyOf skos:broader ;
    rdfs:label "parent field"@en ;
    rdfs:domain caveat:OpenAlexSubfield ;
    rdfs:range caveat:OpenAlexField .

caveat:parentSubfield a owl:ObjectProperty ;
    rdfs:subPropertyOf skos:broader ;
    rdfs:label "parent subfield"@en ;
    rdfs:domain caveat:OpenAlexTopic ;
    rdfs:range caveat:OpenAlexSubfield .

# =============================================================================
# SIBLING RELATIONSHIP
# =============================================================================

caveat:siblingTopic a owl:ObjectProperty, owl:SymmetricProperty ;
    rdfs:subPropertyOf skos:related ;
    rdfs:label "sibling topic"@en ;
    rdfs:domain caveat:OpenAlexTopic ;
    rdfs:range caveat:OpenAlexTopic ;
    caveat:definition "Relates two OpenAlex topics that OpenAlex lists as siblings. The list is imported as published; sibling topics may belong to different subfields."@en .

# =============================================================================
# OPENALEX METADATA PROPERTIES
# =============================================================================

caveat:openAlexId a owl:DatatypeProperty ;
    rdfs:label "OpenAlex ID"@en ;
    rdfs:comment "The OpenAlex identifier for this entity (e.g., 'T12345' for a topic)."@en ;
    rdfs:range xsd:string .

caveat:openAlexSnapshotDate a owl:AnnotationProperty ;
    rdfs:label "OpenAlex snapshot date"@en ;
    rdfs:comment "The date on which OpenAlex data was retrieved for this import. Since OpenAlex is actively maintained, topic assignments may change."@en ;
    rdfs:range xsd:date .

caveat:siblingSubfield a owl:ObjectProperty, owl:SymmetricProperty ;
    rdfs:subPropertyOf skos:related ;
    rdfs:label "sibling subfield"@en ;
    rdfs:domain caveat:OpenAlexSubfield ;
    rdfs:range caveat:OpenAlexSubfield ;
    caveat:definition "Relates two OpenAlex subfields that OpenAlex lists as siblings. The list is imported as published; sibling subfields may belong to different fields."@en .

caveat:openAlexKeyword a owl:AnnotationProperty ;
    rdfs:label "OpenAlex keyword"@en ;
    rdfs:comment "A keyword OpenAlex attaches to a topic. Descriptive, not a synonym."@en .

caveat:siblingField a owl:ObjectProperty, owl:SymmetricProperty ;
    rdfs:subPropertyOf skos:related ;
    rdfs:label "sibling field"@en ;
    rdfs:domain caveat:OpenAlexField ;
    rdfs:range caveat:OpenAlexField ;
    caveat:definition "Relates two OpenAlex fields that OpenAlex lists as siblings. The list is imported as published; sibling fields may belong to different domains."@en .

caveat:siblingDomain a owl:ObjectProperty, owl:SymmetricProperty ;
    rdfs:subPropertyOf skos:related ;
    rdfs:label "sibling domain"@en ;
    rdfs:domain caveat:OpenAlexDomain ;
    rdfs:range caveat:OpenAlexDomain ;
    caveat:definition "Relates two OpenAlex domains that OpenAlex lists as siblings. The list is imported as published."@en .
