syntax = "proto3";

package biopb.ome;

option java_package = "biopb.ome";
option java_multiple_files = true;

import "biopb/ome/rights.proto";
import "biopb/ome/metadata.proto";
import "biopb/ome/metadata_ref.proto";

// Protobuf equivalent of the OME-XML format
//
// The OME element is a container for all information objects accessible by OME.
// These information objects include descriptions of the imaging experiments and
// the people who perform them, descriptions of the microscope, the resulting
// images and how they were acquired, the analyses performed on those images,
// and the analysis results themselves. An OME file may contain any or all of
// this information. With the creation of the Metadata Only Companion OME-XML
// and Binary Only OME-TIFF files the top level OME node has changed slightly.
// It can EITHER: Contain all the previously expected elements OR: Contain a
// single BinaryOnly element that points at its Metadata Only Companion OME-XML
// file
//
// See http://www.openmicroscopy.org/Schemas/OME/2016-06 for the original XML
// specification
//
message OME {
    // copy rights information
    Rights rights = 1;

    // The reason for the OME specification. This should be considered a
    // required field. A unset (null) filed means using default value. The exact
    // value for "default" is context-dependent. For example, in a streaming
    // GRPC session, the "default" is likely the value transimitted in a
    // previous message.
    Metadata metadata = 2;


    // OME allows "binary-only" data, for which the metadata are supplied from a
    // reference. This is needed in order to support multi-part data storage,
    // where most of the files are binary-only and share metadata with a
    // metadata-only file. 
    //
    // We replicate this field for consistency, but discourage its use. For
    // protobuf it has no real usecase.
    MetadataRef metadata_ref = 3;


    // This unique identifier is used in conjuction with `MetadataRef`` to keep
    // track of multi part files. Should be unset in most cases.
    string uuid = 4;


    // This is the name of the creating application of the OME-XML and
    // preferably its full version, e.g "CompanyName, SoftwareName, V2.6.3456"
    // This is optional but we hope it will be set by applications writing out
    // OME-XML from scratch.
    string creator = 5;

}
