Package org.exist.memtree

Examples of org.exist.memtree.MemTreeBuilder.startDocument()


    SVNStatusClient statusClient = manager.getStatusClient();
   
    SVNWCClient wcClient = manager.getWCClient();

    MemTreeBuilder builder = context.getDocumentBuilder();
        builder.startDocument();
        builder.startElement(new QName("status", null, null), null);
   
        try {
      statusClient.doStatus(
          new Resource(uri),
View Full Code Here


     */
    private Sequence encodeResponseAsXML(final XQueryContext context, final HttpMethod method, final int statusCode, final Map<String, Boolean> parserFeatures, final Map<String, String> parserProperties) throws XPathException, IOException {

        final MemTreeBuilder builder = context.getDocumentBuilder();

        builder.startDocument();
        builder.startElement(new QName("response", NAMESPACE_URI, PREFIX), null );
        builder.addAttribute(new QName("statusCode", null, null), String.valueOf(statusCode));

        //Add all the response headers
        builder.startElement(new QName("headers", NAMESPACE_URI, PREFIX), null);
View Full Code Here

     */
    private Sequence encodeErrorResponse(final XQueryContext context, final String message) throws IOException, XPathException {

        final MemTreeBuilder builder = context.getDocumentBuilder();

        builder.startDocument();
        builder.startElement(new QName("response", NAMESPACE_URI, PREFIX), null);
        builder.addAttribute(new QName("statusCode", null, null), HTTP_EXCEPTION_STATUS_CODE);

        builder.startElement(new QName("body", NAMESPACE_URI, PREFIX), null);

View Full Code Here

            //we have to use CloseShieldInputStream otherwise the parser closes the stream and we cant later reread
            final InputSource src = new InputSource(new CloseShieldInputStream(is));

            reader = getBrokerPool().getParserPool().borrowXMLReader();
            final MemTreeBuilder builder = new MemTreeBuilder();
            builder.startDocument();
            final DocumentBuilderReceiver receiver = new DocumentBuilderReceiver(builder, true);
            reader.setContentHandler(receiver);
            reader.setProperty("http://xml.org/sax/properties/lexical-handler", receiver);
            reader.parse(src);
            builder.endDocument();
View Full Code Here

        ZipInputStream zis = null;

        Sequence xmlResponse = null;
        MemTreeBuilder builder = context.getDocumentBuilder();

        builder.startDocument();
        builder.startElement( new QName( "file", ZipModule.NAMESPACE_URI, ZipModule.PREFIX ), null );
        builder.addAttribute( new QName( "href", null, null ), uri.toString() );

        try {
            zis = zipFileSource.getStream();
View Full Code Here

                // iterate through the result set building an XML document
                rs = stmt.getResultSet();
                ResultSetMetaData rsmd     = rs.getMetaData();
                int               iColumns = rsmd.getColumnCount();

                builder.startDocument();

                builder.startElement( new QName( "result", SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );
                builder.addAttribute( new QName( "count", null, null ), String.valueOf( -1 ) );

                while( rs.next() ) {
View Full Code Here

                builder.endElement();
            } else {
                /* SQL Query performed updates */

                builder.startDocument();

                builder.startElement( new QName( "result", SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );
                builder.addAttribute( new QName( "updateCount", null, null ), String.valueOf( stmt.getUpdateCount() ) );
                builder.endElement();
            }
View Full Code Here

            LOG.error( "sql:execute() Caught SQLException \"" + sqle.getMessage() + "\" for SQL: \"" + sql + "\"", sqle );

            //return details about the SQLException
            MemTreeBuilder builder = context.getDocumentBuilder();

            builder.startDocument();
            builder.startElement( new QName( "exception", SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );

            boolean recoverable = false;

            if( sqle instanceof SQLRecoverableException ) {
View Full Code Here

        LOG.error("oracle:execute() Caught SQLException \"" + sqle.getMessage() + "\" for PL/SQL: \"" + plSql + "\"", sqle);
       
        //return details about the SQLException
        MemTreeBuilder builder = context.getDocumentBuilder();
       
        builder.startDocument();
        builder.startElement(new QName("exception", OracleModule.NAMESPACE_URI, OracleModule.PREFIX), null);
       
        boolean recoverable = false;
        if(sqle instanceof SQLRecoverableException)
        {
View Full Code Here

     
      boolean includeHeaders = args[1].effectiveBooleanValue();
     
      MemTreeBuilder builder = context.getDocumentBuilder();
       
          builder.startDocument();
          builder.startElement( new QName( "messages", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
          builder.addAttribute( new QName( "count", null, null ), String.valueOf( msgList.length ) );
     
      try {
        for( int i = 0; i < msgList.length; i++ ) {
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.