if (imgA.getTimestamp() != null) time = new Timestamp(imgA.getTimestamp().longValue()); else time = getTimestamp();
mex = imgA.getModuleExecution(); if (mex.getTimestamp() != null) time = PrimitiveTypesMapper.getTimestamp(mex.getTimestamp()); else time = PrimitiveTypesMapper.getDefaultTimestamp();
    public static Map fillImageAnnotations(List l, TreeMap map)    {        Iterator i = l.iterator();        ImageAnnotation imgA;        AnnotationData data;        int ownerID;        List list;        Timestamp time = null;        Experimenter experimenter;        while (i.hasNext()) {            imgA = (ImageAnnotation) i.next();            list = new ArrayList();            if (imgA.getTimestamp() != null)                time = new Timestamp(imgA.getTimestamp().longValue());            else time = getTimestamp();            experimenter = imgA.getExperimenter();            ownerID = experimenter.getID();            data = new AnnotationData(imgA.getID(), ownerID, time);            data.setAnnotation(imgA.getContent());            data.setOwnerFirstName(experimenter.getFirstName());            data.setOwnerLastName(experimenter.getLastName());            if (imgA.getTheZ() != null)                data.setTheZ(imgA.getTheZ().intValue());            if (imgA.getTheT() != null)                data.setTheT(imgA.getTheT().intValue());            list.add(data);            map.put(new Integer(ownerID), list);        }        return map;    }