From: Keith M. - C. A. of R. L. <ke...@co...> - 2007-03-13 18:05:58
|
Hi Matt - I am not trying to reindex Fez objects, I am trying to index generic Fedora Objects that are not yet in Fez. I took a look at class.reindex.php but solved this problem the following way : In the file manage/indexfedora.php:74 CHANGE : if (!empty($HTTP_POST_VARS["go_list"])) { TO : if (!empty($HTTP_POST_VARS["items"])) { I suspect the Fez test team might want to check this one to see if indeed there is a problem - perhaps worthy of patching, if it is. Many folks using home grown tools to create Fedora objects, may find the indexing feature indispensable if they want to use Fez as a front end. Thanks, K:M -----Original Message----- From: fez...@li... [mailto:fez...@li...] On Behalf Of Matthew Smith Sent: Monday, March 12, 2007 7:30 PM To: fez...@li... Subject: Re: [Fez-users] Indexing Fedora Objects Into Fez? Hi Keith, When reindexing, you need to supply the default values for the communities, collection and content model mapping for the objects that fez finds. If fez can't find this information in the datastreams, it will use the values supplied in the form. But I assume you got that far. To help me understand where it is going wrong, can you add some debugging? The file is include/class.reindex.php and the function is called indexFezFedoraObjects on line 247 Add in the Error_Handler statements as shown, then run the indexing and send me an error log: function indexFezFedoraObjects($params = array()) { global $HTTP_POST_VARS; if (empty($params)) { $params = &$HTTP_POST_VARS; } $items = @$params["items"]; $xdis_id = @$params["xdis_id"]; $sta_id = @$params["sta_id"]; $community_pid = @$params["community_pid"]; $collection_pid = @$params["collection_pid"]; Error_Handler::logError($items, __FILE__, __LINE__); Error_Handler::logError($xdis_id, __FILE__, __LINE__); Error_Handler::logError($sta_id, __FILE__, __LINE__); Error_Handler::logError($community_pid, __FILE__, __LINE__); Error_Handler::logError($collection_pid, __FILE__, __LINE__); foreach ($items as $pid) { // determine if the record is a Fez record if (!Fedora_API::datastreamExists($pid, 'FezMD')) { $relsext = Reindex::buildRELSEXT($collection_pid, $pid); $fezmd = Reindex::buildFezMD($xdis_id, $sta_id); if (Fedora_API::datastreamExists($pid, "RELS-EXT")) { Fedora_API::callModifyDatastreamByValue($pid, "RELS-EXT", "A", "Relationships to other objects", $relsext, "text/xml", true); } else { Fedora_API::getUploadLocation($pid, "RELS-EXT", $relsext, "Relationships to other objects", "text/xml", "X"); } if (Fedora_API::datastreamExists($pid, "FezMD")) { Fedora_API::callModifyDatastreamByValue($pid, "FezMD", "A", "Fez extension metadata", $fezmd, "text/xml", true); } else { Fedora_API::getUploadLocation($pid, "FezMD", $fezmd, "Fez extension metadata", "text/xml", "X"); } } // need to rebuild presmd and image datastreams // get list of datastreams and iterate over them $ds = Fedora_API::callGetDatastreams($pid); Error_Handler::logError($ds , __FILE__, __LINE__); foreach ($ds as $dsKey => $dsTitle) { $dsIDName = $dsTitle['ID']; if ($dsTitle['controlGroup'] == "M" && !Misc::hasPrefix($dsIDName, 'preview_') && !Misc::hasPrefix($dsIDName, 'web_') && !Misc::hasPrefix($dsIDName, 'thumbnail_') ) { $new_dsID = Foxml::makeNCName($dsIDName); // get the datastream into a file where we can do stuff to it $urldata = APP_FEDORA_GET_URL."/".$pid."/".$dsIDName; $urlReturn = Misc::ProcessURL($urldata); $handle = fopen(APP_TEMP_DIR.$new_dsID, "w"); fwrite($handle, $urlReturn[0]); fclose($handle); // delete and re-ingest - need to do this because sometimes the object made it // into the repository even though its dsID is illegal. Fedora_API::callPurgeDatastream($pid, $dsIDName); Fedora_API::getUploadLocationByLocalRef($pid, $new_dsID, APP_TEMP_DIR.$new_dsID, $new_dsID, $dsTitle['MIMEType'], "M"); Record::generatePresmd($pid, $new_dsID); Workflow::processIngestTrigger($pid, $new_dsID, $dsTitle['MIMEType']); if (is_file(APP_TEMP_DIR.$dsIDName)) { unlink(APP_TEMP_DIR.$dsIDName); } } } Record::setIndexMatchingFields($pid); } if (PEAR::isError($res)) { Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); return false; } else { return true; } } Matt On 3/13/07, Keith Maull - Colorado Alliance of Research Libraries <ke...@co...> wrote: > > > > > Does anyone use this feature? If so, can someone please help! I have > recently upgrade from 1.3RC2 to the final release, and I still cannot get > this feature to work - in fact it "sort of" worked in RC2, but now instead > of an error when I try to index the selected Fedora object, it just > refreshes the screen - no warnings, errors, alerts - it just seems to ignore > what I have asked it to do. > > > > I have tried this on a vanilla flavored Fedora Object . it's basically an > empty object with a Label "Test Object". Nothing special - no > disseminators, no additional datastreams, just a label. Each time I try to > index it into Fez - same response : nothing. > > > > Is anyone out there having this problem? If so, how is it solved? It is > critical that I get Fez 1.3 to work with Fedora objects that are created > outside of Fez. > > > > K:M > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Fez-users mailing list > Fez...@li... > https://lists.sourceforge.net/lists/listinfo/fez-users > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Fez-users mailing list Fez...@li... https://lists.sourceforge.net/lists/listinfo/fez-users |