Exemplo n.º 1
0
 static function getRIQueryResults($pid, $query)
 {
     return get_RIQueryResults($pid, $query);
 }
Exemplo n.º 2
0
 static function getROIListForImage($image_pid)
 {
     if ($image_pid != null && $image_pid != '') {
         $query_string = 'select $roiMember
                    from <#ri>
                    where $roiMember <fedora-rels-ext:isMemberOf> <info:fedora/' . $image_pid . '>';
         $ROI_results_Dom = get_RIQueryResults($image_pid, $query_string);
         $ROI_results_Dom = new SimpleXMLElement($ROI_results_Dom);
         $list = array();
         foreach ($ROI_results_Dom->xpath('//@uri') as $uri) {
             $temp_pid = substr(strstr($uri, '/'), 1);
             if (strpos($temp_pid, 'ap-roi:') > -1) {
                 array_push($list, $temp_pid);
             }
         }
         return $list;
     } else {
         return false;
     }
 }
Exemplo n.º 3
0
 static function getROIandParentsList()
 {
     $query_string = 'select $member $imgMember $roiMember ';
     $query_string .= 'from   <#ri> ';
     $query_string .= 'where  $member <fedora-rels-ext:isMemberOf> <info:fedora/apiary:SpecimenBinders> ';
     $query_string .= 'and    $imgMember <fedora-rels-ext:isMemberOf> $member ';
     $query_string .= 'and    $roiMember <fedora-rels-ext:isMemberOf> $imgMember';
     $ROIandParents_results = get_RIQueryResults('apiary:SpecimenBinders', $query_string);
     $ROIandParents_results = new SimpleXMLElement($ROIandParents_results);
     $ROIfamilyList = array();
     $ROIfamily;
     foreach ($ROIandParents_results->xpath('//@uri') as $uri) {
         $result = substr(strstr($uri, '/'), 1);
         if (strpos($result, 'ap-specimen:') > -1) {
             $ROIfamily['specimen_pid'] = $result;
         }
         if (strpos($result, 'ap-image:') > -1) {
             $ROIfamily['image_pid'] = $result;
         }
         if (strpos($result, 'ap-roi:') > -1) {
             $ROIfamily['roi_pid'] = $result;
             array_push($ROIfamilyList, $ROIfamily);
             $ROIfamily['specimen_pid'] = '';
             $ROIfamily['image_pid'] = '';
             $ROIfamily['roi_pid'] = '';
         }
     }
     return $ROIfamilyList;
 }