/** * {@inheritDoc} */ public void deserialize(InputStream in, DigitalObject obj, String encoding, int transContext) throws ObjectIntegrityException, StreamIOException, UnsupportedEncodingException { logger.debug("Deserializing " + m_format.uri + " for transContext: " + transContext); try { XmlTransformUtility.parseWithoutValidating(in, new METSContentHandler(m_format, m_translator, transContext, encoding, obj)); } catch (IOException ioe) { throw new StreamIOException("Low-level stream IO problem occurred " + "while SAX parsing this object."); } catch (SAXException se) { throw new ObjectIntegrityException("METS stream was bad : " + se.getMessage()); } try { m_translator.normalizeDatastreams(obj, transContext, encoding); } catch (UnsupportedEncodingException e) { throw new ObjectIntegrityException(e.getMessage(),e); } }
/** * {@inheritDoc} */ public void deserialize(InputStream in, DigitalObject obj, String encoding, int transContext) throws ObjectIntegrityException, StreamIOException, UnsupportedEncodingException { logger.debug("Deserializing " + m_format.uri + " for transContext: " + transContext); try { XmlTransformUtility.parseWithoutValidating(in, new METSContentHandler(m_format, m_translator, transContext, encoding, obj)); } catch (IOException ioe) { throw new StreamIOException("Low-level stream IO problem occurred " + "while SAX parsing this object."); } catch (SAXException se) { throw new ObjectIntegrityException("METS stream was bad : " + se.getMessage()); } try { m_translator.normalizeDatastreams(obj, transContext, encoding); } catch (UnsupportedEncodingException e) { throw new ObjectIntegrityException(e.getMessage(),e); } }
addDatastreams(feed, obj, encoding, transContext, tempDir); m_translator.normalizeDatastreams(obj, transContext, encoding); FileUtils.delete(tempDir);
addDatastreams(feed, obj, encoding, transContext, tempDir); m_translator.normalizeDatastreams(obj, transContext, encoding); FileUtils.delete(tempDir);
/** * {@inheritDoc} */ public void deserialize(InputStream in, DigitalObject obj, String encoding, int transContext) throws ObjectIntegrityException, StreamIOException, UnsupportedEncodingException { logger.debug("Deserializing {} for transContext: {}", m_format.uri, transContext); // make resettable and pool these handlers? FOXMLContentHandler handler = new FOXMLContentHandler(m_format, m_translator, transContext, encoding, obj); try { XmlTransformUtility.parseWithoutValidating(in, handler); } catch (IOException ioe) { throw new StreamIOException("low-level stream io problem occurred " + "while sax was parsing this object."); } catch (SAXException se) { throw new ObjectIntegrityException("FOXML IO stream was bad : " + se.getMessage(), se); } logger.debug("Just finished parse."); if (!handler.rootElementFound()) { throw new ObjectIntegrityException("FOXMLDODeserializer: Input stream is not valid FOXML." + " The digitalObject root element was not detected."); } m_translator.normalizeDatastreams(obj, transContext, encoding); }
/** * {@inheritDoc} */ public void deserialize(InputStream in, DigitalObject obj, String encoding, int transContext) throws ObjectIntegrityException, StreamIOException, UnsupportedEncodingException { logger.debug("Deserializing {} for transContext: {}", m_format.uri, transContext); // make resettable and pool these handlers? FOXMLContentHandler handler = new FOXMLContentHandler(m_format, m_translator, transContext, encoding, obj); try { XmlTransformUtility.parseWithoutValidating(in, handler); } catch (IOException ioe) { throw new StreamIOException("low-level stream io problem occurred " + "while sax was parsing this object."); } catch (SAXException se) { throw new ObjectIntegrityException("FOXML IO stream was bad : " + se.getMessage(), se); } logger.debug("Just finished parse."); if (!handler.rootElementFound()) { throw new ObjectIntegrityException("FOXMLDODeserializer: Input stream is not valid FOXML." + " The digitalObject root element was not detected."); } m_translator.normalizeDatastreams(obj, transContext, encoding); }