<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: rdf_entities_converter_concept.class.php,v 1.1 2024/12/12 16:12:24 dbellamy Exp $

if (stristr($_SERVER['REQUEST_URI'], ".class.php")) {
    die("no access");
}

global $class_path;

require_once $class_path . '/rdf_entities_conversion/rdf_entities_converter_authority.class.php';
require_once $class_path . '/skos/skos_concept.class.php';

class rdf_entities_converter_concept extends rdf_entities_converter_authority
{

    protected $prefix_rdf = "http://www.w3.org/2004/02/skos/core#";

    public function get_assertions()
    {
        $sc = new skos_concept($this->entity_id);
        
        $this->uri = $sc->get_uri();
        //$this->uri = $this->prefix_rdf . "Concept#".$this->entity_id;
        
        $assertion = new onto_assertion(
            $this->uri, 
            "http://www.pmbservices.fr/ontology#identifier", 
            $this->entity_id, 
            "http://www.w3.org/2000/01/rdf-schema#Literal", 
            array(
                'type' => "literal"
            )
        );
        $this->assertions[] = $assertion;

        $display_label = $sc->get_display_label();
        $assertion = new onto_assertion(
            $this->uri,
            "http://www.pmbservices.fr/ontology#label_multilingue",
            $display_label,
            "http://www.w3.org/2000/01/rdf-schema#Literal",
            array(
                'type' => "literal"
            )
            );
        $this->assertions[] = $assertion;
        return $this->assertions;
    }

}