################################################################################
# IMGT-KG — description VoID enrichie (squelette)
#
# Les valeurs marquées « TODO » doivent être remplies à partir de la sortie de
# imgt-kg-void-stats.rq. Les blocs classPartition / propertyPartition sont
# tronqués à titre d'exemple : les générer intégralement via Q20 et Q21.
################################################################################

@prefix imgtvoid: <http://www.imgt.org/imgt-kg/void/> .
@prefix imgt:     <https://www.imgt.org/imgt-ontology#> .
@prefix owl:      <http://www.w3.org/2002/07/owl#> .
@prefix rdf:      <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos:     <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .
@prefix void:     <http://rdfs.org/ns/void#> .
@prefix sd:       <http://www.w3.org/ns/sparql-service-description#> .
@prefix dcterms:  <http://purl.org/dc/terms/> .
@prefix dcat:     <http://www.w3.org/ns/dcat#> .
@prefix foaf:     <http://xmlns.com/foaf/0.1/> .
@prefix prov:     <http://www.w3.org/ns/prov#> .
@prefix formats:  <http://www.w3.org/ns/formats/> .
@prefix up:       <http://purl.uniprot.org/core/> .
@prefix obo:      <http://purl.obolibrary.org/obo/> .
@prefix freq:     <http://purl.org/cld/freq/> .


<> a void:DatasetDescription ;
    dcterms:title      "A VoID Description of the IMGT Knowledge Graphs (IMGT-KG, IMGT/mAb-KG)" ;
    dcterms:creator    imgtvoid:IMGT ;
    dcterms:modified   "2026-09-01"^^xsd:date ;
    foaf:primaryTopic  imgtvoid:imgtkg ;
    .

################################################################################
# 0. Nœud chapeau : la famille de graphes IMGT
#
# IMGT-KG et IMGT/mAb-KG sont deux graphes distincts (endpoints séparés,
# DOI séparés, cycles de publication séparés) mais interconnectés. Les
# regrouper sous un void:Dataset chapeau permet à un client — ou à un agent —
# de découvrir les deux à partir d'un seul point d'entrée.
################################################################################

imgtvoid:imgtGraphs a void:Dataset ;
    dcterms:title       "IMGT Knowledge Graphs" ;
    dcterms:description "The family of FAIR knowledge graphs published by IMGT®: IMGT-KG for immunogenetics and IMGT/mAb-KG for therapeutic monoclonal antibodies." ;
    dcterms:publisher   imgtvoid:IMGT ;
    void:subset         imgtvoid:imgtkg ;
    void:subset         imgtvoid:mabkg ;
    .

################################################################################
# 1. Nœud « concept » stable, indépendant des versions
################################################################################

imgtvoid:imgtkg a void:Dataset ;
    dcterms:title       "IMGT-KG" ;
    dcterms:description "IMGT-KG, a FAIR knowledge graph for immunogenetics (version-independent concept resource)" ;
   
    dcterms:identifier  <https://doi.org/10.5281/zenodo.6511279> ;   # concept DOI Zenodo
    dcterms:hasVersion  imgtvoid:imgtkg-v1 ;                          # ajouter une ligne par release
    dcterms:hasVersion  imgtvoid:imgtkg-v2 ;                          # ajouter une ligne par release
    dcterms:hasVersion  imgtvoid:imgtkg-latest ;
    #void:subset         imgtvoid:imgtkgInferenceFree ;
    
    dcterms:bibliographicCitation
        "IMGT-KG: A Knowledge Graph for Immunogenetics. ISWC 2022. DOI: 10.1007/978-3-031-19433-7_35" ;
    .

# Alias vers la release courante — les clients qui veulent « la dernière »
# dereferencent ceci plutôt qu'un IRI daté.
imgtvoid:imgtkg-latest a void:Dataset ;
    dcterms:isVersionOf imgtvoid:imgtkg ;
    dcterms:hasVersion  "2026.3" ;
    owl:versionInfo     "2026.3" ;
    dcterms:issued      "2026-09-01"^^xsd:date ;
    dcterms:modified    "2026-09-01"^^xsd:date ;
    .

################################################################################
# 2. Version sans inférence
################################################################################

imgtvoid:imgtkg a void:Dataset ;
    dcterms:title       "IMGT-KG" ;
    dcterms:description "a knowledge graph for immunogenetics, the version without inferences" ;

    # --- versioning (le manque principal du fichier initial) ------------------
    dcterms:hasVersion  "TODO-2026.1" ;
    owl:versionInfo     "TODO-2026.1" ;
    dcterms:created     "2022-04-13"^^xsd:date ;
    dcterms:issued      "2026-09-01"^^xsd:date ;
    dcterms:modified    "2026-09-01"^^xsd:date ;
    dcterms:accrualPeriodicity <http://purl.org/cld/freq/quarterly> ;   # à ajuster

    # --- attribution ----------------------------------------------------------
    dcterms:creator     imgtvoid:IMGT ;
    dcterms:publisher   imgtvoid:IMGT ;
    dcterms:source      <https://imgt.org/> ;
    dcterms:license     <https://creativecommons.org/licenses/by-nc-nd/4.0/> ;
    # NOTE : CC BY-NC-ND interdit usage commercial ET œuvres dérivées.
    # À réexaminer si des embeddings ou dérivés doivent être redistribués.
    dcterms:subject      <http://id.nlm.nih.gov/mesh/D007125>,  <http://id.nlm.nih.gov/mesh/D000095763>, <http://id.nlm.nih.gov/mesh/D007136>, <http://id.nlm.nih.gov/mesh/D005803> ; ## immunogenetic/informatique, gene,immunoglobuline

    foaf:homepage <https://www.imgt.org/imgt-kg/> ;
    foaf:page     <https://imgt.org/imgt-kg/explore> ,
                  <https://imgt.org/fuseki/#/> ;

    # --- accès ----------------------------------------------------------------
    void:sparqlEndpoint <https://www.imgt.org/fuseki/ImgtKg/sparql> ;
    void:dataDump       <https://doi.org/10.5281/zenodo.6511279> ;  
    void:feature        formats:Turtle, formats:N-Triples ;
    void:uriSpace       "https://www.imgt.org/imgt-ontology#" ;
        # --- provenance -----------------------------------------------------------
    prov:wasDerivedFrom  <https://imgt.org/> ;
    prov:generatedAtTime "2026-09-01T13:13:13Z"^^xsd:dateTime ;
    # TODO : vérifier avec Q11 s'il faut déclarer d'autres espaces d'URI.

    # --- vocabulaires ---------------------------------------------------------
    void:vocabulary
        <http://purl.org/dc/terms/> ,
        <http://biohackathon.org/resource/faldo#> ,
        <http://purl.org/dc/elements/1.1/> ,
        <http://www.w3.org/2004/02/skos/core#> ,
        <http://purl.obolibrary.org/obo/> ,
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ,
        <http://www.w3.org/2002/07/owl#> ,
        <http://www.w3.org/2000/01/rdf-schema#> ,
        <https://www.imgt.org/imgt-ontology#> ,
        <http://www.w3.org/2001/XMLSchema#> ;

    # --- statistiques (Q01–Q06) -----------------------------------------------
    void:triples          117927476 ;
    void:entities         12103104 ;
    void:classes          2515 ;
    void:properties       238 ;
    void:distinctSubjects 12135239 ;    
    void:distinctObjects  25846046 ; .

################################################################################
# 3. Description du service SPARQL (le préfixe sd: était déclaré mais inutilisé)
################################################################################
imgtvoid:imgtkgService a sd:Service ;
    sd:endpoint          <https://www.imgt.org/fuseki/ImgtKg/sparql> ;
    sd:supportedLanguage sd:SPARQL11Query ;
    sd:feature           sd:BasicFederatedQuery ;
    sd:resultFormat      formats:SPARQL_Results_JSON ,
                         formats:SPARQL_Results_CSV ,
                         formats:Turtle ;
    sd:defaultDataset [
        a sd:Dataset ;
        sd:defaultGraph [ a sd:Graph ; void:triples 117927476 ]
    ] ;
    .


################################################################################
# 4. Organisation
################################################################################

imgtvoid:IMGT a foaf:Organization ;
    rdfs:label      "IMGT" ;
    skos:definition "the international ImMunoGeneTics information system®" ;
    foaf:homepage   <https://imgt.org/> ;
    foaf:mbox       <mailto:contact-imgt@igh.cnrs.fr> ;   # corrigé : IRI mailto:
    .
