grib/src/main/java/ucar/nc2/grib/collection/GribPartitionBuilder.java
private GribCollectionProto.Partition writePartitionProto(PartitionCollectionMutable pc, PartitionCollectionMutable.Partition p) {
    GribCollectionProto.Partition.Builder b = GribCollectionProto.Partition.newBuilder();
    String pathRS = makeReletiveFilename(pc, p); // reletive to pc.directory
    b.setFilename(pathRS);
    b.setName(p.name);
    // b.setDirectory(p.directory);
    b.setLastModified(p.lastModified);
    b.setLength(p.fileSize);
    if (p.partitionDate != null)
      b.setPartitionDate(p.partitionDate.getMillis());  // LOOK what about calendar ??

    return b.build();
  }
private GribCollectionProto.Partition writePartitionProto(PartitionCollectionMutable pc, PartitionCollectionMutable.Partition p) {
    GribCollectionProto.Partition.Builder b = GribCollectionProto.Partition.newBuilder();
    String pathRS = makeReletiveFilename(pc, p); // reletive to pc.directory
    b.setFilename(pathRS);
    b.setName(p.name);
    // b.setDirectory(p.directory);
    b.setLastModified(p.lastModified);
    b.setLength(p.fileSize);
    if (p.partitionDate != null)
      b.setPartitionDate(p.partitionDate.getMillis());  // LOOK what about calendar ??

    return b.build();
  }
private GribCollectionProto . Partition writePartitionProto ( PartitionCollectionMutable pc , PartitionCollectionMutable . Partition p ) { GribCollectionProto . Partition . Builder b = GribCollectionProto . Partition . newBuilder ( ) ; String pathRS = makeReletiveFilename ( pc , p ) ; // reletive to pc.directory b . setFilename ( pathRS ) ; b . setName ( p . name ) ; // b.setDirectory(p.directory); b . setLastModified ( p . lastModified ) ; b . setLength ( p . fileSize ) ; if ( p . partitionDate != null ) b . setPartitionDate ( p . partitionDate . getMillis ( ) ) ; // LOOK what about calendar ?? return b . build ( ) ; }
/*
message Partition {
string name = 1;       // name is used in TDS - eg the subdirectory when generated by TimePartitionCollections
string filename = 2;   // the gribCollection.ncx file, reletive to gc.
string directory = 3;  // top directory NOT USED
uint64 lastModified = 4;
int64 length = 5;
int64 partitionDate = 6;  // partition date added 11/25/14
}
/ * message Partition { string name = 1 ; // name is used in TDS - eg the subdirectory when generated by TimePartitionCollections string filename = 2 ; // the gribCollection . ncx file reletive to gc . string directory = 3 ; // top directory NOT USED uint64 lastModified = 4 ; int64 length = 5 ; int64 partitionDate = 6 ; // partition date added 11 / 25 / 14 }