Package org.exist.util.serializer

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


                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


                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);
            return writer.toString();
        } finally {
View Full Code Here

            serializer.startElement( Namespaces.EXIST_NS, "collection", "collection", attr );

            final DocumentCallback docCb = new DocumentCallback( output, serializer, null, null, docs, true );
            broker.getResourcesFailsafe( docCb, directAccess );

            serializer.endElement( Namespaces.EXIST_NS, "collection", "collection" );
            serializer.endPrefixMapping( "" );
            serializer.endDocument();
            output.closeContents();
        }
        catch( final Exception e ) {
View Full Code Here

                }
                attr.clear();
                attr.addAttribute( Namespaces.EXIST_NS, "name", "name", "CDATA", childUri.toString() );
                attr.addAttribute( Namespaces.EXIST_NS, "filename", "filename", "CDATA", Backup.encode( URIUtils.urlDecodeUtf8( childUri.toString() ) ) );
                serializer.startElement( Namespaces.EXIST_NS, "subcollection", "subcollection", attr );
                serializer.endElement( Namespaces.EXIST_NS, "subcollection", "subcollection" );
            }

            if( prevBackup != null ) {

                // Check which collections and resources have been deleted since
View Full Code Here

                    LOG.error( "Caught exception while trying to parse previous backup descriptor: " + prevBackup.getSymbolicPath(), e );
                }
            }

            // close <collection>
            serializer.endElement( Namespaces.EXIST_NS, "collection", "collection" );
            serializer.endPrefixMapping( "" );
            serializer.endDocument();
            output.closeContents();
        }
        finally {
View Full Code Here

                                String.valueOf(childCollection.getCreationTime()));
                    }

                    addPermissionAttributes(attrs, childCollection.getPermissionsNoLock());
                    serializer.startElement(Namespaces.EXIST_NS, "collection", "exist:collection", attrs);
                    serializer.endElement(Namespaces.EXIST_NS, "collection", "exist:collection");
                }
            }

            for (final Iterator<DocumentImpl> i = collection.iterator(broker); i.hasNext();) {
                final DocumentImpl doc = i.next();
View Full Code Here

                                "last-modified", "CDATA", String.valueOf(metadata.getLastModified()));
                    }

                    addPermissionAttributes(attrs, doc.getPermissions());
                    serializer.startElement(Namespaces.EXIST_NS, "resource", "exist:resource", attrs);
                    serializer.endElement(Namespaces.EXIST_NS, "resource", "exist:resource");
                }
            }

            serializer.endElement(Namespaces.EXIST_NS, "collection", "exist:collection");
            serializer.endElement(Namespaces.EXIST_NS, "result", "exist:result");
View Full Code Here

                    serializer.startElement(Namespaces.EXIST_NS, "resource", "exist:resource", attrs);
                    serializer.endElement(Namespaces.EXIST_NS, "resource", "exist:resource");
                }
            }

            serializer.endElement(Namespaces.EXIST_NS, "collection", "exist:collection");
            serializer.endElement(Namespaces.EXIST_NS, "result", "exist:result");

            serializer.endDocument();

            writer.flush();
View Full Code Here

                    serializer.endElement(Namespaces.EXIST_NS, "resource", "exist:resource");
                }
            }

            serializer.endElement(Namespaces.EXIST_NS, "collection", "exist:collection");
            serializer.endElement(Namespaces.EXIST_NS, "result", "exist:result");

            serializer.endDocument();

            writer.flush();
            writer.close();
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();
    } catch (final EXistException e) {
      throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, "serialization error", e);
    } catch (final SAXException e) {
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.