001    package edu.nrao.sss.model.source;
002    
003    import java.util.Date;
004    import java.util.List;
005    
006    import edu.nrao.sss.catalog.NameableCatalogItem;
007    import edu.nrao.sss.model.UserAccountable;
008    import edu.nrao.sss.util.Identifiable;
009    
010    /**
011     * An entry in a {@link SourceCatalog}.
012     * <p>
013     * <b>Version Info:</b>
014     * <table style="margin-left:2em">
015     *   <tr><td>$Revision: 2226 $</td></tr>
016     *   <tr><td>$Date: 2009-04-17 16:28:53 -0600 (Fri, 17 Apr 2009) $</td></tr>
017     *   <tr><td>$Author: dharland $ (last person to modify)</td></tr>
018     * </table></p>
019     *  
020     * @author David M. Harland
021     * @since 2006-09-15
022     */
023    public interface SourceCatalogEntry
024      extends NameableCatalogItem<SourceCatalogEntry>, Identifiable, UserAccountable
025    {
026      /**
027       * Sets the name of this entry.
028       * If {@code newName} is <i>null</i>, this entry's name will be reset to
029       * its initial value.
030       * 
031       * @param newName the new name for this entry.
032       */
033      public void setName(String newName);
034      
035      /**
036       * Returns the name of this entry.
037       * @return the name of this entry.
038       */
039      public String getName();
040      
041      /**
042       * Do not use.
043       * This method is here for the persistence mechanism.
044       * Other clients should not set object identifiers.
045       * @param identifier
046       */
047      public void setId(Long identifier);
048    
049      /**
050       * Resets this entry's ID, and the IDs of all its components,
051       * to a value that represents the unidentified state.
052       * <p>
053       * This method is useful for preparing an entry for storage in a database.
054       * The ID property (as of now, though this may change in the future) is
055       * used by our persistence mechanism to identify objects.  If you are
056       * persisting this entry for the first time, you may need to call
057       * this method before performing a save.  This is especially true if
058       * you have created this source from XML, as the XML unmarshalling
059       * brings along the ID property.</p> 
060       */
061      public void clearId();
062    
063      /**
064       * Returns a list of notes about this entry.
065       * Each note is free-form text with no particular structure.
066       * 
067       * @return a list of notes about this entry.
068       */
069      public List<String> getNotes();
070    
071      /**
072       * Returns the source associated with this entry as of the given
073       * point in time.
074       * 
075       * @param pointInTime the time at which a source is desired.
076       * 
077       * @return the source associated with this entry as of the given
078       *         point in time.
079       */
080      public Source get(Date pointInTime);
081    }