public static function getName(IRI $coid) {
    if (self::getType($coid)!=self::COID_INVALID
        && self::getType($coid)!=self::COID_ROOT) {
      $segments = explode('/', $coid->getPath());
      return $segments[1];
    } else
      return null;
  }