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
public class ProgramItemStructureGenerator extends ServiceableGenerator
SAX the structure (ie. the child program items) of aProgramItem
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypesHelper_cTypesHelperThe content types helperprotected ODFHelper_odfHelperThe ODF helperprotected OdfReferenceTableHelper_odfReferenceTableHelperHelper for ODF reference table-
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 Constructor Description ProgramItemStructureGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 existsvoidgenerate()protected voidsaxChildProgramItems(ProgramItem programItem)SAX the child program itemsprotected voidsaxContainer(Container container)SAX a containerprotected voidsaxCourse(Course course)SAX a courseprotected voidsaxCourseList(CourseList cl)SAX a course listprotected voidsaxCoursePart(CoursePart coursePart)SAX a course partprotected voidsaxCourseParts(Course course)SAX a course partprotected voidsaxProgram(Program program)SAX a programprotected voidsaxProgramItem(ProgramItem programItem)SAX a program item with its child program itemsprotected voidsaxSubProgram(SubProgram subProgram)SAX a subprogramvoidservice(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 Detail
-
_odfHelper
protected ODFHelper _odfHelper
The ODF helper
-
_odfReferenceTableHelper
protected OdfReferenceTableHelper _odfReferenceTableHelper
Helper for ODF reference table
-
_cTypesHelper
protected ContentTypesHelper _cTypesHelper
The content types helper
-
-
Constructor Detail
-
ProgramItemStructureGenerator
public ProgramItemStructureGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableGenerator- Throws:
ServiceException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
-
saxProgramItem
protected void saxProgramItem(ProgramItem programItem) throws SAXException
SAX a program item with its child program items- Parameters:
programItem- the program item- Throws:
SAXException- if an error occurs while saxing
-
saxChildProgramItems
protected void saxChildProgramItems(ProgramItem programItem) throws SAXException
SAX the child program items- Parameters:
programItem- the program item- Throws:
SAXException- if an error occurs while saxing
-
saxProgram
protected void saxProgram(Program program) throws SAXException
SAX a program- Parameters:
program- the subprogram to SAX- Throws:
SAXException- if an error occurs
-
saxSubProgram
protected void saxSubProgram(SubProgram subProgram) throws SAXException
SAX a subprogram- Parameters:
subProgram- the subprogram to SAX- Throws:
SAXException- if an error occurs
-
saxContainer
protected void saxContainer(Container container) throws SAXException
SAX a container- Parameters:
container- the container to SAX- Throws:
SAXException- if an error occurs while saxing
-
saxCourseList
protected void saxCourseList(CourseList cl) throws SAXException
SAX a course list- Parameters:
cl- the course list to SAX- Throws:
SAXException- if an error occurs while saxing
-
saxCourse
protected void saxCourse(Course course) throws SAXException
SAX a course- Parameters:
course- the container to SAX- Throws:
SAXException- if an error occurs while saxing
-
saxCourseParts
protected void saxCourseParts(Course course) throws SAXException
SAX a course part- Parameters:
course- The course- Throws:
SAXException- if an error occurs
-
saxCoursePart
protected void saxCoursePart(CoursePart coursePart) throws SAXException
SAX a course part- Parameters:
coursePart- The course part to SAX- Throws:
SAXException- if an error occurs
-
_saxStructureViewIfExists
protected void _saxStructureViewIfExists(Content content) throws SAXException
SAX the 'structure' view if exists- Parameters:
content- the content- Throws:
SAXException- if an error occurs
-
_saxCommonAttributes
protected void _saxCommonAttributes(ProgramItem programItem, AttributesImpl attrs)
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
protected void _addAttrIfNotEmpty(AttributesImpl attrs, String attrName, String attrValue)
Add an attribute if its not null or empty.- Parameters:
attrs- The attributesattrName- The attribute nameattrValue- The attribute value
-
-