1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.datacenter.impl.cds.sesame;
12
13 /*** Constants class that represents catalogues to search in
14 * @author Noel Winstanley nw@jb.man.ac.uk 16-Oct-2003
15 *
16 */
17 public class Catalogues {
18
19 /***
20 *
21 */
22 private Catalogues(String code) {
23 this.code = code;
24 }
25 private String code;
26
27 protected String getCode() {
28 return code;
29 }
30 /*** search in the simbad catalogue */
31 public final static Catalogues SIMBAD = new Catalogues("S");
32 /*** search in the ned catalogue */
33 public final static Catalogues NED = new Catalogues("N");
34 /*** search in the vizier catalogue */
35 public final static Catalogues VIZIER = new Catalogues("V");
36 /*** search in all catalogues */
37 public final static Catalogues ALL = new Catalogues("A");
38
39 /*** search in two catalogues
40 *
41 * @param a one catalogue to search in
42 * @param b another catalogue to search in.
43 * @return code to search in both catalogues
44 */
45 public static Catalogues BOTH(Catalogues a,Catalogues b) {
46 return new Catalogues(a.getCode() + b.getCode() + ALL.getCode());
47 }
48
49 /*** search in a primary catalogue. If no result found, try in a fallback catalogue
50 *
51 * @param primary first catalogue to search
52 * @param secondary seconf catalogue to search
53 * @return
54 */
55 public static Catalogues FALLBACK(Catalogues primary,Catalogues secondary) {
56 return new Catalogues(primary.getCode() + secondary.getCode());
57 }
58
59 }
60
61
62
63
64
65
66
67
68
69
70
71
72
73