class LicenseIdFilter implements Filter {

    @Override
    public boolean filter(final Object datamodelObj) {
        if(datamodelObj instanceof DbLicense){
            return licenseId.equals( ((DbLicense)datamodelObj).getName());
        }

        if(datamodelObj instanceof DbArtifact){
            return ((DbArtifact)datamodelObj).getLicenses().contains(licenseId);
        }

        return false;
    }

    public  LicenseIdFilter(final String licenseId);

}