/// <summary>
        /// Adds a Metadata (XML) datastream, takes IMetadata object as the metadata
        /// </summary>
        /// <param name="dsId">DatastreamID</param>
        /// <param name="dsLabel">Datastream Label</param>
        /// <param name="inMetadata">Metadata object</param>
        /// <param name="mimeType">The mime type (usually "text/xml") but could be different e.g application/rdf+xml</param>
        public void AddMetadataDatastream(string dsId, string dsLabel, IMetadata inMetadata, string mimeType )
        {
            IMetadata metadata = inMetadata;

            //Creates a new ObjectDatastream
            IObjectDatastream objectDatastream = new ObjectDatastreamImpl(dsId, dsLabel, mimeType, metadata.FormatURI, null, "DISABLED", "A", "X", true, 0, null, metadata.Xml, null);
            genericObject.AddDatastream(objectDatastream); //Adds to the genericObject
        }
 private void AddContentDatastream(string dsId, string dsLabel, string contentMimeType, int size, string location, string controlGroup)
 {
     IObjectDatastream objectDatastream = new ObjectDatastreamImpl(dsId, dsLabel, contentMimeType, "", null, "DISABLED", "A", controlGroup, true, size, location, null, null);
     genericObject.AddDatastream(objectDatastream);
 }
 /// <summary>
 /// Adds a ManagedContentDatastream with the content as a Byte[]
 /// </summary>
 /// <param name="dsId">DatastreamID</param>
 /// <param name="dsLabel">Datastream Label</param>
 /// <param name="contentMimeType">Content Mimetype</param>
 /// <param name="content">The content</param>
 /// <param name="size">Size of the datastream content in bytes</param>
 public void AddManagedContentDatastream(string dsId, string dsLabel, string contentMimeType, int size, byte[] content)
 {
     IObjectDatastream objectDatastream = new ObjectDatastreamImpl(dsId, dsLabel, contentMimeType, "", null, "DISABLED", "A", "M", true, size, null, null, content);
     genericObject.AddDatastream(objectDatastream);
 }
 /// <summary>
 /// Adds an inline-XML datastream.
 /// </summary>
 /// <param name="dsId">DatastreamID</param>
 /// <param name="dsLabel">Datastream Label</param>
 /// <param name="xml">XML content of datastream</param>
 public void AddXMLDatastream(string dsId, string dsLabel, string xml)
 {
     //Creates a new ObjectDatastream
     IObjectDatastream objectDatastream = new ObjectDatastreamImpl(dsId, dsLabel, "text/xml", "", null, "DISABLED", "A", "X", true, 0, null, xml, null);
     genericObject.AddDatastream(objectDatastream); //Adds to the genericObject
 }