/** Construct a new stage from the information contained in the node bundle. */ @SuppressWarnings("deprecation") public BundleStage( StageInformation stageInfo, UtilContext context, MasterMgrClient client, NodeMod mod, TreeMap<String, BaseAnnotation> annotations, TreeMap<String, String> toolsetRemap, TreeMap<String, String> selectionKeyRemap, TreeMap<String, String> licenseKeyRemap, TreeMap<String, String> hardwareKeyRemap) { super("Bundle", "Description...", stageInfo, context, client, mod, StageFunction.aNone); pOrigNodeMod = mod; { String ntset = toolsetRemap.get(mod.getToolset()); if (ntset != null) pRemappedToolset = ntset; else pRemappedToolset = super.getToolset(); } JobReqs jreqs = mod.getJobRequirements(); if (jreqs != null) { { TreeSet<String> selectionKeys = new TreeSet<String>(); for (String key : jreqs.getSelectionKeys()) { String nkey = selectionKeyRemap.get(key); if (nkey != null) selectionKeys.add(nkey); } addSelectionKeys(selectionKeys); } { TreeSet<String> licenseKeys = new TreeSet<String>(); for (String key : jreqs.getLicenseKeys()) { String nkey = licenseKeyRemap.get(key); if (nkey != null) licenseKeys.add(nkey); } addLicenseKeys(licenseKeys); } { TreeSet<String> hardwareKeys = new TreeSet<String>(); for (String key : jreqs.getHardwareKeys()) { String nkey = hardwareKeyRemap.get(key); if (nkey != null) hardwareKeys.add(nkey); } addHardwareKeys(hardwareKeys); } } for (String aname : annotations.keySet()) addAnnotation(aname, annotations.get(aname)); { TreeMap<String, BaseAnnotation> annots = mod.getAnnotations(); for (String aname : annots.keySet()) addVersionAnnotation(aname, annots.get(aname)); } }