protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) { Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class); if (advice.size() > 0) { // Only process the first license we find for this IU. ILicenseAdvice entry = advice.iterator().next(); String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$ String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$ if (licenseText.length() > 0 || licenseUrl.length() > 0) iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)}); } }
protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) { Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class); if (advice.size() > 0) { // Only process the first license we find for this IU. ILicenseAdvice entry = advice.iterator().next(); String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$ String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$ if (licenseText.length() > 0 || licenseUrl.length() > 0) iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)}); } }
protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) { Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class); if (advice.size() > 0) { // Only process the first license we find for this IU. ILicenseAdvice entry = advice.iterator().next(); String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$ String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$ if (licenseText.length() > 0 || licenseUrl.length() > 0) iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)}); } }
protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) { Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class); if (advice.size() > 0) { // Only process the first license we find for this IU. ILicenseAdvice entry = advice.iterator().next(); String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$ String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$ if (licenseText.length() > 0 || licenseUrl.length() > 0) iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)}); } }