public class ConstellationFactory extends Object
SkyPath expression. The constellations files are
produced using the ConstellationShape class for transforming xxx.hip
input files into constellation files.| Modifier and Type | Class and Description |
|---|---|
static class |
ConstellationFactory.Hip
A class to convert constellation input files that use HIP-numbers to
parsable
SkyPath objects. |
| Modifier and Type | Field and Description |
|---|---|
static String[] |
CONST |
private static String |
CONSTELLATIONEXTENSION
The constellation extension.
|
private static String |
DEFURLRESOURCES
The default resources of the constellation files.
|
private ResourceSupplying |
locate
An url-class loader if the
DEFURLRESOURCES is defined. |
| Constructor and Description |
|---|
ConstellationFactory() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Shape> |
getAllConstellations(CoordinateTransforming radec)
Returns an array of all constellations that can be parsed and are
non-null.
|
Shape |
getConstellation(String name,
CoordinateTransforming radec)
Returns a constellation shape using its name.
|
private 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.
|
void |
setResource(ResourceSupplying c)
Sets a class loader for locating resources.
|
public static final String[] CONST
private static final String DEFURLRESOURCES
private static final String CONSTELLATIONEXTENSION
private ResourceSupplying locate
DEFURLRESOURCES is defined.public void setResource(ResourceSupplying c)
public Shape getConstellation(String name, CoordinateTransforming radec)
public Map<String,Shape> getAllConstellations(CoordinateTransforming radec)
private 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()