}
// TODO shouldn't have to reparse the properties here.
// this.properties should be a Set<Property>
Set<ITEM_PROPERTIES> itemProps = Sets.newEnumSet(Property.filter(VocabUtil.parsePropertyList(
properties, ITEM_VOCABS, QuietReport.INSTANCE,
new MessageLocation(path, parser.getLineNumber(), parser.getColumnNumber())),
ITEM_PROPERTIES.class), ITEM_PROPERTIES.class);
itemProps.remove(ITEM_PROPERTIES.NAV);
itemProps.remove(ITEM_PROPERTIES.COVER_IMAGE);
for (ITEM_PROPERTIES propSet : propertiesSet)
{
if (itemProps.contains(propSet))
{
itemProps.remove(propSet);
}
else
{
report.message(MessageId.OPF_014, new MessageLocation(path, 0, 0),
EnumVocab.ENUM_TO_NAME.apply(propSet));
}
}
if (itemProps.contains(ITEM_PROPERTIES.REMOTE_RESOURCES))
{
itemProps.remove(ITEM_PROPERTIES.REMOTE_RESOURCES);
report.message(MessageId.OPF_018,
new MessageLocation(path, parser.getLineNumber(), parser.getColumnNumber()));
}
if (!itemProps.isEmpty())
{
report.message(MessageId.OPF_015, new MessageLocation(path, 0, 0),
Joiner.on(", ").join(Collections2.transform(itemProps, EnumVocab.ENUM_TO_NAME)));
}
}