code: private void addComplexAsMember(Complex cx, Glyph container) {
  		// Create a glyph for the inner complex
  		Glyph inner = createComplexMember(cx, container);
  
  		for (PhysicalEntity mem : cx.getComponent())
  		{
  			if (mem instanceof Complex)
  			{
  				// Recursive call for inner complexes
  				addComplexAsMember((Complex) mem, inner);
  			}
  			else
  			{
  				createComplexMember(mem, inner);
  			}
  		}
  	}
docs: /*
  Recursive method for creating the content of a complex. A complex may contain other complexes
  (bad practice), but SBGN needs them flattened. If an inner complex is empty, then we
  represent it using a glyph. Otherwise we represent only the members of this inner complex,
  merging them with the most outer complex.
  
  @param cx inner complex to add as member
  @param container glyph for most outer complex