[ome-users] Re: question concerning getGroups and adding files to the groups

Ilya Goldberg igg at nih.gov
Fri Nov 4 15:22:08 GMT 2005


On Nov 2, 2005, at 4:18 PM, Bernd Jagla wrote:

> Hi there,
>
>
>
> I still haven't understood how to add files that are not in the  
> $files list
> from getGroups (for a new importer into a group so they are  
> imported with
> the importGroup method).
>
>
>
> Apparently the getSHA1 function is checking if a file has been  
> imported
> before. It is called before the importGroup method is called.  
> Therefore I
> need to have a file object that can call the getSHA1 function  
> created inside
> the getGroups function.
>
> Here is what I have:
>
> $fp being a string of the file including the full path.
>
>
>
> my $frm_file = OME::Image::Server->uploadFile($fp)

This returns an OME::Image::Server::File object, which is documented  
here:
http://openmicroscopy.org/APIdocs/OME/Image/Server/File.html

You can call getSHA1() on it ($frm_file->getSHA1()) along with the  
standard set of I/O calls (open, seek, read, etc).

>
> #returns a fileID  that I use with

This returns an object, not a scalar fileID.  The file ID is  
retrieved from the object using $frm_file->getFileID()

>
> my $OF_attr = $self->__touchOriginalFile($frm_file,"InCell 3000");
>
> #This unfortunately returns an empty string/object.

This call either succeeds in creating and returning an OriginalFile  
attribute or dies with a "Could not create OriginalFile attribute"  
message.  Are you sure $OF_attr is undefined?  What happens if you  
immediately call:
print "OF ID: ".$OF_attr->id()."\n";

>
>
>
> So, I don't know what to do now???

If the above results in an error, then most likely your importer  
class is not properly defined (or the installation is broken, or  
something else serious but easy to fix).  If you post a copy of your  
importer class, we can try to figure out what's wrong with it.

-Ilya

>
>
> Any suggestions???
>
>
>
> Thanks,
>
>
>
> Bernd
>
>
>
>
>
> Bernd Jagla, PhD
> Associate Research Scientist
> Columbia University
> 1150 St. Nicholas Avenue
> Russ Berrie Medical Pavilion, Room 520
> New York, NY 10032
> Tel: 212 - 851 5560 x16
> Fax: 212 - 851 5570
> e-mail: baj2107 at columbia.edu
>
>
>
>




More information about the ome-users mailing list