for (EnvironmentReferenceModel ref : refs) webXml.addEnvironmentReference(ref);
for (EnvironmentReferenceModel ref : refs) webXml.addEnvironmentReference(ref);
private void addWebXmlMetadata(GraphContext context, XmlFileModel xml, Document doc) { TechnologyTagService technologyTagService = new TechnologyTagService(context); TechnologyTagModel technologyTag = technologyTagService.addTagToFileModel(xml, TECH_TAG, TECH_TAG_LEVEL); WebXmlService webXmlService = new WebXmlService(context); String webXmlVersion = getVersion(xml, doc); // check the root XML node. WebXmlModel webXml = webXmlService.addTypeToModel(xml); // change "_" in the version to "." if (StringUtils.isNotBlank(webXmlVersion)) { webXmlVersion = StringUtils.replace(webXmlVersion, "_", "."); webXml.setSpecificationVersion(webXmlVersion); // set the tag version technologyTag.setVersion(webXmlVersion); } String displayName = $(doc).child("display-name").text(); displayName = StringUtils.trimToNull(displayName); if (StringUtils.isNotBlank(displayName)) { webXml.setDisplayName(displayName); } // extract references. List<EnvironmentReferenceModel> refs = processEnvironmentReference(context, doc.getDocumentElement()); for (EnvironmentReferenceModel ref : refs) { webXml.addEnvironmentReference(ref); } }