Package org.ametys.odf.export.pdf
Class EducationalBookletGenerator
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.odf.export.pdf.EducationalBookletGenerator
- All Implemented Interfaces:
Poolable,Recyclable,Disposable,Component,Contextualizable,LogEnabled,Serviceable,Generator,SitemapModelComponent,XMLProducer
Generator producing the SAX of subprogram and its courses for the educational booklet
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CatalogsManagerThe catalog managerprotected ContextThe avalon contextprotected ODFHelperThe ODF helperprotected AmetysObjectResolverThe Ametys object resolverFields inherited from class org.apache.cocoon.generation.ServiceableGenerator
managerFields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, sourceFields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_getChildCourses(ProgramItem programItem) Get all child courses from the program itemprotected Set<SubProgram> _getChildSubPrograms(ProgramItem programItem) Get the direct childSubPrograms of aProgramItemprotected void_saxCatalog(ProgramItem programItem) Sax the catalog of program itemprotected void_saxContentAsFo(Content content, List<ProgramItem> ancestorPath, ProgramItem rootAncestor) Sax content as foprotected void_saxProgramItem(ProgramItem programItem, String tagName, List<ProgramItem> ancestorPath, ProgramItem rootProgramItem) Sax aProgramItemas fovoidcontextualize(Context context) voidgenerate()voidservice(ServiceManager sManager) Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
disposeMethods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setupMethods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandlerMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
Field Details
-
_resolver
The Ametys object resolver -
_odfHelper
The ODF helper -
_catalogManager
The catalog manager -
_context
The avalon context
-
-
Constructor Details
-
EducationalBookletGenerator
public EducationalBookletGenerator()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableGenerator- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
generate
- Specified by:
generatein interfaceGenerator- Throws:
IOExceptionSAXExceptionProcessingException
-
_saxCatalog
Sax the catalog of program item- Parameters:
programItem- the program item- Throws:
SAXException- if an error occurred
-
_getChildCourses
protected Set<Course> _getChildCourses(ProgramItem programItem) throws MalformedURLException, IOException, SAXException Get all child courses from the program item- Parameters:
programItem- the program item- Returns:
- the set of child courses
- Throws:
MalformedURLException- if an error occurredIOException- if an error occurredSAXException- if an error occurred
-
_getChildSubPrograms
Get the direct childSubPrograms of aProgramItem- Parameters:
programItem- the program item- Returns:
- the subprograms
-
_saxProgramItem
protected void _saxProgramItem(ProgramItem programItem, String tagName, List<ProgramItem> ancestorPath, ProgramItem rootProgramItem) throws MalformedURLException, IOException, SAXException Sax aProgramItemas fo- Parameters:
programItem- the program itemtagName- the xml tag nameancestorPath- The path of this program item (computed from the initial program item). Can be a partial path.rootProgramItem- The root program item ancestor for this booklet- Throws:
MalformedURLException- if an error occurredIOException- if an error occurredSAXException- if an error occurred
-
_saxContentAsFo
protected void _saxContentAsFo(Content content, List<ProgramItem> ancestorPath, ProgramItem rootAncestor) throws MalformedURLException, IOException, SAXException Sax content as fo- Parameters:
content- the contentancestorPath- The path of this program item (computed from the initial program item). Can be a partial path.rootAncestor- The root program item ancestor for this booklet- Throws:
MalformedURLException- if an error occurredIOException- if an error occurredSAXException- if an error occurred
-