Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceNotFoundException


                }
            }
        } while (document != null && found == false);

        if (document == null) {
            throw new SourceNotFoundException(
                "The document "
                    + documentName
                    + " is not in the archive "
                    + this.archive.getURI());
        }
View Full Code Here


      if (!isSourceNotFoundException(e))
        throw e;
    }
   
    if (result == null)
      throw new SourceNotFoundException("Global profile does not exist.");
   
    // change references to objects where no delta has been applied
    result.adjustReferences(global);
   
        // FIXME
View Full Code Here

      if (!isSourceNotFoundException(e))
        throw e;
    }
   
    if (result == null)
      throw new SourceNotFoundException("Global profile does not exist.");
   
    // change references to objects where no delta has been applied
    result.adjustReferences(global);
   
        // FIXME
View Full Code Here

            if (status == ST_COLLECTION) {
                this.collectionToSAX(handler);
            } else if (status == ST_RESOURCE) {
                this.resourceToSAX(handler);
            } else {
                throw new SourceNotFoundException(getURI());
            }
        } catch (SAXException se) {
            throw se;
        } catch (Exception e) {
            throw new SAXException("Error processing " + getURI(), e);
View Full Code Here

     */
    public String createId() throws SourceException {
        try {
            setup();
            if (status != ST_COLLECTION) {
                throw new SourceNotFoundException("Collection for createId not found: " + getURI());
            }
            return collection.createId();
        } catch(XMLDBException xdbe) {
            throw new SourceException("Cannot get Id for " + getURI(), xdbe);
        } finally {
View Full Code Here

                    }
                }
            }
       } catch (HttpException e) {
            if (e.getReasonCode() == HttpStatus.SC_NOT_FOUND) {
                throw new SourceNotFoundException("Not found: " + getSecureURI(), e);
            }
            if (e.getReasonCode() == HttpStatus.SC_BAD_REQUEST) {
              throw new SourceException("Server doesn't appear to understand WebDAV: "+getSecureURI(), e);
            }
            final String msg = "Could not initialize webdav resource at " + getSecureURI()
View Full Code Here

        {
            return part.getInputStream();
        }
        catch (Exception ex)
        {
            throw new SourceNotFoundException("The part source can not be found.");
        }
    }
View Full Code Here

            }

            return new ByteArrayInputStream(os.toByteArray());

        } catch (ResourceNotFoundException e) {
            throw new SourceNotFoundException("Exception during processing of " + this.systemId, e);
        } catch (Exception e) {
            throw new SourceException("Exception during processing of " + this.systemId, e);
        } finally {
            // Unhide wrapped environment output stream
            this.environment.setOutputStream(null);
View Full Code Here

     *
     * @see org.apache.excalibur.source.Source#getInputStream()
     */
    public InputStream getInputStream() throws IOException, SourceNotFoundException {
        if (this.node == null) {
            throw new SourceNotFoundException("Path '" + this.getURI() + "' does not exist");
        }

        if (this.isCollection()) {
            throw new SourceException("Path '" + this.getURI() + "' is a collection");
        }
View Full Code Here

        ZipInputStream zipStream = new ZipInputStream(this.archive.getInputStream());
        try {
            ZipEntry entry = findEntry(zipStream);
            if (entry == null) {
                throw new SourceNotFoundException("File " + filePath + " is not found in the archive " +
                                                  this.archive.getURI());
            }

            // Now we will extract the document and write it into a byte array
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

TOP

Related Classes of org.apache.excalibur.source.SourceNotFoundException

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.