*/
private boolean checkMetadataConsistency(String fileName,
MetadataService metadataService, Representation representation) {
boolean result = true;
if (representation != null) {
Variant var = new Variant();
updateMetadata(metadataService, fileName, var);
// "rep" contains the theorical correct metadata
if (!representation.getLanguages().isEmpty()
&& !var.getLanguages().containsAll(
representation.getLanguages())) {
result = false;
}
if (representation.getMediaType() != null
&& !(var.getMediaType() != null && var.getMediaType()
.includes(representation.getMediaType()))) {
result = false;
}
if (!representation.getEncodings().isEmpty()
&& !var.getEncodings().containsAll(
representation.getEncodings())) {
result = false;
}
}
return result;