Text bitstreamName = edit.addItem().addText("bitstreamName");
bitstreamName.setLabel(T_filename_label);
bitstreamName.setHelp(T_filename_help);
bitstreamName.setValue(fileName);
Select primarySelect = edit.addItem().addSelect("primary");
primarySelect.setLabel(T_primary_label);
primarySelect.addOption(primaryBitstream,"yes",T_primary_option_yes);
primarySelect.addOption(!primaryBitstream,"no",T_primary_option_no);
Text description = edit.addItem().addText("description");
description.setLabel(T_description_label);
description.setHelp(T_description_help);
description.setValue(bitstream.getDescription());
// EMBARGO FIELD
// if AdvancedAccessPolicy=false: add Embargo Fields.
if(!isAdvancedFormEnabled){
AccessStepUtil asu = new AccessStepUtil(context);
// if the item is embargoed default value will be displayed.
asu.addEmbargoDateSimpleForm(bitstream, edit, -1);
asu.addReason(null, edit, -1);
}
edit.addItem(T_para1);
// System supported formats
Select format = edit.addItem().addSelect("formatID");
format.setLabel(T_format_label);
// load the options menu, skipping the "Unknown" format since "Not on list" takes its place
int unknownFormatID = BitstreamFormat.findUnknown(context).getID();
format.addOption(-1,T_format_default);
for (BitstreamFormat bitstreamFormat : bitstreamFormats)
{
if (bitstreamFormat.getID() == unknownFormatID)
{
continue;
}
String supportLevel = "Unknown";
if (bitstreamFormat.getSupportLevel() == BitstreamFormat.KNOWN)
{
supportLevel = "known";
}
else if (bitstreamFormat.getSupportLevel() == BitstreamFormat.SUPPORTED)
{
supportLevel = "Supported";
}
String name = bitstreamFormat.getShortDescription()+" ("+supportLevel+")";
if (bitstreamFormat.isInternal())
{
name += " (Internal)";
}
int id = bitstreamFormat.getID();
format.addOption(id,name);
}
if (currentFormat != null)
{
format.setOptionSelected(currentFormat.getID());
}
else
{
format.setOptionSelected(-1);
}
edit.addItem(T_para2);
// User supplied format