Package org.exist.memtree

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


                        }
           
                        for (String userFlag : userFlags) {
                            builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                            builder.addAttribute( new QName( "type", null, null ), "user" );
                            builder.addAttribute(new QName( "value", null, null ), userFlag);
                            builder.endElement();
                        }

            builder.endElement();
          }
View Full Code Here


             
              while( headers.hasMoreElements() ) {
                Header header = (Header)headers.nextElement();
               
                builder.startElement( new QName( "header", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                      builder.addAttribute( new QName( "name", null, null ), header.getName() );
                builder.addAttribute( new QName( "value", null, null ), header.getValue() );
                builder.endElement();
              }
             
              builder.endElement();
View Full Code Here

              while( headers.hasMoreElements() ) {
                Header header = (Header)headers.nextElement();
               
                builder.startElement( new QName( "header", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                      builder.addAttribute( new QName( "name", null, null ), header.getName() );
                builder.addAttribute( new QName( "value", null, null ), header.getValue() );
                builder.endElement();
              }
             
              builder.endElement();
            }
View Full Code Here

   
    MemTreeBuilder builder = context.getDocumentBuilder();
         
    builder.startDocument();
      builder.startElement( new QName( "dsml", DSML_NAMESPACE, DSML_PREFIX ), null );
    builder.addAttribute( new QName( "dn", null, null ), dn );
    builder.startElement( new QName( "directory-entries", DSML_NAMESPACE, DSML_PREFIX ), null );
   
    while( results.hasMore() ) {
      SearchResult result = (SearchResult)results.next();
     
View Full Code Here

   
    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" );
     
      if( ocattr != null ) {
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 );
           
            builder.startElement( new QName( "value", DSML_NAMESPACE, DSML_PREFIX ), null );
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

                    relDir = relDir.replace(File.separatorChar, '/');
                }

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

                builder.addAttribute(new QName("name", null, null), file.getName());

                Long sizeLong = file.length();
                String sizeString = Long.toString(sizeLong);
                String humanSize = getHumanSize(sizeLong, sizeString);
View Full Code Here

                Long sizeLong = file.length();
                String sizeString = Long.toString(sizeLong);
                String humanSize = getHumanSize(sizeLong, sizeString);

                builder.addAttribute(new QName("size", null, null), sizeString);
                builder.addAttribute(new QName("human-size", null, null), humanSize);
                builder.addAttribute(new QName("modified", null, null), new DateTimeValue(new Date(file.lastModified())).getStringValue());

                if (relDir != null && relDir.length() > 0) {
                    builder.addAttribute(new QName("subdir", null, null), relDir);
View Full Code Here

                Long sizeLong = file.length();
                String sizeString = Long.toString(sizeLong);
                String humanSize = getHumanSize(sizeLong, sizeString);

                builder.addAttribute(new QName("size", null, null), sizeString);
                builder.addAttribute(new QName("human-size", null, null), humanSize);
                builder.addAttribute(new QName("modified", null, null), new DateTimeValue(new Date(file.lastModified())).getStringValue());

                if (relDir != null && relDir.length() > 0) {
                    builder.addAttribute(new QName("subdir", null, null), relDir);
                }
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.