<<

NAME

C4::AuthoritiesMarc

GetAuthMARCFromKohaField

  ( $tag, $subfield ) = &GetAuthMARCFromKohaField ($kohafield,$authtypecode);

returns tag and subfield linked to kohafield

Comment : Suppose Kohafield is only linked to ONE subfield

SearchAuthorities

  (\@finalresult, $nbresults)= &SearchAuthorities($tags, $and_or, 
     $excluding, $operator, $value, $offset,$length,$authtypecode,$sortby)

returns ref to array result and count of results returned

CountUsage

  $count= &CountUsage($authid)

counts Usage of Authid in bibliorecords.

CountUsageChildren

  $count= &CountUsageChildren($authid)

counts Usage of narrower terms of Authid in bibliorecords.

GetAuthTypeCode

  $authtypecode= &GetAuthTypeCode($authid)

returns authtypecode of an authid

GuessAuthTypeCode

  my $authtypecode = GuessAuthTypeCode($record);

Get the record and tries to guess the adequate authtypecode from its content.

GuessAuthId

  my $authtid = GuessAuthId($record);

Get the record and tries to guess the adequate authtypecode from its content.

GetTagsLabels

  $tagslabel= &GetTagsLabels($forlibrarian,$authtypecode)

returns a ref to hashref of authorities tag and subfield structure.

tagslabel usage :

  $tagslabel->{$tag}->{$subfield}->{'attribute'}

where attribute takes values in :

  lib
  tab
  mandatory
  repeatable
  authorised_value
  authtypecode
  value_builder
  kohafield
  seealso
  hidden
  isurl
  link

AddAuthority

  $authid= &AddAuthority($record, $authid,$authtypecode)

Either Create Or Modify existing authority. returns authid of the newly created authority

DelAuthority

  $authid= &DelAuthority($authid)

Deletes $authid

GetAuthorityXML

  $marcxml= &GetAuthorityXML( $authid)

returns xml form of record $authid

GetAuthority

  $record= &GetAuthority( $authid)

Returns MARC::Record of the authority passed in parameter.

GetAuthType

  $result = &GetAuthType($authtypecode)

If the authority type specified by $authtypecode exists, returns a hashref of the type's fields. If the type does not exist, returns undef.

FindDuplicateAuthority

  $record= &FindDuplicateAuthority( $record, $authtypecode)

return $authid,Summary if duplicate is found.

Comments : an improvement would be to return All the records that match.

BuildSummary

  $text= &BuildSummary( $record, $authid, $authtypecode)

return HTML encoded Summary

Comment : authtypecode can be infered from both record and authid. Moreover, authid can also be inferred from $record. Would it be interesting to delete those things.

BuildUnimarcHierarchies

  $text= &BuildUnimarcHierarchies( $authid, $force)

return text containing trees for hierarchies for them to be stored in auth_header

Example of text: 122,1314,2452;1324,2342,3,2452

BuildUnimarcHierarchy

  $ref= &BuildUnimarcHierarchy( $record, $class,$authid)

return a hashref in order to display hierarchy for record and final Authid $authid

"loopparents" "loopchildren" "class" "loopauthid" "current_value" "value"

"ifparents" "ifchildren" Those two latest ones should disappear soon.

GetHeaderAuthority

  $ref= &GetHeaderAuthority( $authid)

return a hashref in order auth_header table data

AddAuthorityTrees

  $ref= &AddAuthorityTrees( $authid, $trees)

return success or failure

merge

  $ref= &merge(mergefrom,$MARCfrom,$mergeto,$MARCto)

Could add some feature : Migrating from a typecode to an other for instance. Then we should add some new parameter : bibliotargettag, authtargettag

get_auth_type_location

  my ($tag, $subfield) = get_auth_type_location($auth_type_code);

Get the tag and subfield used to store the heading type for indexing purposes. The $auth_type parameter is optional; if it is not supplied, assume ''.

This routine searches the MARC authority framework for the tag and subfield whose kohafield is auth_header.authtypecode; if no such field is defined in the framework, default to the hardcoded value specific to the MARC format.

AUTHOR

Koha Development Team <info@koha.org>

Paul POULAIN paul.poulain@free.fr

<<