Submitted by Christiaan Kortekaas, UQ:
Ok for fez I CAN split up objects to collections but note that in fez an
object can belong to many collections so perhaps this breaks your model
thinking to start with.
As you can see from the aons 1 fedora + fez code from when the other guy
(soz forgot his name - another david??) came up for the 1 day to make it
work it would need the existing db params to call fedora for the object
paths - and another set of db config vars for the fez db (which might be
mysql while fedora is pg). Also the sql for finding out collection
membership would have to be in the config as this will change with fez 2 (or
with a 3.0/4.0 if that happens - eg we might move to lucene).
I had a look at the ExampeFormatScan.xml and that looks like it would be
more work than just having an optional additional 'fez db settings +
collection membership sql var' for fedora repos.
For now I would say - just make it work for one fedora = one collection then
let me know what you would think about making the fez db + fez sql config
var settings in the interface. Should be easy right?
I'm not sure but I think you would want the sql to ask what the parent
collection title and pid (object ID) is right? So the sql config would have
to have a bit where you could have a $pid for the child.
EG in Fez 2 the function (with sql in it) llooks like this:
function getParents($pid, $clearcache=false, $searchKey='isMemberOf')
{
$sek_title = Search_Key::makeSQLTableName($searchKey);
$stmt = "SELECT ".APP_SQL_CACHE."
m1.rek_".$sek_title."
FROM
" . APP_TABLE_PREFIX . "record_search_key_".$sek_title."
m1
WHERE m1.rek_".$sek_title."_pid = '".$pid."'";
$res = $GLOBALS["db_api"]->dbh->getCol($stmt);
if (PEAR::isError($res)) {
Error_Handler::logError(array($res->getMessage(),
$res->getDebugInfo()), __FILE__, __LINE__);
} else {
return $res;
}
}
Logged In: YES
user_id=1103084
Originator: YES
Further comment from Christiaan Kortekaas, UQ:
Sorry - the sql for fez 2 to get the parent pid and title would be this:
$stmt = "SELECT ".APP_SQL_CACHE."
r1.rek_pid, r1.rek_title
FROM
" . APP_TABLE_PREFIX . "record_search_key r1 inner join
" . APP_TABLE_PREFIX . "record_search_key_".$sek_title."
m1 on r1.rek_pid = m1.rek_".$sek_title." AND m1.rek_".$sek_title."_pid =
'".$pid."'";
So obviously it needs to take into the function the $pid of the object we
are trying to file the parents of.
Still very simple.