use of org.eclipse.mylyn.docs.epub.opf.util.OPFValidator in project mylyn.docs by eclipse.
the class Publication method validateMetadata.
/**
* Validates the data model contents.
*
* @return a list of EMF diagnostics
*/
public List<Diagnostic> validateMetadata() {
EValidator.Registry.INSTANCE.put(OPFPackage.eINSTANCE, new OPFValidator());
BasicDiagnostic diagnostics = new BasicDiagnostic();
for (EObject eo : opfPackage.eContents()) {
Map<Object, Object> context = new HashMap<Object, Object>();
Diagnostician.INSTANCE.validate(eo, diagnostics, context);
}
return diagnostics.getChildren();
}
Aggregations