Package org.exist.memtree

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


    builder.startElement( new QName( "directory-entries", DSML_NAMESPACE, DSML_PREFIX ), null );
   
    while( results.hasMore() ) {
      SearchResult result = (SearchResult)results.next();
     
      builder.startElement( new QName( "entry", DSML_NAMESPACE, DSML_PREFIX ), null );
      builder.addAttribute( new QName( "dn", null, null ), result.getName() );

      // Handle objectClass attributes
      Attribute ocattr = result.getAttributes().get( "objectClass" );
     
View Full Code Here


      // Handle objectClass attributes
      Attribute ocattr = result.getAttributes().get( "objectClass" );
     
      if( ocattr != null ) {
        builder.startElement( new QName( "objectclass", DSML_NAMESPACE, DSML_PREFIX ), null );
       
        for( int i = 0; i < ocattr.size(); i++ ) {
            Object value = ocattr.get( i );
           
            builder.startElement( new QName( "oc-value", DSML_NAMESPACE, DSML_PREFIX ), null );
View Full Code Here

        builder.startElement( new QName( "objectclass", DSML_NAMESPACE, DSML_PREFIX ), null );
       
        for( int i = 0; i < ocattr.size(); i++ ) {
            Object value = ocattr.get( i );
           
            builder.startElement( new QName( "oc-value", DSML_NAMESPACE, DSML_PREFIX ), null );
            builder.characters( value.toString() );
            builder.endElement();
          }
       
        builder.endElement();
View Full Code Here

       
        String name = attr.getID();
       
        if( !name.equals( "objectClass" ) ) {
       
          builder.startElement( new QName( "attr", DSML_NAMESPACE, DSML_PREFIX ), null );
          builder.addAttribute( new QName( "name", null, null ), name );
         
          for( int i = 0; i < attr.size(); i++ ) {
            Object value = attr.get( i );
           
View Full Code Here

          builder.addAttribute( new QName( "name", null, null ), name );
         
          for( int i = 0; i < attr.size(); i++ ) {
            Object value = attr.get( i );
           
            builder.startElement( new QName( "value", DSML_NAMESPACE, DSML_PREFIX ), null );
            if( name.equals( "userPassword" ) ) {
              builder.characters( new String( (byte[])value ) );
            } else {
              builder.characters( value.toString() );
            }
View Full Code Here

            FTPFile[] ftpFiles = ftp.listFiles();
               
            MemTreeBuilder builder = context.getDocumentBuilder();
            builder.startDocument();
            builder.startElement(new QName("list", FTPClientModule.NAMESPACE_URI), null);
               
            for(FTPFile ftpFile : ftpFiles) {
                if (ftpFile.getType() == FTPFile.FILE_TYPE) {
                    builder.startElement(new QName("file", FTPClientModule.NAMESPACE_URI), null);
                }
View Full Code Here

            builder.startDocument();
            builder.startElement(new QName("list", FTPClientModule.NAMESPACE_URI), null);
               
            for(FTPFile ftpFile : ftpFiles) {
                if (ftpFile.getType() == FTPFile.FILE_TYPE) {
                    builder.startElement(new QName("file", FTPClientModule.NAMESPACE_URI), null);
                }
                else if(ftpFile.getType() == FTPFile.DIRECTORY_TYPE) {
                    builder.startElement(new QName("directory", FTPClientModule.NAMESPACE_URI), null);
                }
                builder.characters(ftpFile.getName());
View Full Code Here

            for(FTPFile ftpFile : ftpFiles) {
                if (ftpFile.getType() == FTPFile.FILE_TYPE) {
                    builder.startElement(new QName("file", FTPClientModule.NAMESPACE_URI), null);
                }
                else if(ftpFile.getType() == FTPFile.DIRECTORY_TYPE) {
                    builder.startElement(new QName("directory", FTPClientModule.NAMESPACE_URI), null);
                }
                builder.characters(ftpFile.getName());
                builder.endElement();
            }
               
View Full Code Here

      MemTreeBuilder builder = context.getDocumentBuilder();
      AttributesImpl attrs = new AttributesImpl();
      attrs.addAttribute("", "result", "result", "CDATA", "ok");
      if (target != null)
        attrs.addAttribute("", "target", "target", "CDATA", target);
      builder.startElement(STATUS_ELEMENT, attrs);
      builder.endElement();
     
      return builder.getDocument().getNode(1);
    } finally {
      context.popDocumentContext();
View Full Code Here

        }

        MemTreeBuilder builder = context.getDocumentBuilder();

        builder.startDocument();
        builder.startElement(new QName("list", NAMESPACE_URI, PREFIX), null);
        builder.addAttribute(new QName("directory", null, null), baseDir.toString());

        for (SequenceIterator i = patterns.iterate(); i.hasNext();) {
            String pattern = i.nextItem().getStringValue();
            File[] scannedFiles = DirectoryScanner.scanDir(baseDir, pattern);
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.