Refine search
private void fillAcquisitionDate(MetadataStore store, String date, int imageIndex) { if (date == null) return; if(DateTools.getTime(date, DateTools.FILENAME_FORMAT) != -1) { Timestamp stamp = new Timestamp( DateTools.formatDate(date, DateTools.FILENAME_FORMAT)); store.setImageAcquisitionDate(stamp, imageIndex); } }
private void fillAcquisitionDate(MetadataStore store, String date, int imageIndex) { if (date == null) return; if(DateTools.getTime(date, DateTools.FILENAME_FORMAT) != -1) { Timestamp stamp = new Timestamp( DateTools.formatDate(date, DateTools.FILENAME_FORMAT)); store.setImageAcquisitionDate(stamp, imageIndex); } }
/** * Sets a default creation date. If the named file exists, then the creation * date is set to the file's last modification date. Otherwise, it is set * to the current date. * * @see #setDefaultDateEnabled(boolean) */ public static void setDefaultCreationDate(MetadataStore store, String id, int series) { if (!defaultDateEnabled) { return; } Location file = id == null ? null : new Location(id).getAbsoluteFile(); long time = System.currentTimeMillis(); if (file != null && file.exists()) time = file.lastModified(); store.setImageAcquisitionDate(new Timestamp(DateTools.convertDate( time, DateTools.UNIX)), series); }
/** * Sets a default creation date. If the named file exists, then the creation * date is set to the file's last modification date. Otherwise, it is set * to the current date. * * @see #setDefaultDateEnabled(boolean) */ public static void setDefaultCreationDate(MetadataStore store, String id, int series) { if (!defaultDateEnabled) { return; } Location file = id == null ? null : new Location(id).getAbsoluteFile(); long time = System.currentTimeMillis(); if (file != null && file.exists()) time = file.lastModified(); store.setImageAcquisitionDate(new Timestamp(DateTools.convertDate( time, DateTools.UNIX)), series); }
Timestamp timestamp = new Timestamp(new DateTime(date)); store.setImageAcquisitionDate(timestamp, 0);
Timestamp timestamp = new Timestamp(new DateTime(date)); store.setImageAcquisitionDate(timestamp, 0);
String date = DateTools.formatDate(value, DATE_FORMAT); if (date != null) { store.setImageAcquisitionDate(new Timestamp(date), 0);
private void populateMetadataStore() throws FormatException { MetadataStore store = makeFilterMetadata(); MetadataTools.populatePixels(store, this, true); for (int i=0; i<getSeriesCount(); i++) { // populate Image data if (i < imageNames.size()) { store.setImageName(imageNames.get(i), i); } String date = i < dates.size() ? dates.get(i) : ""; if (date != null && !date.equals("")) { store.setImageAcquisitionDate(new Timestamp(date), i); } } if (getMetadataOptions().getMetadataLevel() != MetadataLevel.MINIMUM) { for (int i=0; i<getSeriesCount(); i++) { // populate PlaneTiming data for (int q=0; q<core.get(i).imageCount; q++) { if (exposureTimes.get(i) != null) { store.setPlaneExposureTime(new Time(exposureTimes.get(i), UNITS.SECOND), i, q); } } // populate Experiment data if (i < types.size()) { store.setExperimentID(MetadataTools.createLSID("Experiment", i), i); store.setExperimentType(MetadataTools.getExperimentType(types.get(i)), i); } } } }
private void populateMetadataStore() throws FormatException { MetadataStore store = makeFilterMetadata(); MetadataTools.populatePixels(store, this, true); for (int i=0; i<getSeriesCount(); i++) { // populate Image data if (i < imageNames.size()) { store.setImageName(imageNames.get(i), i); } String date = i < dates.size() ? dates.get(i) : ""; if (date != null && !date.equals("")) { store.setImageAcquisitionDate(new Timestamp(date), i); } } if (getMetadataOptions().getMetadataLevel() != MetadataLevel.MINIMUM) { for (int i=0; i<getSeriesCount(); i++) { // populate PlaneTiming data for (int q=0; q<core.get(i).imageCount; q++) { if (exposureTimes.get(i) != null) { store.setPlaneExposureTime(new Time(exposureTimes.get(i), UNITS.SECOND), i, q); } } // populate Experiment data if (i < types.size()) { store.setExperimentID(MetadataTools.createLSID("Experiment", i), i); store.setExperimentType(MetadataTools.getExperimentType(types.get(i)), i); } } } }
date = DateTools.formatDate(date, DATE_FORMAT); if (date != null) { store.setImageAcquisitionDate(new Timestamp(date), 0);
date = DateTools.formatDate(date, DATE_FORMAT); if (date != null) { store.setImageAcquisitionDate(new Timestamp(date), 0);
store.setImageAcquisitionDate(new Timestamp(date), well);
date = DateTools.formatDate(date, DATE_FORMAT); if (date != null) { store.setImageAcquisitionDate(new Timestamp(date), 0);
date = DateTools.formatDate(date, DATE_FORMAT); if (date != null) { store.setImageAcquisitionDate(new Timestamp(date), 0);
store.setImageAcquisitionDate(new Timestamp(creationDate), i);
store.setImageAcquisitionDate(new Timestamp(creationDate), i);
store.setImageAcquisitionDate(new Timestamp(timestamp), 0);
store.setImageAcquisitionDate(new Timestamp(timestamp), 0);
String date = DateTools.convertDate(stamp, DateTools.COBOL); if (date != null) { store.setImageAcquisitionDate(new Timestamp(date), 0);
String date = DateTools.convertDate(stamp, DateTools.COBOL); if (date != null) { store.setImageAcquisitionDate(new Timestamp(date), 0);