{"size": 942, "ext": "js", "max_stars_repo_path": "src/plugin/file/gml/gmldescriptor.js", "max_stars_repo_name": "dpew/opensphere", "max_stars_repo_stars_event_min_datetime": "2017-12-19T15:16:08.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-17T21:09:14.000Z", "max_issues_repo_path": "src/plugin/file/gml/gmldescriptor.js", "max_issues_repo_name": "dpew/opensphere", "max_issues_repo_issues_event_min_datetime": "2017-12-21T10:01:49.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-24T13:02:47.000Z", "max_forks_repo_path": "src/plugin/file/gml/gmldescriptor.js", "max_forks_repo_name": "dpew/opensphere", "max_forks_repo_forks_event_min_datetime": "2017-12-18T01:51:06.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-06T14:18:27.000Z"}
{"max_stars_count": 170, "max_issues_count": 571, "max_forks_count": 90, "avg_line_length": 22.9756097561, "max_line_length": 69, "alphanum_fraction": 0.6571125265}
goog.declareModuleId('plugin.file.gml.GMLDescriptor');

import FileDescriptor from '../../../os/data/filedescriptor.js';
import * as layer from '../../../os/layer/layer.js';
import LayerType from '../../../os/layer/layertype.js';
import GMLParserConfig from './gmlparserconfig.js';

/**
 * GML file descriptor.
 */
export default class GMLDescriptor extends FileDescriptor {
  /**
   * Constructor.
   * @param {GMLParserConfig=} opt_config
   */
  constructor(opt_config) {
    super();
    this.descriptorType = 'gml';
    this.parserConfig = opt_config || new GMLParserConfig();
  }

  /**
   * @inheritDoc
   */
  getType() {
    return LayerType.FEATURES;
  }

  /**
   * @inheritDoc
   */
  getLayerOptions() {
    var options = super.getLayerOptions();
    options['type'] = 'GML';

    // show the option to replace feature colors with the layer color
    options[layer.LayerOption.SHOW_FORCE_COLOR] = true;
    return options;
  }
}
