Package org.olat.ims.resources

Examples of org.olat.ims.resources.IMSEntityResolver


    BufferedInputStream bis = null;
    Document doc = null;
    try {
      in = new FileInputStream(documentF);
      bis = new BufferedInputStream(in);
      XMLParser xmlParser = new XMLParser(new IMSEntityResolver());
      doc = xmlParser.parse(bis, false);
    }
    catch (IOException e) {
      throw new OLATRuntimeException(ScormCPManifestTreeModel.class, "could not read and parse from file "+documentF.getAbsolutePath(),e);
    }
View Full Code Here


  private Document loadDocument(VFSLeaf documentF) {
    InputStream in = null;
    Document doc = null;
    try {
      in = documentF.getInputStream();
      XMLParser xmlParser = new XMLParser(new IMSEntityResolver());
      doc = xmlParser.parse(in, false);
      in.close();
    }
    catch (IOException e) {
      throw new OLATRuntimeException(CPManifestTreeModel.class, "could not read and parse from file " + documentF, e);
View Full Code Here

    Document doc = null;
    try {
      fIn = new File(packageDir, ImsRepositoryResolver.QTI_FILE);
      in = new FileInputStream(fIn);
      bis = new BufferedInputStream(in);
      XMLParser xmlParser = new XMLParser(new IMSEntityResolver());
      doc = xmlParser.parse(bis, true);
    } catch (Exception e) {     
      log.warn("Exception when parsing input QTI input stream for " + fIn != null ? fIn.getAbsolutePath() : "qti.xml", e);
      return null;
    } finally {
View Full Code Here

    File fDoc = new File(fUserdataRoot, path);
    Document doc = null;
    try {
      InputStream is = new FileInputStream(fDoc);
      BufferedInputStream bis = new BufferedInputStream(is);
      XMLParser xmlParser = new XMLParser(new IMSEntityResolver());
      doc = xmlParser.parse(bis, false);
      is.close();
      bis.close();
    } catch (Exception e) {
      throw new OLATRuntimeException(FilePersister.class, "Error retrieving results reporting for subject: '" + subj.getName() + "'; assessment id: '" + aiid + "'", e);
View Full Code Here

   *
   * @param is
   * @return
   */
  private static Document getDocument(InputStream is) {
    XMLParser xmlParser = new XMLParser(new IMSEntityResolver());
    Document doc = null;
    try {
      doc = xmlParser.parse(is, false);
      is.close();
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.olat.ims.resources.IMSEntityResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.