org.apache.cocoon.components.source
Interface SourceInspector

All Superinterfaces:
Component
All Known Subinterfaces:
SourceDescriptor
All Known Implementing Classes:
AbstractConfigurableSourceDescriptor, AbstractConfigurableSourceInspector, AbstractImageSourceInspector, GIFSourceInspector, JPEGSourceInspector, SimpleJdbcSourceDescriptor, SourceDescriptorManager, XPathSourceInspector

public interface SourceInspector
extends Component

A source inspector exposes source properties.

Version:
CVS $Id: SourceInspector.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Stephan Michels, Unico Hommes

Field Summary
static String ROLE
           
 
Method Summary
 SourceProperty[] getSourceProperties(Source source)
          Gets all the SourceProperties associated with the given Source.
 SourceProperty getSourceProperty(Source source, String namespace, String name)
          Gets the SourceProperty associated with the given Source identified by the requested namespace and name.
 SourceValidity getValidity(Source source)
          Get the validity object that describes the validity state of the properties belonging to the given source.
 boolean handlesProperty(String namespace, String name)
          Check if this inspector handles the property of the given type.
 

Field Detail

ROLE

static final String ROLE
See Also:
Constant Field Values
Method Detail

getSourceProperty

SourceProperty getSourceProperty(Source source,
                                 String namespace,
                                 String name)
                                 throws SourceException
Gets the SourceProperty associated with the given Source identified by the requested namespace and name.

Parameters:
source - the source for which to compute the property
namespace - the namespace of the property
name - the name of the property
Returns:
the SourceProperty associated with the Source, null if the inspector does not provide this property.
Throws:
SourceException

getSourceProperties

SourceProperty[] getSourceProperties(Source source)
                                     throws SourceException
Gets all the SourceProperties associated with the given Source.

Parameters:
source - the Source for wich to compute the property.
Returns:
the collection of all SourceProperties that could be computed by this SourceInspector.
Throws:
SourceException

handlesProperty

boolean handlesProperty(String namespace,
                        String name)
Check if this inspector handles the property of the given type.

Parameters:
namespace - the namespace of the property
name - the name of the property
Returns:
true if this inspector handles properties of the given type else false.

getValidity

SourceValidity getValidity(Source source)
Get the validity object that describes the validity state of the properties belonging to the given source.

Parameters:
source - the Source for which to calculate the validity its properties, null if the source properties are not cacheable.


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