001    package edu.nrao.sss.model.source;
002    
003    import java.net.URL;
004    
005    import javax.xml.bind.annotation.XmlElement;
006    
007    /**
008     * A source brightness whose description is based on a well known file format.
009     * <p>
010     * <b>Version Info:</b>
011     * <table style="margin-left:2em">
012     *   <tr><td>$Revision: 743 $</td>
013     *   <tr><td>$Date: 2007-06-20 16:53:07 -0600 (Wed, 20 Jun 2007) $</td>
014     *   <tr><td>$Author: dharland $</td>
015     * </table></p>
016     * 
017     * @author David M. Harland
018     * @since 2006-04-04
019     */
020    public abstract class FileBasedBrightness
021      extends SourceBrightness
022    {
023      /** Helps create a new instance. */
024      FileBasedBrightness()
025      {
026        super();
027      }
028    
029      /**
030       * Sets the file that describes this source brightness.
031       * 
032       * @param fileUrl the URL of the file that describes this
033       *                source brightness.
034       *                If this parameter is <i>null</i>,
035       *                a phony non-null URL will be used.
036       */
037      @XmlElement
038      public void setBrightnessFile(URL fileUrl)
039      {
040        brightnessFile = (fileUrl == null) ? DEFAULT_URL : fileUrl;
041      }
042    
043      //This method is here only for JAXB purposes.  If it were not here, JAXB
044      //would complain that it found setBrightnessFile, but not getBrightnessFile,
045      //even though getBrightnessFile is present in the parent class.
046      @Override
047      public URL getBrightnessFile()
048      {
049        return super.getBrightnessFile();
050      }
051    }