Package org.fcrepo.server.journal

Examples of org.fcrepo.server.journal.JournalException


    @Override
    public XMLEventWriter getWriter() throws JournalException {
        howManyGetWriterRequests++;
        if (throwExceptionOnGetWriter) {
            throw new JournalException("forced Exception on getWriter()");
        }
        return xmlWriter;
    }
View Full Code Here


            }
            if (stringReader != null) {
                stringReader.close();
            }
        } catch (XMLStreamException e) {
            throw new JournalException(e);
        }
    }
View Full Code Here

     * Advance past the document header to the first JournalEntry.
     */
    private void advanceIntoFile() throws XMLStreamException, JournalException {
        XMLEvent event = xmlReader.nextEvent();
        if (!event.isStartDocument()) {
            throw new JournalException("Expecting XML document header, but event was '"
                    + event + "'");
        }

        event = xmlReader.nextTag();
        if (!isStartTagEvent(event, QNAME_TAG_JOURNAL)) {
            throw new JournalException("Expecting FedoraJournal start tag, but event was '"
                    + event + "'");
        }

        String hash =
                getOptionalAttributeValue(event.asStartElement(),
View Full Code Here

            xmlReader =
                    XMLInputFactory.newInstance()
                            .createXMLEventReader(stringReader);
            advanceIntoFile();
        } catch (XMLStreamException e) {
            throw new JournalException(e);
        } catch (FactoryConfigurationError e) {
            throw new JournalException(e);
        }
    }
View Full Code Here

            super.writeDocumentTrailer(xmlWriter);
            xmlWriter.close();
            stringWriter.close();
            buffer = stringWriter.toString();
        } catch (XMLStreamException e) {
            throw new JournalException(e);
        } catch (IOException e) {
            throw new JournalException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.fcrepo.server.journal.JournalException

Copyright © 2018 www.massapicom. 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.