Package org.exist.memtree

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


          Flags       flags   = message.getFlags();
          Flags.Flag[]   systemFlags    = flags.getSystemFlags();
          String[]     userFlags     = flags.getUserFlags();
         
          if( systemFlags.length > 0 || userFlags.length > 0 ) {
            builder.startElement( new QName( "flags", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
           
                        for (Flags.Flag systemFlag : systemFlags) {
                            if (systemFlag == Flags.Flag.ANSWERED) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "answered" );
View Full Code Here


          if( systemFlags.length > 0 || userFlags.length > 0 ) {
            builder.startElement( new QName( "flags", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
           
                        for (Flags.Flag systemFlag : systemFlags) {
                            if (systemFlag == Flags.Flag.ANSWERED) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "answered" );
                                builder.endElement();
                            } else if (systemFlag == Flags.Flag.DELETED) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "deleted" );
View Full Code Here

                            if (systemFlag == Flags.Flag.ANSWERED) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "answered" );
                                builder.endElement();
                            } else if (systemFlag == Flags.Flag.DELETED) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "deleted" );
                                builder.endElement();
                            } else if (systemFlag == Flags.Flag.DRAFT) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "draft" );
View Full Code Here

                            } else if (systemFlag == Flags.Flag.DELETED) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "deleted" );
                                builder.endElement();
                            } else if (systemFlag == Flags.Flag.DRAFT) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "draft" );
                                builder.endElement();
                            } else if (systemFlag == Flags.Flag.FLAGGED) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "flagged" );
View Full Code Here

                            } else if (systemFlag == Flags.Flag.DRAFT) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "draft" );
                                builder.endElement();
                            } else if (systemFlag == Flags.Flag.FLAGGED) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "flagged" );
                                builder.endElement();
                            } else if (systemFlag == Flags.Flag.RECENT) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "recent" );
View Full Code Here

                            } else if (systemFlag == Flags.Flag.FLAGGED) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "flagged" );
                                builder.endElement();
                            } else if (systemFlag == Flags.Flag.RECENT) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "recent" );
                                builder.endElement();
                            } else if (systemFlag == Flags.Flag.SEEN) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "seen" );
View Full Code Here

            final MemTreeBuilder builder = new MemTreeBuilder();
            builder.startDocument();

            // start root element
            final int nodeNr = builder.startElement("", "results", "results", null);

            // Perform actual search
            searcher.search(query, new Collector() {
                private Scorer scorer;
                private AtomicReader reader;
View Full Code Here

                            AttributesImpl attribs = new AttributesImpl();
                            attribs.addAttribute("", "uri", "uri", "CDATA", fDocUri);
                            attribs.addAttribute("", "score", "score", "CDATA", ""+score);
   
                            // write element and attributes
                            builder.startElement("", "search", "search", attribs);
                            for (String field : fields) {
                                String[] fieldContent = doc.getValues(field);
                                attribs.clear();
                                attribs.addAttribute("", "name", "name", "CDATA", field);
                                for (String content : fieldContent) {
View Full Code Here

                                attribs.clear();
                                attribs.addAttribute("", "name", "name", "CDATA", field);
                                for (String content : fieldContent) {
                                    List<Offset> offsets = highlighter.getOffsets(content, searchAnalyzer);
                                    if (offsets != null) {
                                        builder.startElement("", "field", "field", attribs);
                                        highlighter.highlight(content, offsets, builder);
                                        builder.endElement();
                                    }
                                }
                            }
View Full Code Here

                            } else if (systemFlag == Flags.Flag.RECENT) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "recent" );
                                builder.endElement();
                            } else if (systemFlag == Flags.Flag.SEEN) {
                                builder.startElement( new QName( "flag", MailModule.NAMESPACE_URI, MailModule.PREFIX ), null );
                                builder.addAttribute( new QName( "type", null, null ), "seen" );
                                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.