Search in sources :

Example 1 with CatalogInfoSource

use of gaiasky.util.CatalogInfo.CatalogInfoSource in project gaiasky by langurmonkey.

the class FadeNode method setCataloginfo.

public void setCataloginfo(Map<String, String> map) {
    String name = map.get("name");
    String desc = map.get("description");
    String source = map.get("source");
    CatalogInfoSource type = map.get("type") != null ? CatalogInfoSource.valueOf(map.get("type")) : CatalogInfoSource.INTERNAL;
    float size = map.get("size") != null ? Parser.parseFloat(map.get("size")) : 1;
    long sizeBytes = map.get("sizebytes") != null ? Parser.parseLong(map.get("sizebytes")) : -1;
    long nObjects = map.get("nobjects") != null ? Parser.parseLong(map.get("nobjects")) : -1;
    this.catalogInfo = new CatalogInfo(name, desc, source, type, size, this);
    this.catalogInfo.sizeBytes = sizeBytes;
    this.catalogInfo.nParticles = nObjects;
}
Also used : CatalogInfoSource(gaiasky.util.CatalogInfo.CatalogInfoSource) CatalogInfo(gaiasky.util.CatalogInfo)

Aggregations

CatalogInfo (gaiasky.util.CatalogInfo)1 CatalogInfoSource (gaiasky.util.CatalogInfo.CatalogInfoSource)1