001    package edu.nrao.sss.astronomy;
002    
003    import java.util.Date;
004    
005    import edu.nrao.sss.util.SourceNotFoundException;
006    
007    /**
008     * A finder of sources.
009     * <p>
010     * <b>Version Info:</b>
011     * <table style="margin-left:2em">
012     *   <tr><td>$Revision: 542 $</td></tr>
013     *   <tr><td>$Date: 2007-04-18 17:35:07 -0600 (Wed, 18 Apr 2007) $</td></tr>
014     *   <tr><td>$Author: dharland $</td></tr>
015     * </table></p>
016     * 
017     * @author David M. Harland
018     * @since 2007-04-18
019     */
020    public interface SourceLocator
021    {
022      /**
023       * Returns the current position for the given source.
024       * 
025       * @param sourceName the name of the source to locate.
026       * 
027       * @return the current position of the source named {@code sourceName}.
028       * 
029       * @throws SourceNotFoundException if anything goes wrong during the location
030       *           of the source and the decoding of its position information.
031       *           The thrown exception will contain a non-null root cause.
032       */
033      public SkyPosition findPosition(String sourceName)
034        throws SourceNotFoundException;
035      
036      /**
037       * Returns the position for the given source at the given time.
038       * 
039       * @param sourceName the name of the source to locate.
040       * 
041       * @param time the time for which the position is desired
042       * 
043       * @return the position of the source named {@code sourceName} at
044       *         {@code time}.
045       * 
046       * @throws SourceNotFoundException if anything goes wrong during the location
047       *           of the source and the decoding of its position information.
048       *           The thrown exception will contain a non-null root cause.
049       */
050      public SkyPosition findPosition(String sourceName, Date time)
051        throws SourceNotFoundException;
052    
053      //public List<String> findAliases(String sourceName)
054      //  throws SourceNotFoundException;
055    }