Class ResourceSaxer
- java.lang.Object
-
- org.ametys.web.frontoffice.search.metamodel.impl.ResourceSaxer
-
- All Implemented Interfaces:
ReturnableSaxer
public class ResourceSaxer extends Object implements ReturnableSaxer
-
-
Field Summary
Fields Modifier and Type Field Description protected ResourceReturnable
_resourceReturnable
The associated returnable on resources
-
Constructor Summary
Constructors Constructor Description ResourceSaxer(ResourceReturnable resourceReturnable)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String
_encodePath(String path)
private Content
_getResourceContent(Resource resource)
private String
_getResourceExcerpt(Resource resource, org.slf4j.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, org.slf4j.Logger logger, SearchComponentArguments args)
Returnstrue
if this saxer is able to SAX the given search hitvoid
sax(ContentHandler contentHandler, AmetysObject hit, org.slf4j.Logger logger, SearchComponentArguments args)
SAX the given search hit-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.web.frontoffice.search.metamodel.ReturnableSaxer
getIdentifier
-
-
-
-
Field Detail
-
_resourceReturnable
protected ResourceReturnable _resourceReturnable
The associated returnable on resources
-
-
Constructor Detail
-
ResourceSaxer
public ResourceSaxer(ResourceReturnable resourceReturnable)
Constructor- Parameters:
resourceReturnable
- The associated returnable on resources
-
-
Method Detail
-
canSax
public boolean canSax(AmetysObject hit, org.slf4j.Logger logger, SearchComponentArguments args)
Description copied from interface:ReturnableSaxer
Returnstrue
if this saxer is able to SAX the given search hit- Specified by:
canSax
in interfaceReturnableSaxer
- Parameters:
hit
- The search hitlogger
- A loggerargs
- The other arguments- Returns:
true
if this saxer is able to SAX the given search hit
-
sax
public void sax(ContentHandler contentHandler, AmetysObject hit, org.slf4j.Logger logger, SearchComponentArguments args) throws SAXException
Description copied from interface:ReturnableSaxer
SAX the given search hit- Specified by:
sax
in interfaceReturnableSaxer
- Parameters:
contentHandler
- The content handlerhit
- The search hitlogger
- A loggerargs
- The other arguments- Throws:
SAXException
- if a SAX error occured
-
_getResourceExcerpt
private String _getResourceExcerpt(Resource resource, org.slf4j.Logger logger)
-
_getResourcePage
private Page _getResourcePage(Resource resource)
-
_getResourceContent
private Content _getResourceContent(Resource resource)
-
_saxUri
private void _saxUri(ContentHandler contentHandler, Resource resource, Page page, Content content) throws SAXException
- Throws:
SAXException
-
_encodePath
private String _encodePath(String path)
-
_saxSize
private void _saxSize(ContentHandler contentHandler, long size) throws SAXException
- Throws:
SAXException
-
_saxIcon
private void _saxIcon(ContentHandler contentHandler, String filename) throws SAXException
- Throws:
SAXException
-
-