package org.csstudio.archive;

import org.csstudio.platform.data.ITimestamp;

/** Information for one Channel in archive.
 *  @see ArchiveServer#getNames(int, String)
 *  @author Kay Kasemir
 */
public class NameInfo
{
	private final String name;
	private final ITimestamp start, end;

	/** Constructor. */
	public NameInfo(String name, ITimestamp start, ITimestamp end)
	{
		this.name = name;
		this.start = start;
		this.end = end;
	}

	/** @return The channel name. */
	public String getName()
	{	return name;	}

	/** @return The time stamp of the first sample found in the archive. */
	public ITimestamp getStart()
	{	return start;	}

	/** @return The time stamp of the last sample found in the archive. */
	public ITimestamp getEnd()
	{	return end;	}
	
	@Override public String toString()
	{
		return String.format("'%s': %s - %s", //$NON-NLS-1$
				name, start.toString(), end.toString());
	}
}
@@ -752,16 +752,45 @@
 d;%09%7D%0A%09%0A%09
+@SuppressWarnings(%22nls%22)%0A    
 @Overrid
@@ -819,16 +819,61 @@
 ng()%0A%09%7B%0A
+%09    if (start != null  &&  end != null)%0A    
 %09%09return
@@ -907,23 +907,13 @@
 %25s%22,
- //$NON-NLS-1$%0A
+%0A    
 %09%09%09%09
@@ -953,12 +953,196 @@
 ing());%0A
+%09    else if (end != null)%0A            return String.format(%22'%25s': ? - %25s%22,%0A                    name, end.toString());%0A%09    else%0A            return String.format(%22'%25s': ? - ?%22, name);%0A
 %09%7D%0A%7D

Handle null start/end times