Skip to content
Snippets Groups Projects
Commit a0de9dbb authored by ribeaudc's avatar ribeaudc
Browse files

fix:

- ETL server in HCS_FORMAT mode.
add:
- TODOs and FIXMEs,

SVN: 2944
parent ac1145d6
No related branches found
No related tags found
No related merge requests found
......@@ -131,9 +131,11 @@ public class Format implements IStorable
/**
* Returns an unmodifiable list of mandatory parameters that are specific to this format.
* <p>
* They can be found in <code>metadata/parameters</code> directory. Default implementation retuns an empty list.
* They can be found in <code>metadata/parameters</code> directory. Default implementation returns an empty list.
* </p>
*/
// TODO 2007-12-05, Christian Ribeaud: Right place for this here? This gets lost as soon as Format gets instantiated
// in the runtime.
public List<String> getParameterNames()
{
return Collections.emptyList();
......
......@@ -47,7 +47,7 @@ public interface IFormatParameterFactory
public final FormatParameter createFormatParameter(final String name, final String value)
{
return null;
return new FormatParameter(name, value);
}
};
......
......@@ -23,7 +23,7 @@ package ch.systemsx.cisd.bds;
*/
public final class UnknownFormat1_0 extends Format
{
private static final String FORMAT_CODE = "UNKNOWN";
public static final String FORMAT_CODE = "UNKNOWN";
/**
* The one and only one instance.
*/
......
......@@ -67,7 +67,7 @@ public final class ChannelList implements IStorable, Iterable<Channel>
final List<Channel> channels = new ArrayList<Channel>(size);
for (int i = 0; i < size; i++)
{
channels.add(new Channel(i, 0));
channels.add(new Channel(i + 1, 0));
}
return new ChannelList(channels);
} catch (NumberFormatException ex)
......
......@@ -95,6 +95,9 @@ public final class FormatParameterFactory implements IFormatParameterFactory
} else if (name.equals(ChannelList.NUMBER_OF_CHANNELS))
{
return new FormatParameter(name, ChannelList.createChannelListFromString(value));
} else if (name.equals(HCSImageFormat1_0.CONTAINS_ORIGINAL_DATA))
{
return new FormatParameter(name, Boolean.valueOf(value));
}
return IFormatParameterFactory.DEFAULT_FORMAT_PARAMETER_FACTORY.createFormatParameter(name, value);
}
......
......@@ -31,7 +31,7 @@ import ch.systemsx.cisd.bds.Version;
public final class HCSImageFormat1_0 extends Format
{
private static final String FORMAT_CODE = "HCS_IMAGE";
public static final String FORMAT_CODE = "HCS_IMAGE";
/** Key for setting the measurement device that was used to take the data of this data set. */
public final static String DEVICE_ID = "device_id";
......
......@@ -153,8 +153,16 @@ public final class HCSImageFormattedData extends AbstractFormattedData implement
public final NodePath addStandardNode(final String originalFilePath, int channel, final Location plateLocation,
final Location wellLocation)
{
// This will check all parameters but originalFileName.
INode node = tryGetStandardNodeAt(channel, plateLocation, wellLocation);
// This will check all parameters but originalFilePath.
INode node = null;
// TODO 2007-12-05, Christian Ribeaud: Improve this.
try
{
node = tryGetStandardNodeAt(channel, plateLocation, wellLocation);
} catch (DataStructureException ex)
{
// Nothing to do here.
}
if (node != null)
{
throw new DataStructureException(String.format(
......@@ -190,8 +198,8 @@ public final class HCSImageFormattedData extends AbstractFormattedData implement
originalFilePath, channel, plateLocation, wellLocation));
}
final char sep = Constants.PATH_SEPARATOR;
final String standardNodePath = channelDir.getName() + sep + plateRowDir.getName() + sep + plateColumnDir + sep
+ wellFileName;
final String standardNodePath =
channelDir.getName() + sep + plateRowDir.getName() + sep + plateColumnDir + sep + wellFileName;
return new NodePath(node, standardNodePath);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment