|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.modules.input.AbstractInputModule org.apache.cocoon.components.modules.input.XPathXMLFileModule
public class XPathXMLFileModule
Source
(e.g.,
cocoon:/...
, context://..
, and regular URLs).
Sources can be cached in memory for better performance and reloaded if
changed. The source can also contain references to other input modules to allow the source
file name to be determined dynamically.
Caching and reloading can be turned on / off (default: caching on,
reloading off) through <reloadable>false</reloadable>
and <cacheable>false</cacheable>
. The file
(source) to use is specified through <file
src="protocol:path/to/file.xml" reloadable="true" cacheable="true"/>
optionally overriding the defaults for caching and/or reloading. When specfied as attributes
to the file element the values for cacheable and reloadable may be input module references which
will be resolved on every call. These must resolve to 'true' or 'false'.
>
The XML documents will be cached using the Store configured via the cache-role configuration
element. If not specified the default Store as specified in this classes ROLE attribute will
be used.
In addition, xpath expressions can be cached for higher performance.
Thus, if an expression has been evaluated for a file, the result
is cached and will be reused, the expression is not evaluated
a second time. This can be turned off using the cache-expressions
configuration option.
Field Summary | |
---|---|
protected JXPathHelperConfiguration |
configuration
Contains all globally registered extension classes and packages. |
protected ServiceManager |
manager
|
protected String |
parameter
Overrides attribute name |
protected SourceResolver |
resolver
|
static String |
ROLE
|
Fields inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule |
---|
settings |
Constructor Summary | |
---|---|
XPathXMLFileModule()
|
Method Summary | |
---|---|
void |
configure(Configuration config)
Static (cocoon.xconf) configuration. |
void |
dispose()
Dispose this component |
Object |
getAttribute(String name,
Configuration modeConf,
Map objectModel)
Standard access to an attribute's value. |
Object[] |
getAttributeValues(String name,
Configuration modeConf,
Map objectModel)
Returns an array of String objects containing all of the values the given attribute has, or null if the attribute does not exist. |
void |
service(ServiceManager manager)
|
Methods inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule |
---|
getAttributeNames |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ROLE
protected JXPathHelperConfiguration configuration
protected String parameter
protected SourceResolver resolver
protected ServiceManager manager
Constructor Detail |
---|
public XPathXMLFileModule()
Method Detail |
---|
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void configure(Configuration config) throws ConfigurationException
configure
in interface Configurable
configure
in class AbstractInputModule
config
- a Configuration
value, as described above.
ConfigurationException
- if an error occurspublic void dispose()
dispose
in interface Disposable
dispose
in class AbstractInputModule
public Object getAttribute(String name, Configuration modeConf, Map objectModel) throws ConfigurationException
InputModule
InputModule.getAttributeValues(String, Configuration, Map)
or
InputModule.getAttributeNames(Configuration, Map)
and
InputModule.getAttribute(String, Configuration, Map)
to get them one by one.
getAttribute
in interface InputModule
getAttribute
in class AbstractInputModule
name
- a String that specifies what the caller thinks
would identify an attribute. This is mainly a fallback if no
modeConf is present.modeConf
- column's mode configuration from resource
description. This argument is optional.
ConfigurationException
public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel) throws ConfigurationException
InputModule
InputModule.getAttributeNames(Configuration, Map)
together with
InputModule.getAttribute(String, Configuration, Map)
can be used to get the
values one by one.
getAttributeValues
in interface InputModule
getAttributeValues
in class AbstractInputModule
name
- a String that specifies what the caller thinks
would identify an attributes. This is mainly a fallback
if no modeConf is present.modeConf
- column's mode configuration from resource
description. This argument is optional.
ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |