public List<DbLicense> getArtifactLicenses(final String gavc, final FiltersHolder filters) {
        final DbArtifact artifact = getArtifact(gavc);
        final List<DbLicense> licenses = new ArrayList<>();

        for(final String name: artifact.getLicenses()){
            final Set<DbLicense> matchingLicenses = licenseMatcher.getMatchingLicenses(name);

            // Here is a license to identify
            if(matchingLicenses.isEmpty()){
                final DbLicense notIdentifiedLicense = new DbLicense();
                notIdentifiedLicense.setName(name);
                licenses.add(notIdentifiedLicense);
            } else {
                matchingLicenses.stream()
                        .filter(filters::shouldBeInReport)
                        .forEach(licenses::add);
            }
        }

        return licenses;
    }
public List < DbLicense > getArtifactLicenses ( final String gavc , final FiltersHolder filters ) { final DbArtifact artifact = getArtifact ( gavc ) ; final List < DbLicense > licenses = new ArrayList < > ( ) ; for ( final String name : artifact . getLicenses ( ) ) { final Set < DbLicense > matchingLicenses = licenseMatcher . getMatchingLicenses ( name ) ; if ( matchingLicenses . isEmpty ( ) ) { final DbLicense notIdentifiedLicense = new DbLicense ( ) ; notIdentifiedLicense . setName ( name ) ; licenses . add ( notIdentifiedLicense ) ; } else { matchingLicenses . stream ( ) . filter ( filters :: shouldBeInReport ) . forEach ( licenses :: add ) ; } } return licenses ; }
Return the list of licenses attached to an artifact

@param gavc String
@param filters FiltersHolder
@return List<DbLicense>