class RasterEntry { String entryId long width long height int numberOfBands int bitDepth String dataType Geometry groundGeom Date acquisitionDate String policy = 'POLICY_01' String excludePolicy = '' static belongsTo = [rasterDataSet: RasterDataSet] static hasMany = [metadataTags: MetadataTag, fileObjects: RasterEntryFile] static mapping = { groundGeom type: GeometryType, column: 'ground_geom' } /* public String toString() { return [ entryId:entryId, width:width, height:height, numberOfBands:numberOfBands, bitDepth:bitDepth, dataType:dataType, groundGeom:groundGeom, //srs:srs ] as String } */ static constraints = { entryId() width(min: 0l) height(min: 0l) numberOfBands(min: 0) bitDepth(min: 0) dataType() groundGeom(nullable: false) acquisitionDate(nullable: true) metadataTags() policy(nullable: true) excludePolicy(nullable: true) } def getMainFile() { RasterFile.findByRasterDataSetAndType(rasterDataSet, "main") } }