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);
WebXmlModel webXml = webXmlService.addTypeToModel(xml);
if (StringUtils.isNotBlank(webXmlVersion))
{
webXmlVersion = StringUtils.replace(webXmlVersion, "_", ".");
webXml.setSpecificationVersion(webXmlVersion);
technologyTag.setVersion(webXmlVersion);
}
String displayName = $(doc).child("display-name").text();
displayName = StringUtils.trimToNull(displayName);
if (StringUtils.isNotBlank(displayName))
{
webXml.setDisplayName(displayName);
}
List<EnvironmentReferenceModel> refs = processEnvironmentReference(context, doc.getDocumentElement());
for (EnvironmentReferenceModel ref : refs)
{
webXml.addEnvironmentReference(ref);
}
}