public void setProperties(List<Element> properties) throws Exception {
HashMap<String, Element> hashMap = new HashMap<>();
for (Element element : properties) {
hashMap.put(element.getLocalName(), element);
}
StringListTypeAdapter adapter = new StringListTypeAdapter();
this.version = Version.parse(hashMap.get("Version").getTextContent());
this.title = hashMap.get("Title").getTextContent();
this.iconUrl = hashMap.get("IconUrl").getTextContent();
this.licenseUrl = hashMap.get("LicenseUrl").getTextContent();
this.projectUrl = hashMap.get("ProjectUrl").getTextContent();
this.reportAbuseUrl = hashMap.get("ReportAbuseUrl").getTextContent();
this.downloadCount = getIntegerContent(hashMap.get("DownloadCount"));
this.versionDownloadCount = getIntegerContent(hashMap.get("VersionDownloadCount"));
this.ratingsCount = getIntegerContent(hashMap.get("RatingsCount"));
this.versionRatingsCount = getIntegerContent(hashMap.get("VersionRatingsCount"));
this.rating = getDoubleContent(hashMap.get("Rating"));
this.versionRating = getDoubleContent(hashMap.get("VersionRating"));
this.requireLicenseAcceptance = getBooleanContent(hashMap.get("RequireLicenseAcceptance"));
this.description = hashMap.get("Description").getTextContent();
this.releaseNotes = hashMap.get("ReleaseNotes").getTextContent();
this.language = hashMap.get("Language").getTextContent();
this.published = javax.xml.bind.DatatypeConverter.parseDateTime(hashMap.get("Published").getTextContent()).getTime();
this.price = getDoubleContent(hashMap.get("Price"));
this.dependencies = hashMap.get("Dependencies").getTextContent();
this.packageHash = hashMap.get("PackageHash").getTextContent();
this.packageSize = getLongContent(hashMap.get("PackageSize"));
this.externalPackageUri = getStringContent(hashMap.get("ExternalPackageUri"));
this.categories = getStringContent(hashMap.get("Categories"));
this.copyright = getStringContent(hashMap.get("Copyright"));
this.packageType = getStringContent(hashMap.get("PackageType"));
this.tags = adapter.unmarshal(hashMap.get("Tags").getTextContent());
this.isLatestVersion = getBooleanContent(hashMap.get("IsLatestVersion"));
this.summary = getStringContent(hashMap.get("Summary"));
}