Package org.exist.util.serializer

Examples of org.exist.util.serializer.SAXSerializer.endElement()


            serializer.startElement("", "history", "history", attrs);
            for(final ListIterator<String> i = queryHistory.listIterator(p); i.hasNext(); ) {
                serializer.startElement("", "query", "query", attrs);
                final String next = i.next();
                serializer.characters(next.toCharArray(), 0, next.length());
                serializer.endElement("", "query", "query");
            }
            serializer.endElement("", "history", "history");
            serializer.endDocument();
            writer.close();
            SerializerPool.getInstance().returnObject(serializer);
View Full Code Here


                serializer.startElement("", "query", "query", attrs);
                final String next = i.next();
                serializer.characters(next.toCharArray(), 0, next.length());
                serializer.endElement("", "query", "query");
            }
            serializer.endElement("", "history", "history");
            serializer.endDocument();
            writer.close();
            SerializerPool.getInstance().returnObject(serializer);
        } catch (final IOException e) {
            System.err.println("IO error while writing query history.");
View Full Code Here

              else {
                value = current.toString().toCharArray();
                handler.characters(value, 0, value.length);
              }
            }
            handler.endElement(Namespaces.EXIST_NS, "result", "exist:result");
            handler.endPrefixMapping("exist");
            handler.endDocument();
            SerializerPool.getInstance().returnObject(handler);
          } finally {
            writer.close();
View Full Code Here

            sax.startElement(ELEMENT_VERSION, null);
            writeProperties(sax, getVersionProperties(revision, documentPath, activeSubject));

            if(event == REMOVE_DOCUMENT_EVENT) {
              sax.startElement(ELEMENT_REMOVED, null);
              sax.endElement(ELEMENT_REMOVED);
            } else {

              //Diff
              if(document instanceof BinaryDocument) {
                //create a copy of the last Binary revision
View Full Code Here

                broker.copyResource(transaction, document, vCollection, binUri);

                //Create metadata about the last Binary Version
                sax.startElement(ELEMENT_REPLACED_BINARY, null);
                sax.attribute(ATTRIBUTE_REF, binUri.toString());
                sax.endElement(ELEMENT_REPLACED_BINARY);
              } else if(lastRev instanceof BinaryDocument) {
                //create a copy of the last XML revision
                XmldbURI xmlUri = XmldbURI.create(diffUri.toString() + XML_SUFFIX);
                broker.copyResource(transaction, document, vCollection, xmlUri);
View Full Code Here

                broker.copyResource(transaction, document, vCollection, xmlUri);

                //Create metadata about the last Binary Version
                sax.startElement(ELEMENT_REPLACED_XML, null);
                sax.attribute(ATTRIBUTE_REF, xmlUri.toString());
                sax.endElement(ELEMENT_REPLACED_BINARY);
              } else {
                //Diff the XML versions
                Diff diff = new StandardDiff(broker);
                diff.diff(lastRev, document);
                diff.diff2XML(sax);
View Full Code Here

                Diff diff = new StandardDiff(broker);
                diff.diff(lastRev, document);
                diff.diff2XML(sax);
              }

              sax.endElement(ELEMENT_VERSION);

              sax.endDocument();
              String editscript = writer.toString();

              if (removeLast) {
View Full Code Here

            sax.startElement(ELEMENT_VERSION, null);
            writeProperties(sax, getVersionProperties(revision, documentPath, activeSubject));

            if (remove) {
              sax.startElement(ELEMENT_REMOVED, null);
              sax.endElement(ELEMENT_REMOVED);
            } else {

              //Diff
              if(document instanceof BinaryDocument) {
                //create a copy of the last Binary revision
View Full Code Here

                broker.copyResource(transaction, document, vCollection, binUri);

                //Create metadata about the last Binary Version
                sax.startElement(ELEMENT_REPLACED_BINARY, null);
                sax.attribute(ATTRIBUTE_REF, binUri.toString());
                sax.endElement(ELEMENT_REPLACED_BINARY);
              } else if(lastRev instanceof BinaryDocument) {
                //create a copy of the last XML revision
                XmldbURI xmlUri = XmldbURI.create(diffUri.toString() + XML_SUFFIX);
                broker.copyResource(transaction, document, vCollection, xmlUri);
View Full Code Here

                broker.copyResource(transaction, document, vCollection, xmlUri);

                //Create metadata about the last Binary Version
                sax.startElement(ELEMENT_REPLACED_XML, null);
                sax.attribute(ATTRIBUTE_REF, xmlUri.toString());
                sax.endElement(ELEMENT_REPLACED_XML);
              } else {
                //Diff the XML versions
                Diff diff = new StandardDiff(broker);
                diff.diff(lastRev, document);
                diff.diff2XML(sax);
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.