 
   class GranuleQuery extends Query
     constructor: (datasetId, parentQuery) ->
-      console.log 'constructed', datasetId
       super(parentQuery)
       @granuleIdsSelectedOptionValue = ko.observable("granule_ur")
-      #@granuleIdsSelectedOptionValue.validValues = ['granule_ur', 'producer_granule_id']
+      @granuleIdsSelectedOptionValue.validValues = ['granule_ur', 'producer_granule_id']
       @dayNightFlagOptions = [{name: "Anytime", value: null},
                               {name: "Day only", value: "DAY"},
                               {name: "Night only", value: "NIGHT"},

      name = ko.observable(name) unless ko.isObservable(name)
      @name = name

    canWrite: ->
      value = @value()
      value = value.trim() if typeof value == "string"
      value? && (!value.length? || value.length > 0)

    canReadFrom: (query) ->
      query[@name()]?

    writeTo: (query) ->
      query[@name()] = @value()

    readFrom: (query) ->
      @value(query[@name()])

    read: ->
      query = null

      super(name)

    readFrom: (query) ->
      for name in @names()
        value = query[name]
        if value?
          @name(name)
          @value(value.join(@delimiter))
          break
      null

    writeTo: (query) ->
      query[@name()] = @value().split(@delimiter)
