001    package edu.nrao.sss.catalog;
002    
003    /**
004     * A simple catalog of items and groups of items.
005     * <p>
006     * The groups of this catalog are of type
007     * {@link SimpleItemGroup SimpleItemGroup&lt;I&gt;}.
008     * Use this class as you would any collections class.  E.g.:<pre>
009     *   SimpleCatalog&lt;Widget&gt; myCatalog = new SimpleCatalog&lt;Widget&gt;();
010     *   myCatalog.add(widgetA);
011     *   ...</pre>
012     * Use this catalog when you have no need for specialized behavior
013     * for your catalog or for your item group objects.</p>
014     * <p>
015     * <b>CVS Info:</b>
016     * <table style="margin-left:2em">
017     *   <tr><td>$Revision: 161 $</td></tr>
018     *   <tr><td>$Date: 2006-12-15 11:48:34 -0700 (Fri, 15 Dec 2006) $</td></tr>
019     *   <tr><td>$Author: btruitt $</td></tr>
020     * </table></p>
021     * 
022     * @author David M. Harland
023     * @since 2006-10-31
024     */
025    public class SimpleCatalog<I extends CatalogItem<I>>
026      extends Catalog<I, SimpleItemGroup<I>, SimpleCatalog<I>>
027    {
028      /** Creates a new catalog with a default name. */
029      public SimpleCatalog()
030      {
031        super();
032      }
033      
034      /**
035       * Creates a new catalog with the given name.
036       * 
037       * @param nameOfCatalog the name of this catalog.  If this value is
038       *                      <i>null</i>, this catalog will be given a
039       *                      default name.
040       */
041      public SimpleCatalog(String nameOfCatalog)
042      {
043        super(nameOfCatalog);
044      }
045    
046      @Override
047      protected SimpleItemGroup<I> createMainGroup()
048      {
049        return new SimpleItemGroup<I>(this);
050      }
051      
052      @Override
053      public SimpleItemGroup<I> createGroup()
054      {
055        return new SimpleItemGroup<I>();
056      }
057    }