mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +01:00
initial translation in yaz/functions
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<productname>YAZ</productname> que implementa o
|
||||
<link xlink:href="&url.yaz-loc;">Protocolo Z39.50
|
||||
para Recuperação de Informações</link>.
|
||||
Com esta extensão, você pode facilmente implementar uma origem Z39.50 (cliente)
|
||||
Com esta extensão, pode-se facilmente implementar uma origem Z39.50 (cliente)
|
||||
que pesquisa ou verifica alvos Z39.50 (servidores) em paralelo.
|
||||
</para>
|
||||
<para>
|
||||
@@ -27,7 +27,7 @@
|
||||
<para>
|
||||
<productname>YAZ</productname> está disponível em <link
|
||||
xlink:href="&url.yaz;">&url.yaz;</link>. Informações sobre novidades,
|
||||
scripts de exemplos, etc. para esta extensão em <link
|
||||
scripts de exemplos, etc. para esta extensão estão disponíveis em <link
|
||||
xlink:href="&url.yaz-phpyaz;">&url.yaz-phpyaz;</link>.
|
||||
</para>
|
||||
<note>
|
||||
|
||||
75
reference/yaz/functions/yaz-addinfo.xml
Normal file
75
reference/yaz/functions/yaz-addinfo.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-addinfo" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_addinfo</refname>
|
||||
<refpurpose>Retorna informações de erro adicionais</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>yaz_addinfo</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Retorna informações de erro adicionais para a última solicitação no servidor.
|
||||
</para>
|
||||
<para>
|
||||
Com alguns servidores, esta função pode retornar a mesma string que
|
||||
<function>yaz_error</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Uma string contendo informações adicionais de erro ou uma string vazia se
|
||||
a última operação foi bem-sucedida ou se nenhuma informação adicional foi
|
||||
fornecida pelo servidor.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>yaz_error</function></member>
|
||||
<member><function>yaz_errno</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
117
reference/yaz/functions/yaz-ccl-conf.xml
Normal file
117
reference/yaz/functions/yaz-ccl-conf.xml
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-ccl-conf" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>yaz_ccl_conf</refname>
|
||||
<refpurpose>Configura o analisador CCL</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>yaz_ccl_conf</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>config</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função configura o analisador de consulta CCL para um servidor com
|
||||
definições de pontos de acesso (qualificadores CCL) e seu mapeamento para RPN.
|
||||
</para>
|
||||
<para>
|
||||
Para mapear uma consulta CCL específica para RPN, chame a função
|
||||
<function>yaz_ccl_parse</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>config</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Um array de configuração. Cada chave do array é o nome de um campo CCL
|
||||
e o valor correspondente contém uma string que especifica um
|
||||
mapeamento para RPN.
|
||||
</para>
|
||||
<para>
|
||||
O mapeamento é uma sequência de pares tipo-do-atributo e valor-do-atributo.
|
||||
Tipo-do-atributo e valor-do-atributo são separados por um sinal de igual
|
||||
(<literal>=</literal>). Cada par é separado por um espaço em branco.
|
||||
</para>
|
||||
<para>
|
||||
Informações adicionais podem ser encontradas na página <link
|
||||
xlink:href="&url.yaz-ccl;">CCL</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
No exemplo abaixo, o analisador CCL está configurado para suportar três campos CCL:
|
||||
<literal>ti</literal>, <literal>au</literal> e
|
||||
<literal>isbn</literal>. Cada campo é mapeado para seu equivalente BIB-1.
|
||||
Assume-se que a variável <literal>$id</literal> é o ID da conexão.
|
||||
</para>
|
||||
<example>
|
||||
<title>Configuração CCL</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fields = array(
|
||||
"ti" => "1=4",
|
||||
"au" => "1=1",
|
||||
"isbn" => "1=7"
|
||||
);
|
||||
yaz_ccl_conf($id, $fields);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>yaz_ccl_parse</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
131
reference/yaz/functions/yaz-ccl-parse.xml
Normal file
131
reference/yaz/functions/yaz-ccl-parse.xml
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-ccl-parse" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_ccl_parse</refname>
|
||||
<refpurpose>Invoca o analisador CCL</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>yaz_ccl_parse</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>query</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter role="reference">result</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função invoca um analisador CCL. Ela converte uma consulta CCL FIND fornecida em
|
||||
uma consulta RPN que pode ser passada para a função <function>yaz_search</function>
|
||||
para realizar uma busca.
|
||||
</para>
|
||||
<para>
|
||||
Para definir um conjunto de campos CCL válidos, chame <function>yaz_ccl_conf</function>
|
||||
antes desta função.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>query</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A consulta CCL FIND.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>result</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Se a função foi executada com sucesso, este será um array
|
||||
contendo a consulta RPN válida sob a chave <literal>rpn</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Em caso de falha, três índices são definidos neste array para indicar a causa
|
||||
da falha:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>errorcode</literal> - o código de erro CCL (inteiro)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>errorstring</literal> - a string de erro CCL
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>errorpos</literal> - posição aproximada na consulta de falha
|
||||
(o inteiro é a posição do caractere)
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>Análise CCL</title>
|
||||
<para>
|
||||
Tentaremos pesquisar usando CCL. No exemplo abaixo,
|
||||
<literal>$ccl</literal> é uma consulta CCL.
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
yaz_ccl_conf($id, $fields); // veja o exemplo para yaz_ccl_conf
|
||||
if (!yaz_ccl_parse($id, $ccl, $cclresult)) {
|
||||
echo 'Erro: ' . $cclresult["errorstring"];
|
||||
} else {
|
||||
$rpn = $cclresult["rpn"];
|
||||
yaz_search($id, "rpn", $rpn);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
75
reference/yaz/functions/yaz-close.xml
Normal file
75
reference/yaz/functions/yaz-close.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-close" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_close</refname>
|
||||
<refpurpose>Fecha a conexão YAZ</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>yaz_close</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Fecha a conexão fornecida pelo parâmetro <parameter>id</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Esta função fechará apenas uma conexão não persistente aberta ao
|
||||
definir a opção <literal>persistent</literal> como &false; com
|
||||
<function>yaz_connect</function>.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>yaz_connect</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
222
reference/yaz/functions/yaz-connect.xml
Normal file
222
reference/yaz/functions/yaz-connect.xml
Normal file
@@ -0,0 +1,222 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: dafb1509d0b124bffe6ce275b5105b30b3fcec63 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-connect" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>yaz_connect</refname>
|
||||
<refpurpose>
|
||||
Prepara para uma conexão com um servidor Z39.50
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>yaz_connect</methodname>
|
||||
<methodparam><type>string</type><parameter>zurl</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>options</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função retorna um recurso de conexão em caso de sucesso, zero em caso de
|
||||
falha.
|
||||
</para>
|
||||
<para>
|
||||
<function>yaz_connect</function> prepara uma conexão com um
|
||||
servidor Z39.50.
|
||||
Esta função não é bloqueante e não tenta estabelecer
|
||||
uma conexão - ela apenas prepara uma conexão para ser executada posteriormente quando
|
||||
<function>yaz_wait</function> for chamado.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
O <link xlink:href="&url.yaz-proxy;">proxy YAZ</link> é um
|
||||
proxy Z39.50 disponível gratuitamente.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>zurl</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Uma string que assume o formato <literal>host[:porta][/banco_de_dados]</literal>.
|
||||
Se a porta for omitida, a porta 210 será usada. Se o banco de dados for omitido,
|
||||
<literal>Default</literal> será usado.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Se fornecido como uma string, será tratado como a string de autenticação Z39.50 V2
|
||||
(OpenAuth).
|
||||
</para>
|
||||
<para>
|
||||
Se fornecido como um array, o conteúdo do array serve como opções.
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>user</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Nome de usuário para autenticação.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>group</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Grupo para autenticação.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>password</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Senha para autenticação.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>cookie</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Cookie para sessão (proxy YAZ).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>proxy</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Proxy para conexão (proxy YAZ).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>persistent</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Um booleano. Se &true; a conexão é persistente; se &false; a
|
||||
conexão não é persistente. Por padrão, as conexões são persistentes.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Se uma conexão persistente for aberta, não será possível fechá-la
|
||||
mais tarde com <function>yaz_close</function>.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>piggyback</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Um booleano. Se &true;, piggyback estará habilitado para pesquisas; Se &false;
|
||||
piggyback estará desabilitado. Por padrão, o piggyback está habilitado.
|
||||
</para>
|
||||
<para>
|
||||
Habilitar o piggyback é mais eficiente e geralmente economiza
|
||||
uma viagem de ida e volta pela rede para as primeiras buscas de registros. No entanto,
|
||||
alguns servidores Z39.50 não suportam piggyback ou ignoram
|
||||
nomes de conjuntos de elementos. Para esses, o piggyback deve ser desabilitado.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>charset</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Uma string que especifica o conjunto de caracteres a ser usado na linguagem Z39.50
|
||||
e a negociação do conjunto de caracteres. Use strings como:
|
||||
<literal>ISO-8859-1</literal>, <literal>UTF-8</literal> ou
|
||||
<literal>UTF-16</literal>.
|
||||
</para>
|
||||
<para>
|
||||
A maioria dos servidores Z39.50 não oferece suporte a esse recurso (e, portanto, ele é
|
||||
ignorado). Muitos servidores usam a codificação ISO-8859-1 para consultas e
|
||||
mensagens. Registros MARC21/USMARC não são afetados por esta configuração.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>preferredMessageSize</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Um inteiro que especifica o tamanho máximo em bytes de todos os registros
|
||||
a serem retornados por um destino durante a recuperação. Consulte o
|
||||
<link xlink:href="&url.yaz.z3950.4;">padrão Z39.50</link> para mais
|
||||
informações.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Esta opção é suportada no PECL YAZ 1.0.5 ou posterior.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>maximumRecordSize</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Um inteiro que especifica o tamanho máximo em bytes de um único registro
|
||||
a ser retornado por um destino durante a recuperação. Esta
|
||||
entidade é chamada de Exceptional-record-size (tamanho de registro excepcional) no
|
||||
<link xlink:href="&url.yaz.z3950.4;">padrão Z39.50</link>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Esta opção é suportada no PECL YAZ 1.0.5 ou posterior.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Um recurso de conexão em caso de sucesso, &false; em caso de erro.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>yaz_close</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
75
reference/yaz/functions/yaz-database.xml
Normal file
75
reference/yaz/functions/yaz-database.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-database" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_database</refname>
|
||||
<refpurpose>
|
||||
Especifica os bancos de dados dentro de uma sessão
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>yaz_database</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>databases</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função permite que sejam alterados bancos de dados dentro de uma sessão
|
||||
especificando um ou mais bancos de dados a serem usados em pesquisas, recuperações, etc.
|
||||
- substituindo os bancos de dados especificados na chamada a
|
||||
<function>yaz_connect</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>databases</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Uma string contendo um ou mais bancos de dados. Vários bancos de dados são
|
||||
separados por um sinal de mais <literal>+</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
84
reference/yaz/functions/yaz-element.xml
Normal file
84
reference/yaz/functions/yaz-element.xml
Normal file
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-element" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_element</refname>
|
||||
<refpurpose>
|
||||
Especifica o nome do conjunto de elementos para recuperação
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>yaz_element</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>elementset</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função define o nome do conjunto de elementos para recuperação.
|
||||
</para>
|
||||
<para>
|
||||
Chame esta função antes de <function>yaz_search</function> ou
|
||||
<function>yaz_present</function> para especificar o nome do conjunto de elementos
|
||||
para os registros a serem recuperados.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Se esta função não parecer ter efeito, consulte a descrição da
|
||||
opção <literal>piggybacking</literal> em
|
||||
<function>yaz_connect</function>.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>elementset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A maioria dos servidores suporta <literal>F</literal> (para registros completos) e
|
||||
<literal>B</literal> (para registros breves).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
78
reference/yaz/functions/yaz-errno.xml
Normal file
78
reference/yaz/functions/yaz-errno.xml
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-errno" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_errno</refname>
|
||||
<refpurpose>Retorna o número do erro</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>yaz_errno</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Retorna um número de erro (última solicitação) para o servidor identificado por
|
||||
<parameter>id</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<function>yaz_errno</function> deve ser chamado após a atividade de rede para
|
||||
cada servidor - (após o retorno de <function>yaz_wait</function>) para determinar o
|
||||
sucesso ou falha da última operação (por exemplo, pesquisa).
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Retorna um código de erro. O código de erro é um código de diagnóstico Z39.50
|
||||
(geralmente um diagnóstico Bib-1) ou um código de erro do lado do cliente
|
||||
gerado pelo próprio PHP/YAZ, como "Connect failed" (falha na conexão), "Init Rejected" (inicialização rejeitada),
|
||||
etc.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>yaz_error</function></member>
|
||||
<member><function>yaz_addinfo</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
73
reference/yaz/functions/yaz-error.xml
Normal file
73
reference/yaz/functions/yaz-error.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-error" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_error</refname>
|
||||
<refpurpose>Retorna a descrição do erro</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>yaz_error</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>yaz_error</function> retorna uma mensagem de texto em inglês
|
||||
correspondente ao último número de erro retornado por
|
||||
<function>yaz_errno</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Retorna uma mensagem de texto de erro para o servidor (última solicitação), identificada pelo
|
||||
parâmetro <parameter>id</parameter>. Uma string vazia é retornada se a
|
||||
última operação foi bem-sucedida.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>yaz_errno</function></member>
|
||||
<member><function>yaz_addinfo</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
80
reference/yaz/functions/yaz-es-result.xml
Normal file
80
reference/yaz/functions/yaz-es-result.xml
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-es-result" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_es_result</refname>
|
||||
<refpurpose>
|
||||
Inspeciona o resultado dos serviços estendidos
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>yaz_es_result</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
Esta função inspeciona o último resultado do Serviço Estendido retornado
|
||||
de um servidor. Um Serviço Estendido é iniciado
|
||||
por <function>yaz_item_order</function> ou
|
||||
<function>yaz_es</function>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Retorna um array com o elemento <literal>targetReference</literal>
|
||||
para a referência da operação de Serviço Estendido (gerada
|
||||
e retornada do servidor).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>yaz_es</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
146
reference/yaz/functions/yaz-es.xml
Normal file
146
reference/yaz/functions/yaz-es.xml
Normal file
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-es" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>yaz_es</refname>
|
||||
<refpurpose>
|
||||
Prepara-se para uma solicitação de Serviço Estendido
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>yaz_es</methodname>
|
||||
<methodparam>
|
||||
<type>resource</type><parameter>id</parameter>
|
||||
</methodparam>
|
||||
<methodparam>
|
||||
<type>string</type><parameter>type</parameter>
|
||||
</methodparam>
|
||||
<methodparam>
|
||||
<type>array</type><parameter>args</parameter>
|
||||
</methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função prepara para uma Solicitação de Serviço Estendido.
|
||||
Serviços Estendidos são uma família de vários recursos do Z39.50, como
|
||||
atualização de registros, pedido de itens, administração de banco de dados, etc.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Muitos servidores Z39.50 não suportam Serviços Estendidos.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
A função <function>yaz_es</function> cria um pacote de solicitação de Serviço Estendido
|
||||
e o coloca em uma fila de operações.
|
||||
Use <function>yaz_wait</function> para enviar a(s) solicitação(ões) ao servidor.
|
||||
Após a conclusão de <function>yaz_wait</function>, o resultado
|
||||
da operação de Serviço Estendido deve ser esperado com
|
||||
uma chamada a <function>yaz_es_result</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Uma string que representa o tipo do Serviço Estendido:
|
||||
<literal>itemorder</literal> (Ordem de Item),
|
||||
<literal>create</literal> (Criação de Banco de Dados),
|
||||
<literal>drop</literal> (Remoção de Banco de Dados),
|
||||
<literal>commit</literal> (Operação de Confirmação),
|
||||
<literal>update</literal> (Atualização de Registro),
|
||||
<literal>xmlupdate</literal> (Atualização de XML).
|
||||
Cada tipo é especificado na seção a seguir.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>args</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Um array com opções de Serviços Estendidos, além de
|
||||
opções específicas do pacote. As opções são idênticas
|
||||
às oferecidas na API C do ZOOM C. Consulte
|
||||
os <link xlink:href="&url.yaz.zoom.ext;">Serviços Estendidos</link> do ZOOM.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>Atualização de Registro</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$con = yaz_connect("myhost/database");
|
||||
$args = array (
|
||||
"record" => "<gils><title>some title</title></gils>",
|
||||
"syntax" => "xml",
|
||||
"action" => "specialUpdate"
|
||||
);
|
||||
yaz_es($con, "update", $args);
|
||||
yaz_wait();
|
||||
$result = yaz_es_result($id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>yaz_es_result</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
81
reference/yaz/functions/yaz-get-option.xml
Normal file
81
reference/yaz/functions/yaz-get-option.xml
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-get-option" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_get_option</refname>
|
||||
<refpurpose>Retorna valor de opção para conexão</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>yaz_get_option</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Retorna o valor da opção especificada por <parameter>name</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O nome da opção.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Retorna o valor da opção especificada ou uma string vazia se a opção
|
||||
não foi definida.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member>
|
||||
Descrição de <function>yaz_set_option</function> para opções
|
||||
disponíveis
|
||||
</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
127
reference/yaz/functions/yaz-hits.xml
Normal file
127
reference/yaz/functions/yaz-hits.xml
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-hits" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_hits</refname>
|
||||
<refpurpose>Retorna o número de resultados da última pesquisa</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>yaz_hits</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter role="reference">searchresult</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>yaz_hits</function> retorna o número de resultados da última
|
||||
pesquisa.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>searchresult</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Array de resultados para informações detalhadas sobre os resultados da pesquisa.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Retorna o número de resultados da última pesquisa ou 0 se nenhuma pesquisa foi
|
||||
realizada.
|
||||
</para>
|
||||
<para>
|
||||
O array de resultados da pesquisa (se fornecido) contém informações que
|
||||
são retornadas por um servidor Z39.50 no formato SearchResult-1
|
||||
como parte de uma resposta de pesquisa.
|
||||
O formato SearchResult-1 pode ser usado para obter informações
|
||||
sobre contagens de acertos para várias partes da consulta (subconsulta).
|
||||
Em particular, é possível obter contagens de acertos para os termos de pesquisa
|
||||
individuais em uma consulta. As informações para a primeira
|
||||
subconsulta estão em $array[0], para a segunda subconsulta em $array[1] e assim por diante.
|
||||
</para>
|
||||
<table>
|
||||
<title>searchresult members</title>
|
||||
<tgroup cols="2">
|
||||
<colspec colwidth="1*" colname="element"/>
|
||||
<colspec colwidth="2*" colname="description"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Elemento</entry>
|
||||
<entry>Descrição</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal>id</literal></entry>
|
||||
<entry>ID2 da subconsulta (string)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>count</literal></entry>
|
||||
<entry>Contagem de resultados / acertos (inteiro)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>subquery.term</literal></entry>
|
||||
<entry>Termo da subconsulta (string)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>interpretation.term</literal></entry>
|
||||
<entry>Termo da subconsulta interpretado (string)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>recommendation.term</literal></entry>
|
||||
<entry>Termo da subconsulta recomendado (string)</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
<note>
|
||||
<para>
|
||||
O recurso SearchResult requer PECL YAZ 1.0.5
|
||||
ou posterior e YAZ 2.1.9 ou posterior.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<para>
|
||||
Muito poucas implementações do Z39.50 suportam o recurso SearchResult.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
175
reference/yaz/functions/yaz-itemorder.xml
Normal file
175
reference/yaz/functions/yaz-itemorder.xml
Normal file
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-itemorder" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>yaz_itemorder</refname>
|
||||
<refpurpose>
|
||||
Prepara-se para pedido de item Z39.50 com um pacote de solicitação ILL
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>yaz_itemorder</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>args</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função prepara uma solicitação de Serviços Estendidos usando o
|
||||
Perfil para Uso do Serviço Estendido de Pedido de Item Z39.50 para
|
||||
Transporte de ILL (Perfil/1). Consulte <link xlink:href="&url.yaz.ill;">este URL</link>
|
||||
e a <link xlink:href="&url.yaz.specs;">especificação</link>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>args</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Deve ser um array associativo com informações sobre a solicitação de Pedido de Item
|
||||
a ser enviada. A chave do hash é o nome do
|
||||
caminho da tag ASN.1 correspondente. Por exemplo, o ISBN abaixo do Item-ID
|
||||
tem a chave item-id,ISBN.
|
||||
</para>
|
||||
<para>
|
||||
Os parâmetros da solicitação ILL são:
|
||||
</para>
|
||||
<literallayout>
|
||||
protocol-version-num
|
||||
transaction-id,initial-requester-id,person-or-institution-symbol,person
|
||||
transaction-id,initial-requester-id,person-or-institution-symbol,institution
|
||||
transaction-id,initial-requester-id,name-of-person-or-institution,name-of-person
|
||||
transaction-id,initial-requester-id,name-of-person-or-institution,name-of-institution
|
||||
transaction-id,transaction-group-qualifier
|
||||
transaction-id,transaction-qualifier
|
||||
transaction-id,sub-transaction-qualifier
|
||||
service-date-time,this,date
|
||||
service-date-time,this,time
|
||||
service-date-time,original,date
|
||||
service-date-time,original,time
|
||||
requester-id,person-or-institution-symbol,person
|
||||
requester-id,person-or-institution-symbol,institution
|
||||
requester-id,name-of-person-or-institution,name-of-person
|
||||
requester-id,name-of-person-or-institution,name-of-institution
|
||||
responder-id,person-or-institution-symbol,person
|
||||
responder-id,person-or-institution-symbol,institution
|
||||
responder-id,name-of-person-or-institution,name-of-person
|
||||
responder-id,name-of-person-or-institution,name-of-institution
|
||||
transaction-type
|
||||
delivery-address,postal-address,name-of-person-or-institution,name-of-person
|
||||
delivery-address,postal-address,name-of-person-or-institution,name-of-institution
|
||||
delivery-address,postal-address,extended-postal-delivery-address
|
||||
delivery-address,postal-address,street-and-number
|
||||
delivery-address,postal-address,post-office-box
|
||||
delivery-address,postal-address,city
|
||||
delivery-address,postal-address,region
|
||||
delivery-address,postal-address,country
|
||||
delivery-address,postal-address,postal-code
|
||||
delivery-address,electronic-address,telecom-service-identifier
|
||||
delivery-address,electronic-address,telecom-service-addreess
|
||||
billing-address,postal-address,name-of-person-or-institution,name-of-person
|
||||
billing-address,postal-address,name-of-person-or-institution,name-of-institution
|
||||
billing-address,postal-address,extended-postal-delivery-address
|
||||
billing-address,postal-address,street-and-number
|
||||
billing-address,postal-address,post-office-box
|
||||
billing-address,postal-address,city
|
||||
billing-address,postal-address,region
|
||||
billing-address,postal-address,country
|
||||
billing-address,postal-address,postal-code
|
||||
billing-address,electronic-address,telecom-service-identifier
|
||||
billing-address,electronic-address,telecom-service-addreess
|
||||
ill-service-type
|
||||
requester-optional-messages,can-send-RECEIVED
|
||||
requester-optional-messages,can-send-RETURNED
|
||||
requester-optional-messages,requester-SHIPPED
|
||||
requester-optional-messages,requester-CHECKED-IN
|
||||
search-type,level-of-service
|
||||
search-type,need-before-date
|
||||
search-type,expiry-date
|
||||
search-type,expiry-flag
|
||||
place-on-hold
|
||||
client-id,client-name
|
||||
client-id,client-status
|
||||
client-id,client-identifier
|
||||
item-id,item-type
|
||||
item-id,call-number
|
||||
item-id,author
|
||||
item-id,title
|
||||
item-id,sub-title
|
||||
item-id,sponsoring-body
|
||||
item-id,place-of-publication
|
||||
item-id,publisher
|
||||
item-id,series-title-number
|
||||
item-id,volume-issue
|
||||
item-id,edition
|
||||
item-id,publication-date
|
||||
item-id,publication-date-of-component
|
||||
item-id,author-of-article
|
||||
item-id,title-of-article
|
||||
item-id,pagination
|
||||
item-id,ISBN
|
||||
item-id,ISSN
|
||||
item-id,additional-no-letters
|
||||
item-id,verification-reference-source
|
||||
copyright-complicance
|
||||
retry-flag
|
||||
forward-flag
|
||||
requester-note
|
||||
forward-note
|
||||
</literallayout>
|
||||
<para>
|
||||
Há também alguns parâmetros que fazem parte do pacote de Solicitação de Serviços Estendidos
|
||||
e do pacote ItemOrder:
|
||||
</para>
|
||||
<literallayout>
|
||||
package-name
|
||||
user-id
|
||||
contact-name
|
||||
contact-phone
|
||||
contact-email
|
||||
itemorder-item
|
||||
</literallayout>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
66
reference/yaz/functions/yaz-present.xml
Normal file
66
reference/yaz/functions/yaz-present.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-present" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_present</refname>
|
||||
<refpurpose>
|
||||
Prepara-se para recuperação (Z39,50 presente)
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>yaz_present</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função prepara a recuperação de registros após uma pesquisa bem-sucedida.
|
||||
</para>
|
||||
<para>
|
||||
A função <function>yaz_range</function> deve ser chamada antes desta
|
||||
função para especificar o intervalo de registros a serem recuperados.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
85
reference/yaz/functions/yaz-range.xml
Normal file
85
reference/yaz/functions/yaz-range.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-range" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_range</refname>
|
||||
<refpurpose>
|
||||
Especifica um intervalo de registros a serem recuperados
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>yaz_range</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>start</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Especifica um intervalo de registros a serem recuperados.
|
||||
</para>
|
||||
<para>
|
||||
Esta função deve ser chamada antes de <function>yaz_search</function> ou
|
||||
<function>yaz_present</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>start</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Especifica a posição do primeiro registro a ser recuperado.
|
||||
A numeração dos registros varia de 1 a <function>yaz_hits</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>number</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Especifica o número de registros a serem recuperados.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
305
reference/yaz/functions/yaz-record.xml
Normal file
305
reference/yaz/functions/yaz-record.xml
Normal file
@@ -0,0 +1,305 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: f9c4a68ef4f89e51e6d9b905ad3ddb6492386dd3 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-record" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>yaz_record</refname>
|
||||
<refpurpose>Retorna um registro</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>yaz_record</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pos</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>type</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
A função <function>yaz_record</function> inspeciona um registro no
|
||||
conjunto de resultados atual na posição especificada pelo parâmetro
|
||||
<parameter>pos</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pos</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A posição do registro. As posições dos registros em um conjunto de resultados são numeradas como 1,
|
||||
2, ... $hits, onde $hits é a contagem retornada por <function>yaz_hits</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>type</parameter> especifica o formato do
|
||||
registro retornado.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
É o aplicativo que é responsável por
|
||||
garantir que os registros sejam retornados do servidor Z39.50/SRW
|
||||
no formato correto. O tipo fornecido especifica apenas uma conversão
|
||||
a ser realizada no lado do cliente (em PHP/YAZ).
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
Além da conversão do registro de transferência para uma string/array, PHP/YAZ
|
||||
também é possível realizar uma conversão de conjunto de caracteres do
|
||||
registro. Especialmente para USMARC/MARC21, isso é recomendado, pois
|
||||
eles normalmente são retornados no conjunto de caracteres MARC-8,
|
||||
que não é suportado por navegadores, etc. Para especificar uma conversão, adicione
|
||||
<literal>; charset=</literal><replaceable>from</replaceable><literal>,
|
||||
</literal><replaceable>to</replaceable> onde
|
||||
<replaceable>from</replaceable> é o conjunto de caracteres original
|
||||
do registro e <replaceable>to</replaceable> é o conjunto de caracteres
|
||||
resultante (como visto pelo PHP).
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><literal>string</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O registro é retornado como uma string para facilitar a exibição.
|
||||
Neste modo, todos os registros MARC são convertidos para o formato linha por linha,
|
||||
já que o ISO2709 é dificilmente legível.
|
||||
Registros XML e SUTRS são retornados em seu formato original.
|
||||
GRS-1 são retornados em um formato (horrível) linha por linha.
|
||||
</para>
|
||||
<para>
|
||||
Este formato é adequado se os registros devem ser exibidos de forma rápida
|
||||
- para depuração - ou porque não é viável realizar
|
||||
uma exibição adequada.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>xml</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O registro é retornado como uma string XML, se possível.
|
||||
Neste modo, todos os registros MARC são convertidos para
|
||||
<link xlink:href="&url.yaz-marcxml;">MARCXML</link>.
|
||||
Registros XML e SUTRS são retornados em seu formato original.
|
||||
GRS-1 não é suportado.
|
||||
</para>
|
||||
<para>
|
||||
Este formato é semelhante a <parameter>string</parameter>, exceto que
|
||||
os registros MARC são convertidos para MARCXML.
|
||||
</para>
|
||||
<para>
|
||||
Este formato é adequado se os registros forem processados posteriormente por um analisador XML
|
||||
ou processador XSLT.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>raw</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O registro é retornado como uma string em seu formato original.
|
||||
Este tipo é adequado para MARC, XML e SUTRS. Não funciona
|
||||
para GRS-1.
|
||||
</para>
|
||||
<para>
|
||||
Os registros MARC são retornados como uma string ISO2709. XML e SUTRS são
|
||||
retornados como strings.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>syntax</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A sintaxe do registro é retornada como uma string, ou seja,
|
||||
<literal>USmarc</literal>, <literal>GRS-1</literal>,
|
||||
<literal>XML</literal>, etc.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>database</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O nome do banco de dados associado ao registro na posição
|
||||
é retornado como uma string.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>array</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O registro é retornado como um array que reflete a estrutura GRS-1.
|
||||
Este tipo é adequado para MARC e GRS-1. XML e SUTRS não são
|
||||
suportados e, se o registro real for XML ou SUTRS, uma string
|
||||
vazia será retornada.
|
||||
</para>
|
||||
<para>
|
||||
O array retornado consiste em uma lista correspondente a
|
||||
cada folha/nó interno do GRS-1. Cada item da lista consiste em
|
||||
uma sublista com o primeiro elemento <emphasis>caminho</emphasis> e
|
||||
<emphasis>dados</emphasis> (se houver dados disponíveis).
|
||||
</para>
|
||||
<para>
|
||||
O caminho, que é uma string, contém uma lista de cada componente da árvore (do
|
||||
registro GRS-1 estruturado) da raiz à folha. Cada componente é
|
||||
um par de tipo de tag e valor de tag no formato
|
||||
<literal>(</literal><replaceable>type</replaceable><literal>,</literal>
|
||||
<replaceable>value</replaceable>.
|
||||
</para>
|
||||
<para>
|
||||
As tags de string normalmente têm uma tag correspondente do tipo 3.
|
||||
MARC também pode ser retornado como um array (eles são convertidos para
|
||||
GRS-1 internamente).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Retorna o registro na posição <parameter>pos</parameter> ou uma string
|
||||
vazia se não houver nenhum registro na posição fornecida.
|
||||
</para>
|
||||
<para>
|
||||
Se nenhum registro de banco de dados existir na posição fornecida, uma string vazia será
|
||||
retornada.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>Array para registro GRS-1</title>
|
||||
<para>
|
||||
Considere este registro GRS-1:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
(4,52)Robert M. Pirsig
|
||||
(4,70)
|
||||
(4,90)
|
||||
(2,7)Transworld Publishers, ltd.
|
||||
]]>
|
||||
</screen>
|
||||
Este registro possui dois nós no nível raiz. O primeiro elemento no nível raiz é
|
||||
(4,52) [tipo de tag 4, valor de tag 52] e contém dados <literal>Robert M.
|
||||
Pirsig</literal>. O segundo elemento no nível raiz (4,70) possui uma subárvore com
|
||||
um único elemento (4,90). (4,90) possui ainda outra subárvore (2,7) com dados
|
||||
<literal>Transworld Publishers, ltd.</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Se este registro estiver presente na posição $p, então
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$ar = yaz_record($id, $p, "array");
|
||||
print_r($ar);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
irá produzir:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[0] => (4,52)
|
||||
[1] => Robert M. Pirsig
|
||||
)
|
||||
[1] => Array
|
||||
(
|
||||
[0] => (4,70)
|
||||
)
|
||||
[2] => Array
|
||||
(
|
||||
[0] => (4,70)(4,90)
|
||||
)
|
||||
[3] => Array
|
||||
(
|
||||
[0] => (4,70)(4,90)(2,7)
|
||||
[1] => Transworld Publishers, ltd.
|
||||
)
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
</example>
|
||||
<example>
|
||||
<title>Trabalhando com MARCXML</title>
|
||||
<para>
|
||||
O seguinte trecho de código PHP retorna um registro MARC21/USMARC como MARCXML.
|
||||
O registro original é retornado em marc-8 (desconhecido pela maioria dos analisadores XML),
|
||||
então o convertemos para UTF-8 (que todos os analisadores XML devem suportar).
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$rec = yaz_record($id, $p, "xml; charset=marc-8,utf-8");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
O registro <literal>$rec</literal> pode ser processado com o
|
||||
processador Sablotron XSLT da seguinte forma:
|
||||
</para>
|
||||
<para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$xslfile = 'display.xsl';
|
||||
$processor = xslt_create();
|
||||
$parms = array('/_xml' => $rec);
|
||||
$res = xslt_process($processor, 'arg:/_xml', $xslfile, NULL, $parms);
|
||||
xslt_free($processor);
|
||||
$res = preg_replace("'</?html[^>]*>'", '', $res);
|
||||
echo $res;
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
96
reference/yaz/functions/yaz-scan-result.xml
Normal file
96
reference/yaz/functions/yaz-scan-result.xml
Normal file
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-scan-result" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_scan_result</refname>
|
||||
<refpurpose>Retorna o resultado da resposta da Varredura</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>yaz_scan_result</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter role="reference">result</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>yaz_scan_result</function> retorna termos e informações
|
||||
associadas conforme recebidos do servidor no último <function>yaz_scan</function>
|
||||
realizado.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>result</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Se fornecido, este array será modificado para conter informações adicionais
|
||||
obtidas da Resposta da Varredura:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>number</literal> - Número de entradas retornadas
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>stepsize</literal> - Tamanho do passo
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>position</literal> - Posição do termo
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>status</literal> - Status da varredura
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Retorna um array (0..n-1) onde n é o número de termos retornados. Cada
|
||||
valor é um par onde o primeiro item é o termo e o segundo item é
|
||||
a contagem de resultados.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
145
reference/yaz/functions/yaz-scan.xml
Normal file
145
reference/yaz/functions/yaz-scan.xml
Normal file
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-scan" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_scan</refname>
|
||||
<refpurpose>Prepara para uma varredura</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>yaz_scan</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>type</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>startterm</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função prepara para uma Solicitação de Varredura Z39.50 na conexão
|
||||
especificada.
|
||||
</para>
|
||||
<para>
|
||||
Para transferir a Solicitação de Varredura para o servidor e receber a
|
||||
Resposta de Varredura, <function>yaz_wait</function> deve ser chamada. Após
|
||||
a conclusão de <function>yaz_wait</function>, chame
|
||||
<function>yaz_error</function> e <function>yaz_scan_result</function> para
|
||||
manipular a resposta.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Atualmente, somente o tipo <literal>rpn</literal> é suportado.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>startterm</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Ponto inicial do termo para a varredura.
|
||||
</para>
|
||||
<para>
|
||||
A forma como o termo inicial é especificado é dada pelo parâmetro
|
||||
<parameter>type</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
A sintaxe deste parâmetro é semelhante à da consulta RPN, conforme descrito em
|
||||
<function>yaz_search</function>. Consiste em zero ou mais especificações do
|
||||
operador <literal>@attr</literal>, seguidas por
|
||||
exatamente um token.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Este parâmetro opcional especifica informações adicionais para controlar
|
||||
o comportamento da solicitação de varredura. Três índices são lidos atualmente
|
||||
deste array de sinalizadores:
|
||||
<literal>number</literal> (número de termos solicitados),
|
||||
<literal>position</literal> (posição preferencial do termo) e
|
||||
<literal>stepSize</literal> (tamanho preferencial do passo).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Função PHP que verifica títulos</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
function scan_titles($id, $startterm)
|
||||
{
|
||||
yaz_scan($id, "rpn", "@attr 1=4 " . $startterm);
|
||||
yaz_wait();
|
||||
$errno = yaz_errno($id);
|
||||
if ($errno == 0) {
|
||||
$ar = yaz_scan_result($id, $options);
|
||||
echo 'Scan ok; ';
|
||||
foreach ($options as $key => $val) {
|
||||
echo "$key = $val ";
|
||||
}
|
||||
echo '<br /><table>';
|
||||
while (list($key, list($k, $term, $tcount)) = each($ar)) {
|
||||
if (empty($k)) continue;
|
||||
echo "<tr><td>$term</td><td>$tcount</td></tr>";
|
||||
}
|
||||
echo '</table>';
|
||||
} else {
|
||||
echo "Scan failed. Error: " . yaz_error($id) . "<br />";
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
78
reference/yaz/functions/yaz-schema.xml
Normal file
78
reference/yaz/functions/yaz-schema.xml
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-schema" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_schema</refname>
|
||||
<refpurpose>
|
||||
Especifica o esquema para recuperação
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>yaz_schema</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>schema</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>yaz_schema</function> especifica o esquema para recuperação.
|
||||
</para>
|
||||
<para>
|
||||
Esta função deve ser chamada antes de
|
||||
<function>yaz_search</function> ou <function>yaz_present</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>schema</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Deve ser especificado como um OID (Identificador de Objeto) em uma notação de ponto bruta
|
||||
(como <literal>1.2.840.10003.13.4</literal>) ou como um dos esquemas
|
||||
registrados conhecidos: <literal>GILS-schema</literal>,
|
||||
<literal>Holdings</literal>, <literal>Zthes</literal>, ...
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
205
reference/yaz/functions/yaz-search.xml
Normal file
205
reference/yaz/functions/yaz-search.xml
Normal file
@@ -0,0 +1,205 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-search" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>yaz_search</refname>
|
||||
<refpurpose>Prepara para uma busca</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>yaz_search</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>type</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>query</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>yaz_search</function> prepara uma busca na conexão
|
||||
fornecida.
|
||||
</para>
|
||||
<para>
|
||||
Assim como <function>yaz_connect</function>, esta função não é bloqueante e
|
||||
apenas prepara uma pesquisa a ser executada posteriormente quando
|
||||
<function>yaz_wait</function> for chamada.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Este parâmetro representa o tipo de consulta - apenas <literal>"rpn"</literal>
|
||||
é suportado atualmente, caso em que o terceiro argumento especifica uma consulta do Tipo 1
|
||||
na notação de consulta prefixada.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>query</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A consulta RPN é uma representação textual da consulta Tipo 1, conforme
|
||||
definida pelo padrão Z39.50. No entanto, na representação textual
|
||||
usada pelo YAZ, é utilizada uma notação de prefixo, ou seja, o operador
|
||||
precede os operandos. A string de consulta é uma sequência de tokens onde
|
||||
espaços em branco são ignorados, a menos que estejam entre aspas duplas. Tokens que começam
|
||||
com um caractere arroba (<literal>@</literal>) são considerados operadores,
|
||||
caso contrário, são tratados como termos de pesquisa.
|
||||
</para>
|
||||
<table>
|
||||
<title>Operadores RPN</title>
|
||||
<tgroup cols="2">
|
||||
<colspec colwidth="1*" colname="construct"/>
|
||||
<colspec colwidth="2*" colname="description"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Construção</entry>
|
||||
<entry>Descrição</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal>@and</literal> consulta1 consulta2</entry>
|
||||
<entry>intersecção de consulta1 e consulta2</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>@or</literal> consulta1 consulta2</entry>
|
||||
<entry>união de consulta1 e consulta2</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>@not</literal> consulta1 consulta2</entry>
|
||||
<entry>consulta1 e não consulta2</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>@set</literal> nome</entry>
|
||||
<entry>referência de conjunto de resultados</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>@attrset</literal> consulta de definição</entry>
|
||||
<entry>
|
||||
especifica definição de atributo para a consulta. Esta construção é permitida somente
|
||||
uma vez - no início da consulta completa
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>@attr</literal> [set] tipo=valor consulta</entry>
|
||||
<entry>
|
||||
aplica atributo à consulta. O tipo e o valor são inteiros
|
||||
especificando o tipo e o valor do atributo, respectivamente.
|
||||
O conjunto, se fornecido, especifica o conjunto de atributos.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
<para>
|
||||
Pode-se encontrar informações sobre atributos no site
|
||||
<link xlink:href="&url.yaz-loc-bib1;">Z39.50 Maintenance
|
||||
Agency</link>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Se desejar usar uma notação mais amigável,
|
||||
use o analisador CCL - funções <function>yaz_ccl_conf</function> e
|
||||
<function>yaz_ccl_parse</function>.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>Exemplos de consulta</title>
|
||||
<para>
|
||||
Pode-se pesquisar por termos simples, como este:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
computer
|
||||
]]>
|
||||
</screen>
|
||||
que corresponde a documentos onde existe a ocorrência de "computer". Nenhum atributo é
|
||||
especificado.
|
||||
</para>
|
||||
<para>
|
||||
A consulta
|
||||
<screen>
|
||||
<![CDATA[
|
||||
"knuth donald"
|
||||
]]>
|
||||
</screen>
|
||||
corresponde a documentos onde "knuth donald" ocorre (desde que o
|
||||
servidor suporte pesquisa de frase).
|
||||
</para>
|
||||
<para>
|
||||
Esta consulta aplica dois atributos para a mesma frase.
|
||||
<screen>@attr 1=1003 @attr 4=1 "knuth donald"</screen>
|
||||
O primeiro atributo é do tipo 1 (uso Bib-1), o valor do atributo é 1003
|
||||
(Autor).
|
||||
O segundo atributo é do tipo 4 (estrutura), o valor é 1 (frase),
|
||||
portanto, deve corresponder a documentos em que Donald Knuth é o autor.
|
||||
</para>
|
||||
<para>
|
||||
A consulta
|
||||
<screen>
|
||||
<![CDATA[
|
||||
@and @or a b @not @or c d e
|
||||
]]>
|
||||
</screen>
|
||||
ficaria em notação infixa como <literal>(a or b) and ((c or d) not
|
||||
e)</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Outra, mais complexa:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
@attrset gils @and @attr 1=4 art @attr 1=2000 company
|
||||
]]>
|
||||
</screen>
|
||||
A consulta como um todo utiliza o conjunto de atributos GILS. A consulta corresponde a
|
||||
documentos em que <literal>art</literal> ocorre no título (GILS,BIB-1)
|
||||
e em que <literal>company</literal> ocorre como Distribuidor (GILS).
|
||||
</para>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
160
reference/yaz/functions/yaz-set-option.xml
Normal file
160
reference/yaz/functions/yaz-set-option.xml
Normal file
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-set-option" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_set_option</refname>
|
||||
<refpurpose>Define uma ou mais opções de conexão</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>yaz_set_option</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>yaz_set_option</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>options</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Define uma ou mais opções de conexão.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter> ou <parameter>options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Pode ser uma string ou um array.
|
||||
</para>
|
||||
<para>
|
||||
Se fornecido como uma string, este será o nome da opção a ser definida. Será
|
||||
necessário informar o valor em <parameter>value</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
Se fornecido como um array, será um array associativo (nome da opção
|
||||
=> valor da opção).
|
||||
</para>
|
||||
<table>
|
||||
<title>Opções de conexão PHP/YAZ</title>
|
||||
<tgroup cols="2">
|
||||
<colspec colwidth="2*" colname="name"/>
|
||||
<colspec colwidth="5*" colname="description"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Nome</entry>
|
||||
<entry>Descrição</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>implementationName</entry>
|
||||
<entry>Nome de implementação do servidor.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>implementationVersion</entry>
|
||||
<entry>Versão de implementação do servidor.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>implementationId</entry>
|
||||
<entry>ID de implementação do servidor.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>schema</entry>
|
||||
<entry>
|
||||
Esquema para recuperação. Por padrão, nenhum esquema é usado. Definir esta
|
||||
opção é equivalente a usar a função
|
||||
<function>yaz_schema</function>.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>preferredRecordSyntax</entry>
|
||||
<entry>
|
||||
Sintaxe de registro para recuperação. Por padrão, nenhuma sintaxe é usada. Definir
|
||||
esta opção é equivalente a usar a função
|
||||
<function>yaz_syntax</function>.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>start</entry>
|
||||
<entry>
|
||||
Deslocamento para o primeiro registro a ser recuperado via
|
||||
<function>yaz_search</function> ou <function>yaz_present</function>.
|
||||
O primeiro registro é numerado com valor inicial 0. O segundo registro tem
|
||||
valor inicial 1.
|
||||
Definir esta opção em combinação com a opção
|
||||
<literal>count</literal> tem o mesmo efeito que chamar
|
||||
<function>yaz_range</function>, exceto que os registros são
|
||||
numerados a partir de 1 em <function>yaz_range</function>.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>count</entry>
|
||||
<entry>Número máximo de registros a serem recuperados via
|
||||
<function>yaz_search</function> ou <function>yaz_present</function>.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>elementSetName</entry>
|
||||
<entry>Nome do conjunto de elementos para recuperação. Definir esta opção é
|
||||
equivalente a chamar <function>yaz_element</function>.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O novo valor da opção. Use este somente se o argumento anterior for
|
||||
uma string.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
146
reference/yaz/functions/yaz-sort.xml
Normal file
146
reference/yaz/functions/yaz-sort.xml
Normal file
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-sort" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_sort</refname>
|
||||
<refpurpose>Define critérios de classificação</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>yaz_sort</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>criteria</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função define critérios de classificação e habilita a classificação Z39.50.
|
||||
</para>
|
||||
<para>
|
||||
Chame esta função <emphasis>antes</emphasis> de <function>yaz_search</function>.
|
||||
Usar esta função sozinha não tem efeito algum. Quando usada em conjunto
|
||||
com <function>yaz_search</function>, uma ordenação Z39.50 será enviada após
|
||||
uma resposta de pesquisa ser recebida e antes que quaisquer registros sejam recuperados com
|
||||
Z39.50 Present (<function>yaz_present</function>).
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>criteria</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Uma string que assume o formato <replaceable>field1 flags1 field2
|
||||
flags2</replaceable> onde field1 especifica os atributos primários para
|
||||
ordenação, field2 os secundários, etc.
|
||||
</para>
|
||||
<para>
|
||||
O campo especifica uma combinação de atributos numéricos consistindo
|
||||
de pares tipo=valor separados por vírgula (por exemplo, <literal>1=4,2=1</literal>);
|
||||
ou o campo pode especificar um critério de string simples (por exemplo,
|
||||
<literal>title</literal>. Os sinalizadores são uma sequência dos seguintes
|
||||
caracteres que não podem ser separados por nenhum espaço em branco.
|
||||
</para>
|
||||
<para>
|
||||
<variablelist>
|
||||
<title>Sinalizadores de Ordenação</title>
|
||||
<varlistentry>
|
||||
<term><literal>a</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Ordem ascendente
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>d</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Ordem descendente
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>i</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Ordenação insensível a maiúsculas/minúsculas
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>s</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Ordenação sensível a maiúsculas/minúsculas
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>Critérios de Ordenação</title>
|
||||
<para>
|
||||
Para classificar pelo título do atributo Bib1, sem diferenciação de maiúsculas e minúsculas e em ordem crescente, seriam
|
||||
usados os seguintes critérios de ordenação:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
1=4 ia
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
Se os critérios de ordenação secundários forem autor, diferenciação entre maiúsculas e minúsculas e
|
||||
ordem crescente, seria usado:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
1=4 ia 1=1003 sa
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
78
reference/yaz/functions/yaz-syntax.xml
Normal file
78
reference/yaz/functions/yaz-syntax.xml
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-syntax" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_syntax</refname>
|
||||
<refpurpose>
|
||||
Especifica a sintaxe de registro preferida para recuperação
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>yaz_syntax</methodname>
|
||||
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>syntax</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>yaz_syntax</function> especifica a sintaxe de registro preferida para
|
||||
recuperação.
|
||||
</para>
|
||||
<para>
|
||||
Esta função deve ser chamada antes de <function>yaz_search</function> ou
|
||||
<function>yaz_present</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O recurso de conexão retornado por <function>yaz_connect</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>syntax</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A sintaxe deve ser especificada como um OID (Identificador de Objeto) em uma
|
||||
notação de ponto bruta (como <literal>1.2.840.10003.5.10</literal>) ou como uma das
|
||||
sintaxes de registros cadastradas conhecidas (sutrs, usmarc, grs1, xml, etc.).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
89
reference/yaz/functions/yaz-wait.xml
Normal file
89
reference/yaz/functions/yaz-wait.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
|
||||
<refentry xml:id="function.yaz-wait" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>yaz_wait</refname>
|
||||
<refpurpose>Aguarda a conclusão das solicitações Z39.50</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>yaz_wait</methodname>
|
||||
<methodparam choice="opt"><type>array</type><parameter role="reference">options</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Esta função realiza atividades em rede (bloqueadas) para solicitações pendentes
|
||||
que foram preparadas pelas funções
|
||||
<function>yaz_connect</function>, <function>yaz_search</function>,
|
||||
<function>yaz_present</function>, <function>yaz_scan</function> e
|
||||
<function>yaz_itemorder</function>.
|
||||
</para>
|
||||
<para>
|
||||
<function>yaz_wait</function> retorna quando todos os servidores
|
||||
concluíram todas as solicitações ou abortaram (em caso de erros).
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O array associativo de opções:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><literal>timeout</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Define o tempo limite em segundos. Se um servidor não responder dentro do
|
||||
tempo limite, ele será considerado inativo e <function>yaz_wait</function>
|
||||
retornará. O valor padrão para o tempo limite é 15 segundos.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>event</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Um booleano.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
No modo de evento, retorna um recurso &return.falseforfailure;.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
Reference in New Issue
Block a user