public class ResourceSaxer extends Object implements ReturnableSaxer
Modifier and Type | Field and Description |
---|---|
protected ResourceReturnable |
_resourceReturnable
The associated returnable on resources
|
Constructor and Description |
---|
ResourceSaxer(ResourceReturnable resourceReturnable)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private String |
_encodePath(String path) |
private Content |
_getResourceContent(Resource resource) |
private String |
_getResourceExcerpt(Resource resource,
Logger logger) |
private Page |
_getResourcePage(Resource resource) |
private void |
_saxIcon(ContentHandler contentHandler,
String filename) |
private void |
_saxSize(ContentHandler contentHandler,
long size) |
private void |
_saxUri(ContentHandler contentHandler,
Resource resource,
Page page,
Content content) |
boolean |
canSax(AmetysObject hit,
Logger logger,
SearchComponentArguments args)
Returns
true if this saxer is able to SAX the given search hit |
void |
sax(ContentHandler contentHandler,
AmetysObject hit,
Logger logger,
SearchComponentArguments args)
SAX the given search hit
|
protected ResourceReturnable _resourceReturnable
public ResourceSaxer(ResourceReturnable resourceReturnable)
resourceReturnable
- The associated returnable on resourcespublic boolean canSax(AmetysObject hit, Logger logger, SearchComponentArguments args)
ReturnableSaxer
true
if this saxer is able to SAX the given search hitcanSax
in interface ReturnableSaxer
hit
- The search hitlogger
- A loggerargs
- The other argumentstrue
if this saxer is able to SAX the given search hitpublic void sax(ContentHandler contentHandler, AmetysObject hit, Logger logger, SearchComponentArguments args) throws SAXException
ReturnableSaxer
sax
in interface ReturnableSaxer
contentHandler
- The content handlerhit
- The search hitlogger
- A loggerargs
- The other argumentsSAXException
- if a SAX error occuredprivate String _getResourceExcerpt(Resource resource, Logger logger)
private Page _getResourcePage(Resource resource)
private Content _getResourceContent(Resource resource)
private void _saxUri(ContentHandler contentHandler, Resource resource, Page page, Content content) throws SAXException
SAXException
private String _encodePath(String path)
private void _saxSize(ContentHandler contentHandler, long size) throws SAXException
SAXException
private void _saxIcon(ContentHandler contentHandler, String filename) throws SAXException
SAXException