Project

General

Profile

« Previous | Next » 

Revision cafc7c3b

Added by Andreas Kohlbecker about 13 years ago

displaying polytomous keys (addons to #2152)

View differences:

modules/cdm_dataportal/cdm_api/cdm_api.module
504 504
        case 'PolytomousKey':
505 505
        case 'MediaKey':
506 506
        case 'MultiAccessKey':
507
          $ws_base_uri = CDM_WS_IDENTIFICATIONKEY;
507
          $ws_base_uri = $cdmBase->class;
508
          $ws_base_uri{0} = strtolower($ws_base_uri{0});
508 509
          break;
509 510
        default:  trigger_error('Unsupported CDM Class - no annotations available for ' . $cdmBase->class, E_USER_ERROR);
510 511
            return;
511 512
    }
512
    return  cdm_compose_url($ws_base_uri, array($cdmBase->uuid, 'annotation'));
513
    return  cdm_compose_url($ws_base_uri, array($cdmBase->uuid, 'annotations'));
513 514
}
514 515

  
515 516
/**
......
669 670
  return $mergedTrees;
670 671
}
671 672

  
673
/**
674
 * @param $cdmBase
675
 * @return an array or empty
676
 */
677
function cdm_ws_getAnnotationsFor($cdmBase){
678
    $annotationUrl = cdm_compose_annotations_url($cdmBase);
679
    if($annotationUrl){
680
      $annotationPager = cdm_ws_get($annotationUrl, null, null, null, true);
681
      if(is_array($annotationPager->records)){
682
        return $annotationPager->records;
683
      }
684
    }
685
}
686

  
672 687
function _mergeFeatureTreeDesciptions($featureNodes, $descriptionElements){
673 688

  
674 689
  foreach($featureNodes as &$node){

Also available in: Unified diff