Search in sources :

Example 1 with DocumentViewExporter

use of org.apache.jackrabbit.commons.xml.DocumentViewExporter in project jackrabbit-oak by apache.

the class SessionImpl method exportDocumentView.

@Override
public void exportDocumentView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) throws IOException, RepositoryException {
    try {
        ContentHandler handler = new ToXmlContentHandler(checkNotNull(out));
        export(checkNotNull(absPath), new DocumentViewExporter(this, handler, !noRecurse, !skipBinary));
    } catch (SAXException e) {
        Exception exception = e.getException();
        if (exception instanceof RepositoryException) {
            throw (RepositoryException) exception;
        } else if (exception instanceof IOException) {
            throw (IOException) exception;
        } else {
            throw new RepositoryException("Error serializing document view XML", e);
        }
    }
}
Also used : DocumentViewExporter(org.apache.jackrabbit.commons.xml.DocumentViewExporter) ToXmlContentHandler(org.apache.jackrabbit.commons.xml.ToXmlContentHandler) RepositoryException(javax.jcr.RepositoryException) IOException(java.io.IOException) ContentHandler(org.xml.sax.ContentHandler) ParsingContentHandler(org.apache.jackrabbit.commons.xml.ParsingContentHandler) ToXmlContentHandler(org.apache.jackrabbit.commons.xml.ToXmlContentHandler) ConstraintViolationException(javax.jcr.nodetype.ConstraintViolationException) InvalidSerializedDataException(javax.jcr.InvalidSerializedDataException) ItemNotFoundException(javax.jcr.ItemNotFoundException) SAXException(org.xml.sax.SAXException) AccessControlException(java.security.AccessControlException) AccessDeniedException(javax.jcr.AccessDeniedException) PathNotFoundException(javax.jcr.PathNotFoundException) RepositoryException(javax.jcr.RepositoryException) IOException(java.io.IOException) UnsupportedRepositoryOperationException(javax.jcr.UnsupportedRepositoryOperationException) SAXException(org.xml.sax.SAXException)

Aggregations

IOException (java.io.IOException)1 AccessControlException (java.security.AccessControlException)1 AccessDeniedException (javax.jcr.AccessDeniedException)1 InvalidSerializedDataException (javax.jcr.InvalidSerializedDataException)1 ItemNotFoundException (javax.jcr.ItemNotFoundException)1 PathNotFoundException (javax.jcr.PathNotFoundException)1 RepositoryException (javax.jcr.RepositoryException)1 UnsupportedRepositoryOperationException (javax.jcr.UnsupportedRepositoryOperationException)1 ConstraintViolationException (javax.jcr.nodetype.ConstraintViolationException)1 DocumentViewExporter (org.apache.jackrabbit.commons.xml.DocumentViewExporter)1 ParsingContentHandler (org.apache.jackrabbit.commons.xml.ParsingContentHandler)1 ToXmlContentHandler (org.apache.jackrabbit.commons.xml.ToXmlContentHandler)1 ContentHandler (org.xml.sax.ContentHandler)1 SAXException (org.xml.sax.SAXException)1