Package org.ametys.odf.content
Class ProgramItemStructureGenerator
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.content.ProgramItemStructureGenerator
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
SAX the structure (ie. the child program items) of a
ProgramItem
-
Field Summary
Modifier and TypeFieldDescriptionprotected ContentTypesHelper
The content types helperprotected ODFHelper
The ODF helperprotected OdfReferenceTableHelper
Helper for ODF reference tableprotected ODFSkillsHelper
The ODF skills helperprotected AmetysObjectResolver
The Ametys object resolverFields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_addAttrIfNotEmpty
(AttributesImpl attrs, String attrName, String attrValue) Add an attribute if its not null or empty.protected void
_saxCommonAttributes
(ProgramItem programItem, AttributesImpl attrs) SAX the common attributes for program itemprotected void
_saxReferenceTableItem
(String itemId, String tagName, String lang) SAX the item of a reference tableprotected void
_saxStructureViewIfExists
(Content content) SAX the 'structure' view if existsvoid
generate()
protected void
saxChildProgramItems
(ProgramItem programItem) SAX the child program itemsprotected void
saxContainer
(Container container) SAX a containerprotected void
SAX a courseprotected void
SAX a course listprotected void
saxCoursePart
(CoursePart coursePart) SAX a course partprotected void
saxCourseParts
(Course course) SAX a course partprotected void
saxProgram
(Program program) SAX a programprotected void
saxProgramItem
(ProgramItem programItem) SAX a program item with its child program itemsprotected void
saxSubProgram
(SubProgram subProgram) SAX a subprogramvoid
service
(ServiceManager smanager) Methods 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
-
Field Details
-
_odfHelper
The ODF helper -
_odfReferenceTableHelper
Helper for ODF reference table -
_cTypesHelper
The content types helper -
_odfSkillsHelper
The ODF skills helper -
_resolver
The Ametys object resolver
-
-
Constructor Details
-
ProgramItemStructureGenerator
public ProgramItemStructureGenerator()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableGenerator
- Throws:
ServiceException
-
generate
-
saxProgramItem
SAX a program item with its child program items- Parameters:
programItem
- the program item- Throws:
SAXException
- if an error occurs while saxing
-
saxChildProgramItems
SAX the child program items- Parameters:
programItem
- the program item- Throws:
SAXException
- if an error occurs while saxing
-
saxProgram
SAX a program- Parameters:
program
- the subprogram to SAX- Throws:
SAXException
- if an error occurs
-
saxSubProgram
SAX a subprogram- Parameters:
subProgram
- the subprogram to SAX- Throws:
SAXException
- if an error occurs
-
saxContainer
SAX a container- Parameters:
container
- the container to SAX- Throws:
SAXException
- if an error occurs while saxing
-
saxCourseList
SAX a course list- Parameters:
cl
- the course list to SAX- Throws:
SAXException
- if an error occurs while saxing
-
saxCourse
SAX a course- Parameters:
course
- the container to SAX- Throws:
SAXException
- if an error occurs while saxing
-
saxCourseParts
SAX a course part- Parameters:
course
- The course- Throws:
SAXException
- if an error occurs
-
saxCoursePart
SAX a course part- Parameters:
coursePart
- The course part to SAX- Throws:
SAXException
- if an error occurs
-
_saxStructureViewIfExists
SAX the 'structure' view if exists- Parameters:
content
- the content- Throws:
SAXException
- if an error occurs
-
_saxCommonAttributes
SAX the common attributes for program item- Parameters:
programItem
- the program itemattrs
- the attributes
-
_saxReferenceTableItem
protected void _saxReferenceTableItem(String itemId, String tagName, String lang) throws SAXException SAX the item of a reference table- Parameters:
itemId
- the item idtagName
- the tag namelang
- the language to use- Throws:
SAXException
- if an error occurs while saxing
-
_addAttrIfNotEmpty
Add an attribute if its not null or empty.- Parameters:
attrs
- The attributesattrName
- The attribute nameattrValue
- The attribute value
-