code: private void initPortIdToGlyphMap(List<Glyph> glyphs)
      {
          for(Glyph glyph: glyphs)
          {
              for(Port p: glyph.getPort())
              {
                  portIDToOwnerGlyph.put(p.getId(), glyph );
              }
              if(glyph.getGlyph().size() > 0)
                  initPortIdToGlyphMap(glyph.getGlyph());
          }
      }
docs: This method initializes map for glyphs and their respective ports.
  @param glyphs Glyph list of SBGN model