Changeset 4620


Ignore:
Timestamp:
03/05/14 09:33:20 (10 years ago)
Author:
Twan Goosen
Message:

unit test for resource type counting service

Location:
vlo/branches/vlo-3.0/vlo-web-app/src
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/pojo/ResourceTypeCount.java

    r4618 r4620  
    4747    }
    4848
     49    @Override
     50    public int hashCode() {
     51        int hash = 7;
     52        hash = 89 * hash + (this.resourceType != null ? this.resourceType.hashCode() : 0);
     53        hash = 89 * hash + (this.count != null ? this.count.hashCode() : 0);
     54        return hash;
     55    }
     56
     57    @Override
     58    public boolean equals(Object obj) {
     59        if (obj == null) {
     60            return false;
     61        }
     62        if (getClass() != obj.getClass()) {
     63            return false;
     64        }
     65        final ResourceTypeCount other = (ResourceTypeCount) obj;
     66        if (this.resourceType != other.resourceType) {
     67            return false;
     68        }
     69        if (this.count != other.count && (this.count == null || !this.count.equals(other.count))) {
     70            return false;
     71        }
     72        return true;
     73    }
     74
    4975}
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/impl/ResourceTypeCountingServiceImpl.java

    r4619 r4620  
    6464            } else if (normalizeMimeType.equals(FacetConstants.RESOURCE_TYPE_VIDEO)) {
    6565                countBag.add(ResourceType.VIDEO);
     66            } else{
     67                countBag.add(ResourceType.OTHER);
    6668            }
    6769        }
Note: See TracChangeset for help on using the changeset viewer.