Examples of SourceNotFoundException


Examples of org.apache.excalibur.source.SourceNotFoundException

                    String queryString = locationSteps.nextToken();
                    docUri = docUri + "?" + queryString;
                }
                return this.resolver.resolveURI(docUri);
            } else {
                throw new SourceNotFoundException("The source [" + location + "] doesn't exist.");
            }

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

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

Examples of org.apache.excalibur.source.SourceNotFoundException

        return getData().length;
    }

    public InputStream getInputStream() throws IOException, SourceNotFoundException {
        if (!exists()) {
            throw new SourceNotFoundException(this + " does not exist!");
        }
        return new ByteArrayInputStream(getData());
    }
View Full Code Here

Examples of org.apache.excalibur.source.SourceNotFoundException

     */
    public InputStream getInputStream() throws IOException, SourceNotFoundException {
        if (getLogger().isDebugEnabled())
            getLogger().debug("Get InputStream for " + getURI());
        if (!exists()) {
            throw new SourceNotFoundException("The source [" + getURI() + "] does not exist!");
        }
        try {
            return getContent().getInputStream();
        } catch (RepositoryException e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of org.apache.excalibur.source.SourceNotFoundException

                contextualize(link, webappUrl);
                target = resolver.resolve(factory, link.getUri());
            }
           
            if (!target.exists()) {
                throw new SourceNotFoundException("Source not found: [" + location + "]");
            }

            Document doc = target.getDocument();

            if (target.isRevisionSpecified()) {
View Full Code Here

Examples of org.apache.excalibur.source.SourceNotFoundException

            if (status == ST_COLLECTION) {
                collectionToSAX(handler);
            } else if (status == ST_RESOURCE) {
                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

Examples of org.apache.excalibur.source.SourceNotFoundException

     */
    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);
View Full Code Here

Examples of org.apache.excalibur.source.SourceNotFoundException

            }

            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

Examples of org.apache.excalibur.source.SourceNotFoundException

    public InputStream getInputStream() throws IOException, SourceNotFoundException {
        ZipInputStream zipStream = new ZipInputStream(this.archive.getInputStream());
        try {
            ZipEntry entry = findEntry(zipStream);
            if (entry == null) {
                throw new SourceNotFoundException("File " + this.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

Examples of org.apache.excalibur.source.SourceNotFoundException

            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI(getSourceURI());
            if (source.exists()) {
                return source.getContentLength();
            } else {
                throw new SourceNotFoundException("The source [" + getSourceURI()
                        + "] does not exist!");
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
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.