Could use method already existing (NewFedoraObject:: 
createNewDatastreamCopy()) then if you were to change the visibility... 
Or just change the condition there on 556 to also compare $ds->parent to 
the current object.

On 13-05-27 6:25 AM, Nigel Banks wrote:
>
> In islandora.module:
>
> > +    'state',
> > +    'mimetype',
> > +    'format',
> > +    'size',
> > +    'checksum',
> > +    'checksumType',
> > +    'createdDate',
> > +    'content',
> > +    'url',
> > +    'location',
> > +  );
> > +  // Copy Datastreams.
> > +  foreach ($object as $dsid => $datastream) {
> > +    if (empty($clone[$dsid])) {
> > +      $ds = $clone->constructDatastream($dsid, $datastream->controlGroup);
> > +      $clone->ingestDatastream($ds);
>
> Mainly cause of this one line:
>
> https://github.com/Islandora/tuque/blob/1.x/Object.php#L556
>
> It would prevent the function from being able to copy from 
> NewFedoraObjects.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/Islandora/islandora/pull/341/files#r4398136>.
>