Package org.exist.memtree

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


                    builder.startElement(new QName("dir",ZipModule.NAMESPACE_URI,ZipModule.PREFIX),null);
                    builder.addAttribute(new QName("name",null,null), zipEntry.toString());
                    builder.endElement();
                } else {
                    logger.debug("file: " + zipEntry.getName());
                    builder.startElement(new QName("entry",ZipModule.NAMESPACE_URI,ZipModule.PREFIX),null);
                    builder.addAttribute(new QName("name",null,null), zipEntry.toString());
                    builder.endElement();
                }
            }
        }catch(PermissionDeniedException pde) {
View Full Code Here


                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() ) {
                    builder.startElement( new QName( "row", SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );
                    builder.addAttribute( new QName( "index", null, null ), String.valueOf( rs.getRow() ) );
View Full Code Here

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

                while( rs.next() ) {
                    builder.startElement( new QName( "row", SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );
                    builder.addAttribute( new QName( "index", null, null ), String.valueOf( rs.getRow() ) );

                    // get each tuple in the row
                    for( int i = 0; i < iColumns; i++ ) {
                        String columnName = rsmd.getColumnLabel( i + 1 );
View Full Code Here

                                 * underscore's
                                 */
                                colElement = SQLUtils.escapeXmlAttr( columnName.replace( ' ', '_' ) );
                            }

                            builder.startElement( new QName( colElement, SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );

                            if(!makeNodeFromColumnName || columnName.length() <= 0) {
                                String name;

                                if( columnName.length() > 0 ) {
View Full Code Here

            } 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();
            }

            // Change the root element count attribute to have the correct value
View Full Code Here

            //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 ) {
                recoverable = true;
View Full Code Here

                recoverable = true;
            }
            builder.addAttribute( new QName( "recoverable", null, null ), String.valueOf( recoverable ) );


            builder.startElement( new QName( "state", SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );
            builder.characters( sqle.getSQLState() );
            builder.endElement();

            builder.startElement( new QName( "message", SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );
           
View Full Code Here

            builder.startElement( new QName( "state", SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );
            builder.characters( sqle.getSQLState() );
            builder.endElement();

            builder.startElement( new QName( "message", SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );
           
            String state = sqle.getMessage();
           
            if( state != null ) {
              builder.characters( state );
View Full Code Here

                endRevision = ((IntegerValue)args[4].itemAt(0)).getLong();
            MemTreeBuilder builder = context.getDocumentBuilder();
            AttributesImpl attribs = new AttributesImpl();
            attribs.addAttribute("", "uri", "uri", "CDATA", uri);
            attribs.addAttribute("", "start", "start", "CDATA", Long.toString(startRevision));
            int nodeNr = builder.startElement(LOG_ELEMENT, attribs);
            LogHandler handler = new LogHandler(builder);
            repo.log(new String[0], startRevision, endRevision, true, false, handler);
            builder.endElement();
        return builder.getDocument().getNode(nodeNr);
        } catch (SVNException e) {
View Full Code Here

              builder.characters( state );
            }
           
            builder.endElement();

            builder.startElement( new QName( "stack-trace", SQLModule.NAMESPACE_URI, SQLModule.PREFIX ), null );
            ByteArrayOutputStream bufStackTrace = new ByteArrayOutputStream();
            sqle.printStackTrace( new PrintStream( bufStackTrace ) );
            builder.characters( new String( bufStackTrace.toByteArray() ) );
            builder.endElement();
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.