def AnnotationtoH5 ( anno, h5fh ):
  """Operate polymorphically on annotations"""

  if anno.__class__ == annotation.AnnSynapse:
    return SynapsetoH5 ( anno, h5fh )
  elif anno.__class__ == annotation.AnnSeed:
    return SeedtoH5 ( anno, h5fh )
  if anno.__class__ == annotation.AnnSegment:
    return SegmenttoH5 ( anno, h5fh )
  if anno.__class__ == annotation.AnnNeuron:
    return NeurontoH5 ( anno, h5fh )
  if anno.__class__ == annotation.AnnOrganelle:
    return OrganelletoH5 ( anno, h5fh )
  if anno.__class__ == annotation.AnnNode:
    return NodetoH5 ( anno, h5fh )
  if anno.__class__ == annotation.AnnSkeleton:
    return SkeletontoH5 ( anno, h5fh )
  elif anno.__class__ == annotation.Annotation:
    return BasetoH5 ( anno, annotation.ANNO_ANNOTATION, h5fh )
  else:
    logger.warning ("(AnnotationtoH5) Does not support this annotation type yet. Type = %s" % anno.__class__)
    raise OCPCAError ("(AnnotationtoH5) Does not support this annotation type yet. Type = %s" % anno.__class__)



#########  Other HDF5 utility functions.  Not RAMON   ############
dataset/ETHPy150Open neurodata/ndstore/ocpca/h5ann.py/AnnotationtoH5/original