@Override public void processMeta(ManifestMetadata file) { // Look for default description information. String description = extractValue(file.getManifest(), descriptionPriority); if (description == null) { return; } // if it exists, cleanse it. description = cleanseValue(description); if (StringUtils.isNotBlank(description)) { Summary vr = new Summary(); vr.setDescription(description); file.getArchiveMeta().getDecorations().add(vr); return; } }
@Override public void processMeta(ManifestMetadata file) { if (matchesAll(file.getManifest())) { Version vr = new Version(); if (StringUtils.isNotBlank(matchName)) { vr.setName(matchName); } else { String name = extractValue(file.getManifest(), namePriority); name = cleanseValue(name); vr.setName(name); } if (StringUtils.isNotBlank(matchVersion)) { vr.setVersion(matchVersion); } else { String version = extractValue(file.getManifest(), versionPriority); version = cleanseValue(version); vr.setVersion(version); } file.getArchiveMeta().getDecorations().add(vr); } }
@Override public void processMeta(ManifestMetadata file) { // Look for default description information. String link = extractValue(file.getManifest(), linkPriority); if (link == null) { return; } // if it exists, cleanse it. link = cleanseValue(link); if (StringUtils.isNotBlank(link)) { Link vr = new Link(); vr.setDescription("Project Site"); vr.setLink(link); file.getArchiveMeta().getDecorations().add(vr); return; } }
@Override public void processMeta(ManifestMetadata file) { // check to see if a version already exists. Only process if no version exists.. for (AbstractDecoration dr : file.getArchiveMeta().getDecorations()) { if (dr instanceof PomVersion) { LOG.debug("Already has version result: " + dr.toString()); return; } } // Otherwise look for default version information. String name = null; String version = extractValue(file.getManifest(), versionPriority); version = cleanseValue(version); if (version != null) { name = extractValue(file.getManifest(), namePriority); name = cleanseValue(name); // otherwise, guess the name from the archive name... // first, look for "-[0-9]" ane substring before that. if (StringUtils.isBlank(name)) { name = extractNameFromArchiveName(file.getArchiveMeta().getName()); } } if (StringUtils.isNotBlank(name) && StringUtils.isNotBlank(version)) { Version vr = new Version(); vr.setName(name); vr.setVersion(version); file.getArchiveMeta().getDecorations().add(vr); return; } }