Examples of QDocument


Examples of com.caucho.xml.QDocument

  private QDocument parseDocument(Path path, Schema schema)
    throws LineConfigException, IOException, org.xml.sax.SAXException
  {
    // server/2d33
    SoftReference<QDocument> docRef = null;//_parseCache.get(path);
    QDocument doc;

    if (docRef != null) {
      doc = docRef.get();

      if (doc != null && ! doc.isModified())
        return doc;
    }

    ReadStream is = path.openRead();
View Full Code Here

Examples of com.caucho.xml.QDocument

  private QDocument parseDocument(InputStream is, Schema schema)
    throws LineConfigException,
           IOException,
           org.xml.sax.SAXException
  {
    QDocument doc = new QDocument();
    DOMBuilder builder = new DOMBuilder();

    builder.init(doc);
    String systemId = null;
    String filename = null;
    if (is instanceof ReadStream) {
      systemId = ((ReadStream) is).getPath().getURL();
      filename = ((ReadStream) is).getPath().getUserPath();
    }

    doc.setSystemId(systemId);
    builder.setSystemId(systemId);
    doc.setRootFilename(filename);
    builder.setFilename(filename);
    builder.setSkipWhitespace(true);

    InputSource in = new InputSource();
    in.setByteStream(is);
View Full Code Here

Examples of com.caucho.xml.QDocument

  private QDocument parseDocument(InputStream is, Schema schema)
    throws LineConfigException,
           IOException,
           org.xml.sax.SAXException
  {
    QDocument doc = new QDocument();
    DOMBuilder builder = new DOMBuilder();

    builder.init(doc);
    String systemId = null;
    String filename = null;
    if (is instanceof ReadStream) {
      systemId = ((ReadStream) is).getPath().getURL();
      filename = ((ReadStream) is).getPath().getUserPath();
    }

    doc.setSystemId(systemId);
    builder.setSystemId(systemId);
    doc.setRootFilename(filename);
    builder.setFilename(filename);
    builder.setSkipWhitespace(true);

    InputSource in = new InputSource();
    in.setByteStream(is);
View Full Code Here

Examples of com.caucho.xml.QDocument

    _tracker = new NamespaceWriterContext(repair);

    _current = result.getNode();

    if (_current == null) {
      _current = _document = new QDocument();
      result.setNode(_document);
    }
    else {
      if (_current.getNodeType() == Node.DOCUMENT_NODE)
        _document = (Document) _current;
View Full Code Here

Examples of com.caucho.xml.QDocument

   */
  public Object configure(Object obj, Path path)
    throws ConfigException, IOException
  {
    try {
      QDocument doc = parseDocument(path, null);

      return configure(obj, doc.getDocumentElement());
    } catch (RuntimeException e) {
      throw e;
    } catch (IOException e) {
      throw e;
    } catch (Exception e) {
View Full Code Here

Examples of com.caucho.xml.QDocument

   * Configures a bean with a configuration file.
   */
  public Object configure(Object obj, InputStream is)
    throws Exception
  {
    QDocument doc = parseDocument(is, null);

    return configure(obj, doc.getDocumentElement());
  }
View Full Code Here

Examples of com.caucho.xml.QDocument

    throws ConfigException
  {
    try {
      Schema schema = findCompactSchema(schemaLocation);

      QDocument doc = parseDocument(path, schema);

      return configure(obj, doc.getDocumentElement());
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw LineConfigException.create(e);
    }
View Full Code Here

Examples of com.caucho.xml.QDocument

   */
  public Object configure(Object obj, Path path, Schema schema)
    throws ConfigException
  {
    try {
      QDocument doc = parseDocument(path, schema);

      return configure(obj, doc.getDocumentElement());
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
View Full Code Here

Examples of com.caucho.xml.QDocument

                          String schemaLocation)
    throws Exception
  {
    Schema schema = findCompactSchema(schemaLocation);

    QDocument doc = parseDocument(is, schema);

    return configure(obj, doc.getDocumentElement());
  }
View Full Code Here

Examples of com.caucho.xml.QDocument

  public Object configure(Object obj,
                          InputStream is,
                          Schema schema)
    throws Exception
  {
    QDocument doc = parseDocument(is, schema);

    return configure(obj, doc.getDocumentElement());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.