Class ResourceSaxer
java.lang.Object
org.ametys.web.frontoffice.search.metamodel.impl.ResourceSaxer
- All Implemented Interfaces:
ReturnableSaxer
-
Field Summary
Modifier and TypeFieldDescriptionprotected ResourceReturnable
The associated returnable on resources -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Content
_getResourceContent
(Resource resource) Get the content containing the resourceprotected String
_getResourceExcerpt
(Resource resource, Logger logger) Get the excerpt of the resourceprotected Page
_getResourcePage
(Resource resource) Get the page containing the resourceprotected void
_saxIcon
(ContentHandler contentHandler, String filename) Sax the resource iconprotected void
_saxSize
(ContentHandler contentHandler, long size) Sax the resource sizeprotected void
_saxUri
(ContentHandler contentHandler, Resource resource, Page page, Content content) Sax the resource URIboolean
canSax
(AmetysObject hit, Logger logger, SearchComponentArguments args) Returnstrue
if this saxer is able to SAX the given search hitvoid
sax
(ContentHandler contentHandler, AmetysObject hit, Logger logger, SearchComponentArguments args) SAX the given search hitMethods 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 Details
-
_resourceReturnable
The associated returnable on resources
-
-
Constructor Details
-
ResourceSaxer
Constructor- Parameters:
resourceReturnable
- The associated returnable on resources
-
-
Method Details
-
canSax
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, 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
Get the excerpt of the resource- Parameters:
resource
- the resourcelogger
- the logger to use in case of error- Returns:
- the resource excerpt
-
_getResourcePage
Get the page containing the resource- Parameters:
resource
- the resource- Returns:
- the page containing the resource, null if the resource is not inside a page
-
_getResourceContent
Get the content containing the resource- Parameters:
resource
- the resource- Returns:
- the content containing the resource, null if the resource is not inside a content
-
_saxUri
protected void _saxUri(ContentHandler contentHandler, Resource resource, Page page, Content content) throws SAXException Sax the resource URI- Parameters:
contentHandler
- the content handler where to SAX into.resource
- the resource used to resolve the URIpage
- the page used to resolve the URIcontent
- the content used to resolve the URI- Throws:
SAXException
- if an errors occurs during the value writing
-
_saxSize
Sax the resource size- Parameters:
contentHandler
- the content handler where to SAX into.size
- the size to sax- Throws:
SAXException
- if an errors occurs during the value writing
-
_saxIcon
Sax the resource icon- Parameters:
contentHandler
- the content handler where to SAX into.filename
- the name of the resource- Throws:
SAXException
- if an errors occurs during the value writing
-