docs: def _write(self, session, openFile, maskMap):
          """
          WMS Dataset File Write to File Method
          """
          # Magic numbers
          FIRST_VALUE_INDEX = 12
  
          # Write the header
          openFile.write('DATASET\r\n')
  
          if self.type == self.SCALAR_TYPE:
              openFile.write('OBJTYPE {0}\r\n'.format(self.objectType))
              openFile.write('BEGSCL\r\n')
  
          elif self.type == self.VECTOR_TYPE:
              openFile.write('VECTYPE {0}\r\n'.format(self.vectorType))
              openFile.write('BEGVEC\r\n')
  
          openFile.write('OBJID {0}\r\n'.format(self.objectID))
          openFile.write('ND {0}\r\n'.format(self.numberData))
          openFile.write('NC {0}\r\n'.format(self.numberCells))
          openFile.write('NAME {0}\r\n'.format(self.name))
  
          # Retrieve the mask map to use as the status rasters
          statusString = ''
          if isinstance(maskMap, RasterMapFile):
              # Convert Mask Map to GRASS ASCII Raster
              statusGrassRasterString = maskMap.getAsGrassAsciiGrid(session)
  
              if statusGrassRasterString is not None:
                  # Split by lines
                  statusValues = statusGrassRasterString.split()
              else:
                  statusValues = maskMap.rasterText.split()
  
              # Assemble into a string in the WMS Dataset format
              for i in range(FIRST_VALUE_INDEX, len(statusValues)):
                  statusString += statusValues[i] + '\r\n'
  
          # Write time steps
          for timeStepRaster in self.rasters:
              # Write time step header
              openFile.write('TS {0} {1}\r\n'.format(timeStepRaster.iStatus, timeStepRaster.timestamp))
  
              # Write status raster (mask map) if applicable
              if timeStepRaster.iStatus == 1:
                  openFile.write(statusString)
  
              # Write value raster
              valueString = timeStepRaster.getAsWmsDatasetString(session)
  
              if valueString is not None:
                  openFile.write(valueString)
  
              else:
                  openFile.write(timeStepRaster.rasterText)
  
          # Write ending tag for the dataset
          openFile.write('ENDDS\r\n')