Package org.ametys.odf.cdmfr
Class AmetysCDMfrExtension
- java.lang.Object
 - 
- org.ametys.odf.cdmfr.AmetysCDMfrExtension
 
 
- 
- All Implemented Interfaces:
 CDMfrExtension,Serviceable
public class AmetysCDMfrExtension extends Object implements CDMfrExtension, Serviceable
base CDMfr extension for Ametys 
- 
- 
Field Summary
Fields Modifier and Type Field Description private CatalogsManager_catalogsManagerprivate MonthEnumerator_monthEnumeratorprivate OdfReferenceTableHelper_refTableHelperprivate AmetysObjectResolver_resolverprivate SourceResolver_sourceResolver 
- 
Constructor Summary
Constructors Constructor Description AmetysCDMfrExtension() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_coursePart2CDM(ContentHandler contentHandler, CoursePart coursePart)Sax aCoursePartwith the following structure : <ametys-cdm:coursePart @ametys-cdm:code="code"> <ametys-cdm:title>Title</ametys-cdm:title> <ametys-cdm:nature>Nature CDM-fr value or code</ametys-cdm:nature> <ametys-cdm:nbHours>Number of hours</ametys-cdm:nbHours> <ametys-cdm:courseHolder>CDM ID of the course holder</ametys-cdm:courseHolder> </ametys-cdm:coursePart>private String_getFileAbsoluteUrl(AbstractProgram<? extends ProgramFactory> program, File file, String metadataPath)private void_saxMultipleEnumeration(ContentHandler contentHandler, String[] values, String tagName, String lang)SAX a multiple metadata based on an reference table.private void_saxSingleEnumeration(ContentHandler contentHandler, String value, String tagName, String lang)voidabstractProgram2CDM(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program, Set<String> persons, Set<String> orgUnits)Send the content of an user defined ametys extension to be included in the CDM-fr representation the abstract program.voidcontainer2CDM(ContentHandler contentHandler, Container container, Set<String> persons, Set<String> orgUnits)Send the content of an user defined ametys extension to be included in the CDM-fr representation the container.voidcourse2CDM(ContentHandler contentHandler, Course course, Set<String> persons, Set<String> orgUnits)Send the content of an user defined ametys extension to be included in the CDM-fr representation the course.voidorgunit2CDM(ContentHandler contentHandler, OrgUnit orgunit)Send the content of an user defined ametys extension to be included in the CDM-fr representation the orgunit.voidperson2CDM(ContentHandler contentHandler, Person person)Send the content of an user defined ametys extension to be included in the CDM-fr representation the orgunit.voidprogram2CDM(ContentHandler contentHandler, Program program, Set<String> persons, Set<String> orgUnits)Send the content of an user defined ametys extension to be included in the CDM-fr representation the program.protected voidsaxAcquiredSkills(ContentHandler contentHandler, Course course)Sax the acquired skillsprotected voidsaxAttachments(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program)Sax attachments (<ametys-cdm:attachments/>).protected voidsaxPartnerLaboratories(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program)Sax partner laboratories (<ametys-cdm:partnerLaboratories/>).protected voidsaxPartnerSchools(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program)Sax partner schools (<ametys-cdm:partnerSchools/>).protected voidsaxTraining(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program)Sax training and internship informations.voidservice(ServiceManager manager) 
 - 
 
- 
- 
Field Detail
- 
_refTableHelper
private OdfReferenceTableHelper _refTableHelper
 
- 
_catalogsManager
private CatalogsManager _catalogsManager
 
- 
_sourceResolver
private SourceResolver _sourceResolver
 
- 
_resolver
private AmetysObjectResolver _resolver
 
- 
_monthEnumerator
private MonthEnumerator _monthEnumerator
 
 - 
 
- 
Constructor Detail
- 
AmetysCDMfrExtension
public AmetysCDMfrExtension()
 
 - 
 
- 
Method Detail
- 
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
 servicein interfaceServiceable- Throws:
 ServiceException
 
- 
abstractProgram2CDM
public void abstractProgram2CDM(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program, Set<String> persons, Set<String> orgUnits) throws SAXException
Description copied from interface:CDMfrExtensionSend the content of an user defined ametys extension to be included in the CDM-fr representation the abstract program.- Specified by:
 abstractProgram2CDMin interfaceCDMfrExtension- Parameters:
 contentHandler- the receiving contentHandler.program- the abstract program (common for program and subprogram)persons- collectedPersonids.orgUnits- collectedOrgUnitids.- Throws:
 SAXException- if an error occurs during CDM processing.
 
- 
_saxMultipleEnumeration
private void _saxMultipleEnumeration(ContentHandler contentHandler, String[] values, String tagName, String lang) throws SAXException
SAX a multiple metadata based on an reference table. <ametys-cdm:tagName code="code">Label</ametys-cdm:tagName>- Parameters:
 contentHandler- The handlervalues- Values to SAXtagName- The tag namelang- The language to translate the label- Throws:
 SAXException- if an error occurs
 
- 
_saxSingleEnumeration
private void _saxSingleEnumeration(ContentHandler contentHandler, String value, String tagName, String lang) throws SAXException
- Throws:
 SAXException
 
- 
saxTraining
protected void saxTraining(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
Sax training and internship informations.- Parameters:
 contentHandler- the receiving contentHandler.program- the abstract program (common for program and subprogram)- Throws:
 SAXException- if an error occurs during CDM processing.
 
- 
saxPartnerSchools
protected void saxPartnerSchools(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
Sax partner schools (<ametys-cdm:partnerSchools/>).- Parameters:
 contentHandler- the receiving contentHandler.program- the abstract program (common for program and subprogram)- Throws:
 SAXException- if an error occurs during CDM processing.
 
- 
saxPartnerLaboratories
protected void saxPartnerLaboratories(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
Sax partner laboratories (<ametys-cdm:partnerLaboratories/>).- Parameters:
 contentHandler- the receiving contentHandler.program- the abstract program (common for program and subprogram)- Throws:
 SAXException- if an error occurs during CDM processing.
 
- 
saxAttachments
protected void saxAttachments(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
Sax attachments (<ametys-cdm:attachments/>).- Parameters:
 contentHandler- the receiving contentHandler.program- the abstract program (common for program and subprogram)- Throws:
 SAXException- if an error occurs during CDM processing.
 
- 
saxAcquiredSkills
protected void saxAcquiredSkills(ContentHandler contentHandler, Course course) throws SAXException
Sax the acquired skills- Parameters:
 contentHandler- the receiving contentHandler.course- the course- Throws:
 SAXException- if an error occurs during CDM processing.
 
- 
_getFileAbsoluteUrl
private String _getFileAbsoluteUrl(AbstractProgram<? extends ProgramFactory> program, File file, String metadataPath)
 
- 
program2CDM
public void program2CDM(ContentHandler contentHandler, Program program, Set<String> persons, Set<String> orgUnits) throws SAXException
Description copied from interface:CDMfrExtensionSend the content of an user defined ametys extension to be included in the CDM-fr representation the program.- Specified by:
 program2CDMin interfaceCDMfrExtension- Parameters:
 contentHandler- the receiving contentHandler.program- the programpersons- collectedPersonids.orgUnits- collectedOrgUnitids.- Throws:
 SAXException- if an error occurs during CDM processing.
 
- 
course2CDM
public void course2CDM(ContentHandler contentHandler, Course course, Set<String> persons, Set<String> orgUnits) throws SAXException
Description copied from interface:CDMfrExtensionSend the content of an user defined ametys extension to be included in the CDM-fr representation the course.- Specified by:
 course2CDMin interfaceCDMfrExtension- Parameters:
 contentHandler- the receiving contentHandler.course- the coursepersons- collectedPersonids.orgUnits- collectedOrgUnitids.- Throws:
 SAXException- if an error occurs during CDM processing.
 
- 
_coursePart2CDM
protected void _coursePart2CDM(ContentHandler contentHandler, CoursePart coursePart) throws SAXException
Sax aCoursePartwith the following structure : <ametys-cdm:coursePart @ametys-cdm:code="code"> <ametys-cdm:title>Title</ametys-cdm:title> <ametys-cdm:nature>Nature CDM-fr value or code</ametys-cdm:nature> <ametys-cdm:nbHours>Number of hours</ametys-cdm:nbHours> <ametys-cdm:courseHolder>CDM ID of the course holder</ametys-cdm:courseHolder> </ametys-cdm:coursePart>- Parameters:
 contentHandler- The content handlercoursePart- TheCoursePartto sax- Throws:
 SAXException- if an error occurs
 
- 
orgunit2CDM
public void orgunit2CDM(ContentHandler contentHandler, OrgUnit orgunit) throws SAXException
Description copied from interface:CDMfrExtensionSend the content of an user defined ametys extension to be included in the CDM-fr representation the orgunit.- Specified by:
 orgunit2CDMin interfaceCDMfrExtension- Parameters:
 contentHandler- the receiving contentHandler.orgunit- the orgunit- Throws:
 SAXException- if an error occurs during CDM processing.
 
- 
person2CDM
public void person2CDM(ContentHandler contentHandler, Person person) throws SAXException
Description copied from interface:CDMfrExtensionSend the content of an user defined ametys extension to be included in the CDM-fr representation the orgunit.- Specified by:
 person2CDMin interfaceCDMfrExtension- Parameters:
 contentHandler- the receiving contentHandler.person- the orgunit- Throws:
 SAXException- if an error occurs during CDM processing.
 
- 
container2CDM
public void container2CDM(ContentHandler contentHandler, Container container, Set<String> persons, Set<String> orgUnits) throws SAXException
Description copied from interface:CDMfrExtensionSend the content of an user defined ametys extension to be included in the CDM-fr representation the container.- Specified by:
 container2CDMin interfaceCDMfrExtension- Parameters:
 contentHandler- the receiving contentHandler.container- the containerpersons- collectedPersonids.orgUnits- collectedOrgUnitids.- Throws:
 SAXException- if an error occurs during CDM processing.
 
 - 
 
 -