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