Package gaiasky.data.stars
Class AbstractCatalogLoader
- java.lang.Object
-
- gaiasky.data.stars.AbstractCatalogLoader
-
- Direct Known Subclasses:
NBGLoader
,StarClusterLoader
,SunLoader
public abstract class AbstractCatalogLoader extends java.lang.Object
Abstract catalog loader with the transformation from spherical to cartesian coordinates
-
-
Field Summary
Fields Modifier and Type Field Description uk.ac.starlink.util.DataSource
dataSource
Data source, if using that instead ofprotected java.lang.String
description
Descriptionjava.lang.String[]
files
Catalog files to loadjava.util.List<CatalogFilter>
filters
protected java.lang.String
name
Nameprotected java.lang.String
parentName
-
Constructor Summary
Constructors Constructor Description AbstractCatalogLoader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addFilter(CatalogFilter cf)
void
initialize(java.lang.String[] files)
void
initialize(uk.ac.starlink.util.DataSource ds)
abstract com.badlogic.gdx.utils.Array<? extends SceneGraphNode>
loadData()
protected boolean
runFiltersAnd(CelestialBody s)
Runs all filters on the star and returns true only if all have passed.protected boolean
runFiltersOr(CelestialBody s)
Runs all filters on the star and returns true if any of them passesvoid
setDescription(java.lang.String description)
void
setName(java.lang.String name)
void
setParentName(java.lang.String parentName)
-
-
-
Field Detail
-
files
public java.lang.String[] files
Catalog files to load
-
filters
public java.util.List<CatalogFilter> filters
-
dataSource
public uk.ac.starlink.util.DataSource dataSource
Data source, if using that instead of
-
name
protected java.lang.String name
Name
-
description
protected java.lang.String description
Description
-
parentName
protected java.lang.String parentName
-
-
Method Detail
-
initialize
public void initialize(java.lang.String[] files)
-
initialize
public void initialize(uk.ac.starlink.util.DataSource ds)
-
loadData
public abstract com.badlogic.gdx.utils.Array<? extends SceneGraphNode> loadData() throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
addFilter
public void addFilter(CatalogFilter cf)
-
runFiltersAnd
protected boolean runFiltersAnd(CelestialBody s)
Runs all filters on the star and returns true only if all have passed.- Parameters:
s
- The star- Returns:
- True if all filters have passed
-
runFiltersOr
protected boolean runFiltersOr(CelestialBody s)
Runs all filters on the star and returns true if any of them passes- Parameters:
s
- The star- Returns:
- True if any filter has passed
-
setParentName
public void setParentName(java.lang.String parentName)
-
setName
public void setName(java.lang.String name)
-
setDescription
public void setDescription(java.lang.String description)
-
-