org.w3c.tools.resources.indexer
Interface ResourceIndexer
- All Known Implementing Classes:
- SampleResourceIndexer
- public interface ResourceIndexer
Jigsaw indexer.
The indexer is an object that given some global configuration informations,
tries to build default resources for files that the server doesn't know
about.
A ResourceIndexer must be a resource it is to be added
permanently to the IndexersCatalog.
- See Also:
IndexersCatalog
Method Summary |
Resource |
createResource(ContainerResource container,
RequestInterface request,
java.io.File directory,
java.lang.String name,
java.util.Hashtable defs)
Try to create a resource for the given file. |
java.lang.String |
getIndexedName(java.io.File directory,
java.lang.String name)
Get the name of the resource relative to the given filename. |
long |
lastModified()
When was this indexer configuration last modified. |
lastModified
public long lastModified()
- When was this indexer configuration last modified.
- Returns:
- The date at which that indexer was last modified, as
a number of milliseconds since Java epoch.
createResource
public Resource createResource(ContainerResource container,
RequestInterface request,
java.io.File directory,
java.lang.String name,
java.util.Hashtable defs)
- Try to create a resource for the given file.
This method makes its best efforts to try to build a default
resource out of a file.
- Parameters:
container
- The container making the call.request
- The HTTP request that triggered the call to the indexer
(may be null).directory
- The directory the file is in.name
- The name of the file.defs
- Any default attribute values that should be provided
to the created resource at initialization time.- Returns:
- A Resource instance, or null if the given
file can't be truned into a resource given our configuration
database.
getIndexedName
public java.lang.String getIndexedName(java.io.File directory,
java.lang.String name)
- Get the name of the resource relative to the given filename.
- Parameters:
name
- The name of the file.- Returns:
- a String, the resource name.