Package org.exist.util.serializer

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


            if (queryHistory.size() > 20) {
                p = queryHistory.size() - 20;
            }
            final AttributesImpl attrs = new AttributesImpl();
            serializer.startDocument();
            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");
View Full Code Here


            }
            final AttributesImpl attrs = new AttributesImpl();
            serializer.startDocument();
            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");
View Full Code Here

            outputProperties.setProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
            outputProperties.setProperty(OutputKeys.INDENT, "no");
            sax.setOutput(writer, outputProperties);

            sax.startDocument();
            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);
View Full Code Here

            sax.startDocument();
            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) {
View Full Code Here

                //create a copy of the last Binary revision
                XmldbURI binUri = XmldbURI.create(diffUri.toString() + BINARY_SUFFIX);
                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);
View Full Code Here

                //create a copy of the last XML revision
                XmldbURI xmlUri = XmldbURI.create(diffUri.toString() + XML_SUFFIX);
                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);
View Full Code Here

            outputProperties.setProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
            outputProperties.setProperty(OutputKeys.INDENT, "no");
            sax.setOutput(writer, outputProperties);

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

            if (remove) {
              sax.startElement(ELEMENT_REMOVED, null);
              sax.endElement(ELEMENT_REMOVED);
View Full Code Here

            sax.startDocument();
            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) {
View Full Code Here

                //create a copy of the last Binary revision
                XmldbURI binUri = XmldbURI.create(diffUri.toString() + BINARY_SUFFIX);
                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);
View Full Code Here

                //create a copy of the last XML revision
                XmldbURI xmlUri = XmldbURI.create(diffUri.toString() + XML_SUFFIX);
                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);
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.