  It is known that reflection coefficients for bulk fields of a rational
conformal field theory in the presence of an elementary boundary condition can
be obtained as representation matrices of irreducible representations of the
classifying algebra, a semisimple commutative associative complex algebra.
  We show how this algebra arises naturally from the three-dimensional geometry
of factorization of correlators of bulk fields on the disk. This allows us to
derive explicit expressions for the structure constants of the classifying
algebra as invariants of ribbon graphs in the three-manifold S^2 x S^1. Our
result unravels a precise relation between intertwiners of the action of the
mapping class group on spaces of conformal blocks and boundary conditions in
rational conformal field theories.
