Package org.apache.cocoon.components.url

Examples of org.apache.cocoon.components.url.URLFactory


    * Should be called after the setParser() and before the process()
    */
    public void loadStylesheet(InputSource sheetSource) throws SAXException, IOException {
        // Set the xslFile for the caching mechanism
        URL url = null;
        URLFactory urlFactory = null;
        try {
            urlFactory = (URLFactory)this.manager.lookup(URLFactory.ROLE);
            url = urlFactory.getURL(sheetSource.getSystemId());
        } catch (Exception e) {
            log.error("cannot obtain the URLFactory", e);
            throw new SAXException ("cannot obtain the URLFactory", e);
        } finally {
            if(urlFactory != null) this.manager.release((Component)urlFactory);
View Full Code Here


        // Read the builtin languages definition file
        Configuration builtin;

        try {
            URLFactory factory = (URLFactory)this.manager.lookup(URLFactory.ROLE);
            URLSource source = new URLSource(factory.getURL(xconfURL), this.manager);
            try {
                SAXConfigurationHandler handler = new SAXConfigurationHandler();
                source.toSAX(handler);
                builtin = handler.getConfiguration();
            } finally {
View Full Code Here

  public InputStream getInputStream()
    throws ProcessingException, IOException
  {
    try {
      URLFactory urlFactory = (URLFactory)componentManager.lookup(URLFactory.ROLE);
      URL url = urlFactory.getURL(systemId);
      URLConnection conn = url.openConnection();
      InputStream is = conn.getInputStream();
      contentLength = conn.getContentLength();
      componentManager.release(urlFactory);
View Full Code Here

  public InputStream getInputStream()
    throws ProcessingException, IOException
  {
    try {
      URLFactory urlFactory = (URLFactory)componentManager.lookup(URLFactory.ROLE);
      URL url = urlFactory.getURL(systemId);
      URLConnection conn = url.openConnection();
      InputStream is = conn.getInputStream();
      contentLength = conn.getContentLength();
      componentManager.release(urlFactory);
View Full Code Here

        // Read the builtin languages definition file
        Configuration builtin;

        try {
            URLFactory factory = (URLFactory)this.manager.lookup(URLFactory.ROLE);
            URLSource source = new URLSource(factory.getURL(xconfURL), this.manager);
            try {
                SAXConfigurationHandler handler = new SAXConfigurationHandler();
                source.toSAX(handler);
                builtin = handler.getConfiguration();
            } finally {
View Full Code Here

    * Should be called after the setParser() and before the process()
    */
    public void loadStylesheet(InputSource sheetSource) throws SAXException, IOException {
        // Set the xslFile for the caching mechanism
        URL url = null;
        URLFactory urlFactory = null;
        try {
            urlFactory = (URLFactory)this.manager.lookup(URLFactory.ROLE);
            url = urlFactory.getURL(sheetSource.getSystemId());
        } catch (Exception e) {
            log.error("cannot obtain the URLFactory", e);
            throw new SAXException ("cannot obtain the URLFactory", e);
        } finally {
            if(urlFactory != null) this.manager.release((Component)urlFactory);
View Full Code Here

  public InputStream getInputStream()
    throws ProcessingException, IOException
  {
    try {
      URLFactory urlFactory = (URLFactory)componentManager.lookup(URLFactory.ROLE);
      URL url = urlFactory.getURL(systemId);
      URLConnection conn = url.openConnection();
      InputStream is = conn.getInputStream();
      contentLength = conn.getContentLength();
      componentManager.release((Component)urlFactory);
View Full Code Here

       
        // Read the builtin languages definition file
        Configuration builtin;
       
        try {
            URLFactory factory = (URLFactory)this.manager.lookup(URLFactory.ROLE);
            URLSource source = new URLSource(factory.getURL(XCONF_URL), this.manager);
            try {
                SAXConfigurationHandler handler = new SAXConfigurationHandler();
                source.toSAX(handler);
                builtin = handler.getConfiguration();
            } finally {
View Full Code Here

        // Read the builtin languages definition file
        Configuration builtin;

        try {
            URLFactory factory = (URLFactory)this.manager.lookup(URLFactory.ROLE);
            URLSource source = new URLSource(factory.getURL(xconfURL), this.manager);
            try {
                SAXConfigurationHandler handler = new SAXConfigurationHandler();
                source.toSAX(handler);
                builtin = handler.getConfiguration();
            } finally {
View Full Code Here

        this.systemId = systemId;
    }

    public InputStream getInputStream()
            throws ProcessingException, IOException {
        URLFactory urlFactory = null;
        try {
            urlFactory = (URLFactory) componentManager.lookup(URLFactory.ROLE);
            URL url = urlFactory.getURL(systemId);
            URLConnection conn = url.openConnection();
            InputStream is = conn.getInputStream();
            contentLength = conn.getContentLength();
            return is;
        } catch (ComponentException ex) {
View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.url.URLFactory

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.