use of org.olat.ims.qti21.model.xml.QTI21ExplorerHandler in project OpenOLAT by OpenOLAT.
the class CopyAndConvertVisitor method scanFile.
private QTI21Infos scanFile(Path inputFile) {
QTI21ExplorerHandler infosHandler = new QTI21ExplorerHandler();
try (InputStream in = Files.newInputStream(inputFile)) {
SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
saxParser.setProperty("http://xml.org/sax/properties/lexical-handler", infosHandler);
saxParser.parse(in, infosHandler);
} catch (Exception e1) {
log.error("", e1);
}
return infosHandler.getInfos();
}
use of org.olat.ims.qti21.model.xml.QTI21ExplorerHandler in project OpenOLAT by OpenOLAT.
the class QTI21IMSManifestExplorerVisitor method scanFile.
private QTI21ExplorerHandler scanFile(Path inputFile) {
QTI21ExplorerHandler infosHandler = new QTI21ExplorerHandler();
try (InputStream in = Files.newInputStream(inputFile)) {
SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
saxParser.setProperty("http://xml.org/sax/properties/lexical-handler", infosHandler);
saxParser.parse(in, infosHandler);
} catch (Exception e1) {
log.error("", e1);
}
return infosHandler;
}
use of org.olat.ims.qti21.model.xml.QTI21ExplorerHandler in project openolat by klemens.
the class CopyAndConvertVisitor method scanFile.
private QTI21Infos scanFile(Path inputFile) {
QTI21ExplorerHandler infosHandler = new QTI21ExplorerHandler();
try (InputStream in = Files.newInputStream(inputFile)) {
SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
saxParser.setProperty("http://xml.org/sax/properties/lexical-handler", infosHandler);
saxParser.parse(in, infosHandler);
} catch (Exception e1) {
log.error("", e1);
}
return infosHandler.getInfos();
}
use of org.olat.ims.qti21.model.xml.QTI21ExplorerHandler in project openolat by klemens.
the class QTI21IMSManifestExplorerVisitor method scanFile.
private QTI21ExplorerHandler scanFile(Path inputFile) {
QTI21ExplorerHandler infosHandler = new QTI21ExplorerHandler();
try (InputStream in = Files.newInputStream(inputFile)) {
SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
saxParser.setProperty("http://xml.org/sax/properties/lexical-handler", infosHandler);
saxParser.parse(in, infosHandler);
} catch (Exception e1) {
log.error("", e1);
}
return infosHandler;
}
Aggregations