*/
public void doGet( String path, Map parameters, PrintWriter out )
throws IOException
{
String name = getParameter( parameters, "name" );
InstrumentableDescriptor desc;
try
{
desc = getInstrumentManager().locateInstrumentableDescriptor( name );
}
catch ( NoSuchInstrumentableException e )
{
// Sample no longer exists, go back to the parent instrument.
int pos = name.lastIndexOf( '.' );
if ( pos >= 0 )
{
throw new HTTPRedirect(
"instrumentable.html?name=" + urlEncode( name.substring( 0, pos ) ) );
}
else
{
throw new HTTPRedirect( "instrument-manager.html" );
}
}
out.println( "<html>" );
out.println( "<head><title>" + desc.getDescription() + "</title></head>" );
out.println( "<body>" );
breadCrumbs( out, desc, false );
out.println( "<h2>Instrumentable</h2>" );
startTable( out );
tableRow( out, 0, "Name", desc.getName() );
tableRow( out, 0, "Description", desc.getDescription() );
endTable( out );
InstrumentableDescriptor[] instrumentables = desc.getChildInstrumentableDescriptors();
if ( instrumentables.length > 0 )
{
out.println( "<h2>Instrumentables</h2>" );
outputInstrumentables( out, instrumentables );
}
InstrumentDescriptor[] instruments = desc.getInstrumentDescriptors();
if ( instruments.length > 0 )
{
out.println( "<h2>Instruments</h2>" );
outputInstruments( out, instruments );
}