@prefix IAO: <http://purl.obolibrary.org/obo/IAO_> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix hex: <https://purl.org/packagegraph/ontology/hex#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix pkg: <https://purl.org/packagegraph/ontology/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

hex:buildTools a owl:DatatypeProperty ;
    rdfs:label "build tools"@en ;
    IAO:0000115 "Build tool used (mix, rebar3, erlang.mk)."@en ;
    rdfs:domain hex:HexPackage ;
    rdfs:isDefinedBy hex: ;
    rdfs:range xsd:string .

hex:checksumAlgorithm a owl:DatatypeProperty ;
    rdfs:label "checksum algorithm"@en ;
    IAO:0000115 "Checksum algorithm (typically sha256)."@en ;
    rdfs:domain hex:HexPackage ;
    rdfs:isDefinedBy hex: ;
    rdfs:range xsd:string .

hex:downloads a owl:DatatypeProperty ;
    rdfs:label "downloads"@en ;
    IAO:0000115 "Total download count for this package version."@en ;
    rdfs:domain hex:HexPackage ;
    rdfs:isDefinedBy hex: ;
    rdfs:range xsd:integer .

hex:elixirVersion a owl:DatatypeProperty ;
    rdfs:label "elixir version"@en ;
    IAO:0000115 "Elixir version requirement (e.g., '~> 1.14')."@en ;
    rdfs:domain hex:HexPackage ;
    rdfs:isDefinedBy hex: ;
    rdfs:range xsd:string .

hex:erlangVersion a owl:DatatypeProperty ;
    rdfs:label "erlang version"@en ;
    IAO:0000115 "OTP/Erlang version requirement."@en ;
    rdfs:domain hex:HexPackage ;
    rdfs:isDefinedBy hex: ;
    rdfs:range xsd:string .

hex:publishedTo a owl:ObjectProperty ;
    rdfs:label "published to"@en ;
    IAO:0000115 "Associates a package with Hex.pm."@en ;
    rdfs:domain hex:HexPackage ;
    rdfs:isDefinedBy hex: ;
    rdfs:range hex:HexRepository .

hex:retirementReason a owl:DatatypeProperty ;
    rdfs:label "retirement reason"@en ;
    IAO:0000115 "Reason for package retirement (deprecated, security, renamed, etc.)."@en ;
    rdfs:domain hex:HexPackage ;
    rdfs:isDefinedBy hex: ;
    rdfs:range xsd:string .

hex:HexRepository a owl:Class ;
    rdfs:label "Hex Repository"@en ;
    IAO:0000115 "The Hex.pm repository serving Elixir and Erlang packages."@en ;
    rdfs:comment "The Hex.pm package repository"@en ;
    rdfs:isDefinedBy hex: ;
    rdfs:subClassOf pkg:Repository .

hex:HexPackage a owl:Class ;
    rdfs:label "Hex Package"@en ;
    IAO:0000115 "An Elixir or Erlang library distributed through Hex.pm, described by a mix.exs file."@en ;
    rdfs:comment "A package published to Hex.pm"@en ;
    rdfs:isDefinedBy hex: ;
    rdfs:subClassOf pkg:SourcePackage .

hex: a owl:Ontology ;
    rdfs:label "Hex Package Ontology"@en ;
    dcterms:abstract "Models Hex.pm packages including Elixir/Erlang version requirements, build tools, retirement status, and hex-specific metadata. Instances are dual-typed as both pkg:Package and hex:HexPackage." ;
    dcterms:created "2026-04-14"^^xsd:date ;
    dcterms:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
    dcterms:modified "2026-04-21"^^xsd:date ;
    rdfs:comment "Ontology for representing Hex packages and the Elixir/Erlang ecosystem"@en ;
    rdfs:isDefinedBy hex: ;
    rdfs:seeAlso <https://purl.org/packagegraph/ontology/hex/shapes> ;
    owl:imports pkg: ;
    owl:priorVersion <https://purl.org/packagegraph/ontology/hex/0.6.0> ;
    owl:versionIRI <https://purl.org/packagegraph/ontology/hex/0.7.0> ;
    owl:versionInfo "0.7.0" .

