phpDocumentor lodel-source
[ class tree: lodel-source ] [ index: lodel-source ] [ all elements ]

Procedural File: oai20.php

Source Location: /lodel/src/oai20.php

Page Details

Fichier OAI - script du dépot OAI

Ce fichier reçoit les commande OAI et fait renvoit le XML associé

Mostly taken and often adapted from OAI V2 Data-Provider, Heinrich Stamerjohanns, stamer@uni-oldenburg.de, http://physnet.uni-oldenburg.de/oai

Code fortement repris/inspire de celui d''OAI V2 Data-Provider' par Heinrich Stamerjohanns : stamer@uni-oldenburg.de, http://physnet.uni-oldenburg.de/oai

PHP versions 4 et 5

LODEL - Logiciel d'Edition ELectronique.

Copyright (c) 2001-2002, Ghislain Picard, Marin Dacos Copyright (c) 2003, Ghislain Picard, Marin Dacos, Luc Santeramo, Nicolas Nutten, Anne Gentil-Beccot Copyright (c) 2004, Ghislain Picard, Marin Dacos, Luc Santeramo, Anne Gentil-Beccot, Bruno Cénou Copyright (c) 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou Copyright (c) 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse

Home page: http://www.lodel.org

E-Mail: lodel@lodel.org

All Rights Reserved

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Author:  Loïc Bontonou
Author:  Jean Lamy
Author:  Ghislain Picard
Author:  Bruno Cénou
Version:  CVS:$Id:
Copyright:  2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou
Copyright:  2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse
Filesource:  Source Code for this file
Includes
require_once (connect.php) [line 58]
[ Top ]

require_once (xmlfunc.php) [line 833]

If error messages were generated, they are displayed and the program ends.

Si des messages d'erreur ont ete generes, ils sont affiches et l'execution du programme se termine.

[ Top ]

require_once (auth.php) [line 54]
[ Top ]

require_once (xmlfunc.php) [line 746]

List of OAI-referenced entities.

Construit la liste des entites referencees par l'OAI.

[ Top ]

require_once ('siteconfig.php') [line 53]
[ Top ]

require_once (view.php) [line 857]

Displays the response.

Affichage de la reponse.

[ Top ]

require_once (func.php) [line 55]
[ Top ]


Constants
MAXIDS  [line 61]

MAXIDS = 10

[ Top ]

MAXRECORDS  [line 62]

MAXRECORDS = 10

[ Top ]

TOKENVALID  [line 60]

TOKENVALID = 24

[ Top ]


Functions
check_identifier  [line 624]

void check_identifier( string $val  )

Tests the 'Identifier' argument.

Verifie la validite de l'information liee a l'argument 'Identifier'.

Parameters:
string   $val:  la valeur de l'identifier OAI


[ Top ]
check_mdp  [line 605]

void check_mdp( string $val  )

Tests the 'metadataPrefix' argument.

Verifie la validite de l'information liee a l'argument 'metadataPrefix'.

Parameters:
string   $val:  la valeur à vérifier


[ Top ]
check_records  [line 520]

void check_records( )

ListRecords and ListIdentifiers accept the same parameters, the shared tests are regrouped in this function.

ListRecords et ListIdentifiers acceptent les meme parametres, les tests communs sont donc regroupes dans cette fonction.



[ Top ]
clean_expired_tokens  [line 264]

void clean_expired_tokens( )

Deletes outdated tokens from table oaitokens.

Supprime les tokens dont la date de validite est depassee.



[ Top ]
dc_rename  [line 293]

la dc_rename( string $str  )

dc types are defined in lodel's database using the template : "dc.name" to fit the OAI protocol, we have to rename them using the template "dc:name"

les types dc sont definis dans la base de donnees en utilisant la forme "dc.nom", on les renomme en "dc:nom" pour coller au protocole OAI

Parameters:
string   $str:  la chaine à modifier

API Tags:
Return:  chaine modifiée


[ Top ]
del_token  [line 223]

rien del_token( string $token  )

Deletes a token from table oaitokens once it has been used.

Une fois un token exploite, il est retire de la table oaitokens.

Parameters:
string   $token:  le token


[ Top ]
getOut  [line 67]

void getOut( $hostname  )
Parameters:
   $hostname: 


[ Top ]
get_dc_description  [line 337]

un get_dc_description( integer $id  )

Uses $id_class_fields to get the name of an entity's dc.description field, extract its content from the database and return it.

A partir de la table mettant en relation un id d'entite avec le nom de sa classe et celui du champ dc.description correspondant, on renvoit le contenu de ce champ dc.descrition.

Parameters:
integer   $id:  l'identifiant de l'entité

API Tags:
Return:  resultSet SQL


[ Top ]
get_dc_language  [line 365]

un get_dc_language( integer $id  )

Uses $id_class_fields to get the name of an entity's dc.language field, extract its content from the database and return it.

A partir de la table mettant en relation un id d'entite avec le nom de sa classe et celui du champ dc.language correspondant, on renvoit le contenu de ce champ dc.language.

Parameters:
integer   $id:  l'identifiant de l'entité

API Tags:
Return:  resultSet SQL


[ Top ]
get_token_info  [line 206]

un get_token_info( string $token  )

Extracts a token's infos from the database.

If the token doesn't exist, the error is handled in the 'verbs_processing' function.

Extrait de la bd les infos concernant le token. Si le token n'existe pas, l'erreur est traitee par la suite dans la fonction "verbs_processing".

Parameters:
string   $token:  le token

API Tags:
Return:  resultset SQL


[ Top ]
illegal_parameters  [line 646]

void illegal_parameters( )

Tests for illegal parameters and generate the appropriate error messages.

Traite la presence d'arguments illegaux en generant le message d'erreur approprie.



[ Top ]
insert_token  [line 243]

void insert_token( string $token, string $where, string $metadataprefix, integer $deliveredrecords, datetime $expirationdatetime  )

Inserts new token in table oaitokens.

Insere un nouveau token dans la table oaitokens.

Parameters:
string   $token:  le token
string   $where:  la clause where
string   $metadataprefix:  le format de métadonnées de la requête
integer   $deliveredrecords:  le nombre d'enregistrements délivrés
datetime   $expirationdatetime:  le datetime d'expiration du token.


[ Top ]
log_access  [line 80]

void log_access( $hostname, [ $denied = 0]  )
Parameters:
   $hostname: 
   $denied: 


[ Top ]
oai_error  [line 99]

une oai_error( string $code, [string $argument = ''], [string $value = '']  )

Generates OAI error messages.

Genere les messages d'erreur OAI.

Parameters:
string   $code:  le code d'erreur
string   $argument:  l'argument passé. Par défaut vide
string   $value:  la valeur de l'argument. Par défaut vide

API Tags:
Return:  chaine xml d'erreur <error code="">message</error>


[ Top ]
sql2TS  [line 278]

le sql2TS( string $date  )

Transforme une date SQL en timestamp unix

Parameters:
string   $date:  la date au format datetime de MySQL

API Tags:
Return:  timestamp unix


[ Top ]
strip_amp  [line 304]

la strip_amp( string $str  )

Remplace les & par des &amp; dans une chaine

Parameters:
string   $str:  la chaine à modifier

API Tags:
Return:  chaine modifiée


[ Top ]
strip_set  [line 319]

la strip_set( string $str  )

Only a limited set of characters is available for sets' names.

This filter replaces the unapropriate characters by valid ones.

Les noms de sets ne peuvent comporter qu'un ensemble limite de caracteres. Ce filtre remplace les caracteres inappropries.

Parameters:
string   $str:  la chaine à modifier

API Tags:
Return:  chaine modifiée


[ Top ]
verbs_processing  [line 384]

void verbs_processing( )

Tests the 'verb' argument.



[ Top ]
xmlstr  [line 178]

la xmlstr( string $string, [string $charset = 'utf-8'], [boolean $xmlescaped = false]  )

Transforme une chaine pour l'inclure dans un fichier XML

Parameters:
string   $string:  la chaine de caractères
string   $charset:  le jeu de caractère de la chaine (utf-8 par défaut).
boolean   $xmlescaped:  un boolean indiquant si le xml doit être échappé ou non. Par défaut à false.

API Tags:
Return:  chaîne XML


[ Top ]


Documentation generated on Wed, 19 Sep 2007 05:07:23 +0200 by phpDocumentor 1.4.0a2