Skip to content

Commit

Permalink
Container: (etal) Remove image/plate distinction for name, desc
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmoore committed Jan 3, 2013
1 parent 96a9223 commit 92ec095
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 195 deletions.
80 changes: 21 additions & 59 deletions components/blitz/src/ome/formats/OMEROMetadataStoreClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,17 +289,11 @@ public class OMEROMetadataStoreClient
/** Annotations from the user for use by model processors. */
private List<Annotation> userSpecifiedAnnotations;

/** Image name the user specified for use by model processors. */
private String userSpecifiedImageName;
/** Image/Plate name the user specified for use by model processors. */
private String userSpecifiedName;

/** Image description the user specified for use by model processors. */
private String userSpecifiedImageDescription;

/** Plate name the user specified for use by model processors. */
private String userSpecifiedPlateName;

/** Plate description the user specified for use by model processors. */
private String userSpecifiedPlateDescription;
/** Image/Plate description the user specified for use by model processors. */
private String userSpecifiedDescription;

/** Linkage target for all Images/Plates for use by model processors. */
private IObject userSpecifiedTarget;
Expand Down Expand Up @@ -1051,8 +1045,8 @@ public void createRoot()
referenceStringCache = null;
imageChannelGlobalMinMax = null;
userSpecifiedAnnotations = null;
userSpecifiedImageName = null;
userSpecifiedImageDescription = null;
userSpecifiedName = null;
userSpecifiedDescription = null;
userSpecifiedTarget = null;
userSpecifiedPhysicalPixelSizes = null;
delegate.createRoot();
Expand Down Expand Up @@ -1159,81 +1153,49 @@ public void setUserSpecifiedAnnotations(List<Annotation> annotations)
/* (non-Javadoc)
* @see ome.formats.model.IObjectContainerStore#getUserSpecifiedPlateName()
*/
public String getUserSpecifiedPlateName()
{
return userSpecifiedPlateName;
}

/* (non-Javadoc)
* @see ome.formats.model.IObjectContainerStore#setUserSpecifiedPlateName(java.lang.String)
*/
public void setUserSpecifiedPlateName(String name)
public String getUserSpecifiedName()
{
if (log.isDebugEnabled())
{
log.debug("Using user specified plate name: " + name);
}
userSpecifiedPlateName = name;
}

/* (non-Javadoc)
* @see ome.formats.model.IObjectContainerStore#getUserSpecifiedPlateDescription()
*/
public String getUserSpecifiedPlateDescription()
{
return userSpecifiedPlateDescription;
}

/* (non-Javadoc)
* @see ome.formats.model.IObjectContainerStore#setUserSpecifiedPlateDescription(java.lang.String)
*/
public void setUserSpecifiedPlateDescription(String description)
{
if (log.isDebugEnabled())
{
log.debug("Using user specified plate description: " + description);
}
userSpecifiedPlateDescription = description;
return userSpecifiedName;
}

/* (non-Javadoc)
* @see ome.formats.model.IObjectContainerStore#getUserSpecifiedImageName()
* @see ome.formats.model.IObjectContainerStore#getUserSpecifiedName()
*/
public String getUserSpecifiedImageName()
{
return userSpecifiedImageName;
return userSpecifiedName;
}

/* (non-Javadoc)
* @see ome.formats.model.IObjectContainerStore#setUserSpecifiedImageName(java.lang.String)
* @see ome.formats.model.IObjectContainerStore#setUserSpecifiedName(java.lang.String)
*/
public void setUserSpecifiedImageName(String name)
public void setUserSpecifiedName(String name)
{
if (log.isDebugEnabled())
{
log.debug("Using user specified image name: " + name);
log.debug("Using user specified name: " + name);
}
this.userSpecifiedImageName = name;
this.userSpecifiedName = name;
}

/* (non-Javadoc)
* @see ome.formats.model.IObjectContainerStore#getUserSpecifiedImageDescription()
* @see ome.formats.model.IObjectContainerStore#getUserSpecifiedDescription()
*/
public String getUserSpecifiedImageDescription()
public String getUserSpecifiedDescription()
{
return userSpecifiedImageDescription;
return userSpecifiedDescription;
}

/* (non-Javadoc)
* @see ome.formats.model.IObjectContainerStore#setUserSpecifiedImageDescription(java.lang.String)
* @see ome.formats.model.IObjectContainerStore#setUserSpecifiedDescription(java.lang.String)
*/
public void setUserSpecifiedImageDescription(String description)
public void setUserSpecifiedDescription(String description)
{
if (log.isDebugEnabled())
{
log.debug("Using user specified image description: " + description);
log.debug("Using user specified description: " + description);
}
this.userSpecifiedImageDescription = description;
this.userSpecifiedDescription = description;
}

/* (non-Javadoc)
Expand Down
10 changes: 4 additions & 6 deletions components/blitz/src/ome/formats/importer/ImportCandidates.java
Original file line number Diff line number Diff line change
Expand Up @@ -420,18 +420,16 @@ protected ImportContainer singleFile(File file, ImportConfig config)
ImportContainer ic = new ImportContainer(file,
null, null, format, usedFiles, isSPW);
ic.setDoThumbnails(config.doThumbnails.get());
String configImageName = config.imageName.get();
String configImageName = config.userSpecifiedName.get();
if (configImageName == null)
{
ic.setCustomImageName(path);
ic.setUserSpecifiedName(path);
}
else
{
ic.setCustomImageName(configImageName);
ic.setUserSpecifiedName(configImageName);
}
ic.setCustomImageDescription(config.imageDescription.get());
ic.setCustomPlateName(config.plateName.get());
ic.setCustomPlateDescription(config.plateDescription.get());
ic.setUserSpecifiedDescription(config.userSpecifiedDescription.get());
ic.setCustomAnnotationList(config.annotations.get());
return ic;
} finally
Expand Down
12 changes: 4 additions & 8 deletions components/blitz/src/ome/formats/importer/ImportConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,8 @@ public class ImportConfig {
public final LongValue group;
public final BoolValue doThumbnails;
public final StrValue email;
public final StrValue imageName;
public final StrValue imageDescription;
public final StrValue plateName;
public final StrValue plateDescription;
public final StrValue userSpecifiedName;
public final StrValue userSpecifiedDescription;
public final StrValue targetClass;
public final LongValue targetId;

Expand Down Expand Up @@ -214,10 +212,8 @@ public synchronized void load() {
group = new LongValue("group", this, null);
doThumbnails = new BoolValue("doThumbnails", this, true);
email = new StrValue("email", this);
imageName = new StrValue("imageName", this);
imageDescription = new StrValue("imageDescription", this);
plateName = new StrValue("plateName", this);
plateDescription = new StrValue("plateDescription", this);
userSpecifiedName = new StrValue("userSpecifiedName", this);
userSpecifiedDescription = new StrValue("userSpecifiedDescription", this);
targetClass = new StrValue("targetClass", this);
targetId = new LongValue("targetId", this, 0L);

Expand Down
82 changes: 18 additions & 64 deletions components/blitz/src/ome/formats/importer/ImportContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ public class ImportContainer
private Boolean isSPW;
private File file;
private Double[] userPixels;
private String customImageName;
private String customImageDescription;
private String customPlateName;
private String customPlateDescription;
private String userSpecifiedName;
private String userSpecifiedDescription;
private boolean doThumbnails = true;
private List<Annotation> customAnnotationList;
private IObject target;
Expand Down Expand Up @@ -84,89 +82,45 @@ public void setDoThumbnails(boolean v)
}

/**
* Retrieves the current custom image name string.
* Retrieves the current custom image/plate name string.
* @return As above. <code>null</code> if it has not been set.
*/
public String getCustomImageName()
public String getUserSpecifiedName()
{
return customImageName;
return userSpecifiedName;
}

/**
* Sets the custom image name for import. If this value is left
* null, the image description supplied by Bio-Formats will be used.
* @param v A custom image name to use for all images represented
* Sets the custom image/plate name for import. If this value is left
* null, the image/plate name supplied by Bio-Formats will be used.
* @param v A custom image/plate name to use for all entities represented
* by this container.
*/
public void setCustomImageName(String v)
public void setUserSpecifiedName(String v)
{
customImageName = v;
userSpecifiedName = v;
}

/**
* Retrieves the current custom image description string.
* Retrieves the current custom image/plate description string.
* @return As above. <code>null</code> if it has not been set.
* @since OMERO Beta 4.2.1.
*/
public String getCustomImageDescription()
public String getUserSpecifiedDescription()
{
return customImageDescription;
return userSpecifiedDescription;
}

/**
* Sets the custom image description for import. If this value is left
* null, the image description supplied by Bio-Formats will be used.
* @param v A custom image description to use for all images represented
* Sets the custom image/plate description for import. If this value is left
* null, the image/plate description supplied by Bio-Formats will be used.
* @param v A custom image/plate description to use for all images represented
* by this container.
* @since OMERO Beta 4.2.1.
*/
public void setCustomImageDescription(String v)
public void setUserSpecifiedDescription(String v)
{
customImageDescription = v;
}

/**
* Retrieves the current custom plate name string.
* @return As above. <code>null</code> if it has not been set.
* @since OMERO Beta 4.2.1.
*/
public String getCustomPlateName()
{
return customPlateName;
}

/**
* Sets the custom plate name for import. If this value is left
* null, the plate description supplied by Bio-Formats will be used.
* @param v A custom plate name to use for all plates represented
* by this container.
* @since OMERO Beta 4.2.1.
*/
public void setCustomPlateName(String v)
{
customPlateName = v;
}

/**
* Retrieves the current custom plate description string.
* @return As above. <code>null</code> if it has not been set.
* @since OMERO Beta 4.2.1.
*/
public String getCustomPlateDescription()
{
return customPlateDescription;
}

/**
* Sets the custom plate description for import. If this value is left
* null, the plate description supplied by Bio-Formats will be used.
* @param v A custom plate description to use for all plates represented
* by this container.
* @since OMERO Beta 4.2.1.
*/
public void setCustomPlateDescription(String v)
{
customPlateDescription = v;
userSpecifiedDescription = v;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void doImport() throws Throwable
{
ic = new ImportContainer(file, fads.get(file),
null, null, null, null);
ic.setCustomImageName(file.getAbsolutePath());
ic.setUserSpecifiedName(file.getAbsolutePath());
library.importImage(ic, 0, 0, 1);
/*
library.importImage(file, 0, 0, 1, file.getAbsolutePath(),
Expand Down
4 changes: 0 additions & 4 deletions components/blitz/src/ome/formats/importer/ImportLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,6 @@ public static RepositoryImportContainer createRepositoryImportContainer(ImportCo
}
repoIC.userPixels = userPixels;
}
repoIC.customImageName = ic.getCustomImageName();
repoIC.customImageDescription = ic.getCustomImageDescription();
repoIC.customPlateName = ic.getCustomPlateName();
repoIC.customPlateDescription = ic.getCustomPlateDescription();
repoIC.doThumbnails = ic.getDoThumbnails();
repoIC.customAnnotationList = ic.getCustomAnnotationList();
return repoIC;
Expand Down
Loading

0 comments on commit 92ec095

Please sign in to comment.