prefix = $prefix;
$this->get_authpersos();
}
public function build_onto () {
$onto = "
";
foreach ($this->authpersos as $id => $detail) {
if (is_array($detail['fields'])) {
foreach ($detail['fields'] as $key => $t_field) {
$this->init_attributes();
$this->set_uri_description($t_field["name"]);
$this->set_datatype_from_field($t_field["id"],$t_field);
$this->set_restrictions($t_field);
$onto.= "
" . htmlspecialchars(encoding_normalize::utf8_normalize($t_field["label"]), ENT_QUOTES, 'utf-8') . "
";
$onto.= $this->optional_properties;
$onto.= "
" . $this->uri_description . "
";
// On n'oublie pas les noeuds blancs
$onto.= $this->blank_nodes;
$this->authpersos[$id]['fields'][$key]['rdf_nodeId'] = $this->rdf_nodeId;
}
}
}
$onto .= $this->build_onto_class();
$onto .= $this->build_onto_responsabilities();
return $onto;
}
protected function build_onto_class() {
$onto = '';
if (!empty($this->authpersos)) {
foreach ($this->authpersos as $id => $detail) {
$onto.= '
'.htmlspecialchars(encoding_normalize::utf8_normalize($detail['name']), ENT_QUOTES, 'utf-8').'
'.htmlspecialchars(encoding_normalize::utf8_normalize($detail['comment']), ENT_QUOTES, 'utf-8').'
';
foreach ($detail['fields'] as $field) {
if (!empty($field['rdf_nodeId'])) {
// on ajoute le rdf:nodeID pour prendre en compte les restrictions
$onto.= '
';
}
}
$onto.= '
pmb_entity
auth_perso
'.($detail['event'] ? 'is_event' : '').'
authperso_'.$id.'
'.htmlspecialchars(encoding_normalize::utf8_normalize($detail['name']), ENT_QUOTES, 'utf-8') .'
'. htmlspecialchars(encoding_normalize::utf8_normalize($detail['comment']), ENT_QUOTES, 'utf-8') .'
authperso_'.$id.'
has_authperso_'.$id.'
';
}
}
return $onto;
}
protected function get_authpersos() {
$authperso = new authpersos();
$this->authpersos = $authperso->get_data();
}
protected function build_onto_responsabilities() {
global $msg;
$onto = "
".htmlspecialchars(encoding_normalize::utf8_normalize($msg['aut_responsability_form_responsability_authperso']), ENT_QUOTES, 'utf-8')."
";
foreach ($this->authpersos as $id => $detail) {
if ($detail['responsability_authperso']) {
$onto .= "";
}
}
$onto .= "
has_responsability_authperso
author
";
return $onto;
}
}