Package org.ametys.plugins.glossary
Class DefinitionsGenerator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.apache.cocoon.generation.ServiceableGenerator
org.ametys.plugins.glossary.DefinitionsGenerator
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
Generate the list of word definitions as XML.
-
Field Summary
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Expression
_getThemeExpression
(String siteName, String language, String[] themes) Get the list of theme expressions to filter the definitions withvoid
generate()
protected void
saxDefinition
(DefaultDefinition definition) Generate a word definition.void
service
(ServiceManager serviceManager) boolean
themeExists
(String themeName, String siteName, String language) Verify the existence of a themeMethods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setup
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
Constructor Details
-
DefinitionsGenerator
public DefinitionsGenerator()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableGenerator
- Throws:
ServiceException
-
generate
-
_getThemeExpression
Get the list of theme expressions to filter the definitions with- Parameters:
siteName
- the site's namelanguage
- the site's languagethemes
- the array of theme Ids to create expressions- Returns:
- a list of ThemeExpression
-
saxDefinition
Generate a word definition.- Parameters:
definition
- the definition to generate.- Throws:
SAXException
- If an error occurs while generating the XML.
-
themeExists
Verify the existence of a theme- Parameters:
themeName
- the id of the theme to verifysiteName
- the site's namelanguage
- the site's language- Returns:
- true if the theme exists, false otherwise
-