import { StyleMetaDescriptor , RangeFieldMeta , Category } from '../../../../common/descriptor_types' ; export class StyleMeta { private readonly _descriptor : StyleMetaDescriptor ; constructor ( styleMetaDescriptor ) { this . _descriptor = styleMetaDescriptor ? styleMetaDescriptor : { fieldMeta : { } } ; } getRangeFieldMetaDescriptor ( fieldName ) { return this . _descriptor . fieldMeta [ fieldName ] && this . _descriptor . fieldMeta [ fieldName ] . range ? this . _descriptor . fieldMeta [ fieldName ] . range ! : null ; } getCategoryFieldMetaDescriptor ( fieldName ) { return this . _descriptor . fieldMeta [ fieldName ] . categories ; } isPointsOnly ( ) { return this . _descriptor . geometryTypes ? ! ! this . _descriptor . geometryTypes . isPointsOnly : false ; } isLinesOnly ( ) { return this . _descriptor . geometryTypes ? ! ! this . _descriptor . geometryTypes . isLinesOnly : false ; } isPolygonsOnly ( ) { return this . _descriptor . geometryTypes ? ! ! this . _descriptor . geometryTypes . isPolygonsOnly : false ; } }