org.apache.cocoon.components.source.impl
Class ModuleSource

java.lang.Object
  extended byorg.apache.excalibur.source.impl.AbstractSource
      extended byorg.apache.cocoon.components.source.impl.ModuleSource
All Implemented Interfaces:
Source

public class ModuleSource
extends AbstractSource

A Source that takes its content from a module.

The URI syntax is "module::[#XPath]", where :

Version:
$Id: ModuleSource.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Constructor Summary
ModuleSource(Map objectModel, String uri, ServiceManager manager)
          Create a module source from a 'module:' uri and a the object model.
 
Method Summary
 boolean exists()
          Does this source actually exist ?
 InputStream getInputStream()
          Return an InputStream object to read from the source.
 
Methods inherited from class org.apache.excalibur.source.impl.AbstractSource
checkInfos, getContentLength, getInfos, getLastModified, getMimeType, getScheme, getURI, getValidity, refresh, setContentLength, setLastModified, setScheme, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleSource

public ModuleSource(Map objectModel,
                    String uri,
                    ServiceManager manager)
             throws MalformedURLException
Create a module source from a 'module:' uri and a the object model.

The uri is of the form "module:attribute-type:attribute-name#xpath

Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException
Return an InputStream object to read from the source.

Throws:
IOException - if I/O error occured.

exists

public boolean exists()
Does this source actually exist ?

Returns:
true if the resource exists.


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.