Examples of resolveURI()


Examples of org.apache.excalibur.source.SourceResolver.resolveURI()

            Source source = null;
            File directory;

            try {
                resolver = (SourceResolver) getServiceManager().lookup(SourceResolver.ROLE);
                source = resolver.resolveURI(policiesDirectoryUri);
                getLogger().debug("Policies directory source: [" + source.getURI() + "]");
                directory = new File(new URI(NetUtils.encodePath(source.getURI())));
            } catch (final Exception e) {
                throw new AccessControlException("Resolving policies directory failed: ", e);
            } finally {
View Full Code Here

Examples of org.apache.excalibur.source.SourceResolver.resolveURI()

        Source source = null;
        SourceResolver resolver = null;

        try {
            resolver = (SourceResolver) serviceManager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI("context:///");
            File servletContext = SourceUtil.getFile(source);
            getLogger().debug("    Webapp URL:      [" + url + "]");
            getLogger().debug("    Serlvet context: [" + servletContext.getAbsolutePath() + "]");
            publication = PublicationFactory.getPublication(url, servletContext);
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.excalibur.source.SourceResolver.resolveURI()

        if (configUrl != null) {
            Source configSource = null;
            SourceResolver resolver = null;
            try {
                resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE);
                configSource = resolver.resolveURI(configUrl);
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("Loading configuration from " + configSource.getURI());
                }
                SourceUtil.toSAX(configSource, new ConfigurationParser());
            } catch (Exception e) {
View Full Code Here

Examples of org.apache.excalibur.source.SourceResolver.resolveURI()

        String uuid = generateUUID();
        SourceResolver resolver = null;
        Source source = null;
        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI(initialContentsURI);
            return add(factory, documentType, uuid, source.getInputStream(), pub, area, language,
                    extension, getMimeType(source));
        } catch (Exception e) {
            throw new PublicationException(e);
        } finally {
View Full Code Here

Examples of org.apache.excalibur.source.SourceResolver.resolveURI()

            String relativeUri = relativeLink + queryString;
            String absoluteUri = absoluteLink + queryString;

            Exception e = null;
            try {
                sourceResolver.resolveURI(relativeUri);
            } catch (SourceNotFoundException ex) {
                e = ex;
            }
            assertNotNull("SourceNotFoundException thrown", e);
           
View Full Code Here

Examples of org.apache.excalibur.source.SourceResolver.resolveURI()

            } catch (SourceNotFoundException ex) {
                e = ex;
            }
            assertNotNull("SourceNotFoundException thrown", e);
           
            sourceResolver.resolveURI(absoluteUri);

        } finally {
            if (resolver != null) {
                getManager().release(resolver);
            }
View Full Code Here

Examples of org.apache.excalibur.source.SourceResolver.resolveURI()

        Source publicationsSource = null;
        PublicationManager pubManager = null;
        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);

            publicationsSource = resolver.resolveURI("context://"
                    + Publication.PUBLICATION_PREFIX_URI);
            String publicationsUri = publicationsSource.getURI();

            for (int i = 0; i < sourcesToCopy.length; i++) {
View Full Code Here

Examples of org.apache.excalibur.source.SourceResolver.resolveURI()

        context = JXPathContext.newContext(model);
        form.setAutoValidate(false);
        if (validatorNamespace != null && validatorDocument != null) {
            SourceResolver resolver = (SourceResolver)
                getCocoon().getComponentManager().lookup(SourceResolver.ROLE);
            Source schemaSrc = resolver.resolveURI(validatorDocument);
            InputSource is = SourceUtil.getInputSource(schemaSrc);
            SchemaFactory schf = SchemaFactory.lookup(validatorNamespace);
            Schema sch = schf.compileSchema(is);
            form.setValidator(sch.newValidator());
        }
View Full Code Here

Examples of org.apache.excalibur.source.SourceResolver.resolveURI()

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        SourceResolver resolver = null;
        Source source = null;
        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI(uri);
            config = builder.build(source.getInputStream());
        }
        catch (Exception e) {
            throw new ConfigurationException("Loading samples from URI [" + uri + "] failed: ", e);
        }
View Full Code Here

Examples of org.apache.excalibur.source.SourceResolver.resolveURI()

            parser = (SAXParser) this.manager.lookup(SAXParser.ROLE);
            assertNotNull("Test lookup of parser", parser);

            assertNotNull("Test if assertion document is not null",
                          source);
            assertionsource = resolver.resolveURI(source);
            assertNotNull("Test lookup of assertion source",
                          assertionsource);
            assertTrue("Test if source exist", assertionsource.exists());

            DOMBuilder builder = new DOMBuilder();
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.