/** * Create an instance of {@link Nodes } * */ public Nodes createNodes() { return new Nodes(); }
@Override public Nodes findAllNodesInWizardLabels(String searchpath) { // search all .xml files Iterator<File> labelFiles = FileUtils.iterateFiles(new File(searchpath), new String[] { "xml" }, false); Nodes nodes = null; while (labelFiles.hasNext()) { File labelFile = labelFiles.next(); LOGGER.info("Found labelFile: {}", labelFile); String fileName = FilenameUtils.getBaseName(labelFile.getName()); long uniqueId = NodeUtils.parseUniqueId(fileName); if (nodes == null) { // create default empty Nodes instance nodes = new Nodes().withSearchPath(searchpath); } NodeLabel nodeLabel = new NodeLabel(); nodeLabel.withUniqueId(uniqueId); nodes.withNodeLabel(nodeLabel); } if (nodes != null) { LOGGER.info("Set the migrator class."); nodes.setMigratorClass(getClass().getName()); } return nodes; }
if (macroNodes != null && CollectionUtils.isNotEmpty(macroNodes.getNodeLabel())) { if (nodes == null) { nodes = new Nodes(); if (accessoryNodes != null && CollectionUtils.isNotEmpty(accessoryNodes.getNodeLabel())) { if (nodes == null) { nodes = new Nodes(); if (feedbackPortNodes != null && CollectionUtils.isNotEmpty(feedbackPortNodes.getNodeLabel())) { if (nodes == null) { nodes = new Nodes(); if (switchPortNodes != null && CollectionUtils.isNotEmpty(switchPortNodes.getNodeLabel())) { if (nodes == null) { nodes = new Nodes(); if (servoPortNodes != null && CollectionUtils.isNotEmpty(servoPortNodes.getNodeLabel())) { if (nodes == null) { nodes = new Nodes(); LOGGER.info("Found lightPort labels to merge: {}", lightPortNodes); if (nodes == null) { nodes = new Nodes(); if (inputPortNodes != null && CollectionUtils.isNotEmpty(inputPortNodes.getNodeLabel())) { if (nodes == null) { nodes = new Nodes();