1 /*
   2  * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 package test.astro;
  24 
  25 import java.io.IOException;
  26 
  27 import javax.xml.parsers.ParserConfigurationException;
  28 import javax.xml.transform.sax.TransformerHandler;
  29 import javax.xml.transform.TransformerConfigurationException;
  30 
  31 import org.xml.sax.SAXException;
  32 
  33 /*
  34  * Defines the interface for all concrete implementations of a Filter
  35  * Factory.
  36  */
  37 public interface FilterFactory {
  38     /*
  39      * Allows only the stars between right ascension (R.A.) of min and max to
  40      * pass. Filters out all stars that are not in that range of right
  41      * ascension. Units of right ascension are hours (h), range of parameters is
  42      * 0h to 24h.
  43      * 
  44      * @param min minimum R.A.
  45      * 
  46      * @param max maxmimum R.A.
  47      */
  48     TransformerHandler newRAFilter(double min, double max) throws TransformerConfigurationException, SAXException, ParserConfigurationException, IOException;
  49 
  50     /*
  51      * Allows only the stars between declination (DEC) of min and max to pass.
  52      * Filters out all stars that are not in that range of declination. Units of
  53      * declination are degrees (degs), range of parameters is -90 and +90 degs.
  54      * 
  55      * @param min minimum DEC
  56      * 
  57      * @param max maxmimum DEC
  58      */
  59     TransformerHandler newDECFilter(double min, double max) throws TransformerConfigurationException, SAXException, ParserConfigurationException, IOException;
  60 
  61     /*
  62      * Combines the usage of newRAFilter and newDECFilter into one.
  63      * 
  64      * @param rmin minimum R.A.
  65      * 
  66      * @param rmax maxmimum R.A.
  67      * 
  68      * @param dmin minimum DEC
  69      * 
  70      * @param dmax maxmimum DEC
  71      */
  72     TransformerHandler newRADECFilter(double rmin, double rmax, double dmin, double dmax) throws TransformerConfigurationException, SAXException,
  73             ParserConfigurationException, IOException;
  74 
  75     TransformerHandler newStellarTypeFilter(String type) throws TransformerConfigurationException, SAXException, ParserConfigurationException, IOException;
  76 
  77     TransformerHandler newHTMLOutput() throws TransformerConfigurationException, SAXException, ParserConfigurationException, IOException;
  78 }