public static boolean validate(File unzippedDir) {
//with VFS FIXME:pb:c: remove casts to LocalFileImpl and LocalFolderImpl if no longer needed.
VFSContainer vfsUnzippedRoot = new LocalFolderImpl(unzippedDir);
VFSItem vfsQTI = vfsUnzippedRoot.resolve("qti.xml");
//getDocument(..) ensures that InputStream is closed in every case.
Document doc = QTIHelper.getDocument((LocalFileImpl) vfsQTI);
//if doc is null an error loading the document occured
if (doc == null) return false;
List metas = doc.selectNodes("questestinterop/assessment/qtimetadata/qtimetadatafield");
for (Iterator iter = metas.iterator(); iter.hasNext();) {
Element el_metafield = (Element) iter.next();
Element el_label = (Element) el_metafield.selectSingleNode("fieldlabel");
String label = el_label.getText();
if (label.equals(AssessmentInstance.QMD_LABEL_TYPE)) { // type meta