|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectastro.ConstellationFactory
public class ConstellationFactory
A class to provide outlines of constellations as shapes. Each constellation
is stored in a file named 'xxx.con', where xxx is the three-letter
abbreviation of the constellation. Each file consists of a single line
taht is a parsbale SkyPath expression. The constellations files
are produced using the ConstellationShape class for transforming
xxx.hip input files into constellation files.
| Nested Class Summary | |
|---|---|
static class |
ConstellationFactory.Hip
A class to convert constellation input files that use HIP-numbers to parsable SkyPath objects. |
| Field Summary | |
|---|---|
private static String |
CONSTELLATIONEXTENSION
The constellation extension. |
private static String |
DEFURLRESOURCES
The default resources of the constellation files. |
private static ClassLoader |
locate
An url-class loader if the DEFURLRESOURCES is defined. |
| Constructor Summary | |
|---|---|
ConstellationFactory()
|
|
| Method Summary | |
|---|---|
static Map |
getAllConstellations(CoordinateTransforming radec)
Returns an array of all constellations that can be parsed and are non-null. |
static Shape |
getConstellation(String name,
CoordinateTransforming radec)
Returns a constellation shape using its name. |
private static InputStream |
getResourceAsStream(String key)
Locates a resource using either the default class loader or the URLClassLoader defined with DEFURLRESOURCES. |
private static ClassLoader |
loadResource()
Loads an URL class loader to this properties. |
static void |
setClassLoader(ClassLoader c)
Sets a class loader for locating resources. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String DEFURLRESOURCES
private static final String CONSTELLATIONEXTENSION
private static ClassLoader locate
DEFURLRESOURCES is defined.
| Constructor Detail |
|---|
public ConstellationFactory()
| Method Detail |
|---|
public static void setClassLoader(ClassLoader c)
public static Shape getConstellation(String name,
CoordinateTransforming radec)
public static Map getAllConstellations(CoordinateTransforming radec)
private static InputStream getResourceAsStream(String key)
DEFURLRESOURCES. As for the
general contract for resource-finding, first the main class loader
tries to locate the resource and only if it failes, the URL's are
searched.
private static ClassLoader loadResource()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||