public class ExportCDMfrManager extends Object implements Component, Serviceable, Contextualizable
CDMEntity
.Modifier and Type | Field and Description |
---|---|
private static String[] |
__FIXED_DOMAIN_NAMES |
protected CDMfrExtensionPoint |
_cdmFrExtensionPoint
The CDMfr extension point
|
protected Context |
_context
The avalon context
|
protected ContentTypeExtensionPoint |
_cTypeEP
The content type extension point
|
protected ContentTypesHelper |
_cTypeHelper
Helper for content types
|
protected OdfReferenceTableHelper |
_refTableHelper
The ODF enumeration helper
|
protected AmetysObjectResolver |
_resolver
The Ametys object resolver
|
protected RootOrgUnitProvider |
_rootOrgUnitProvider
The root orgunit provider
|
protected SourceResolver |
_sourceResolver
The source resolver
|
static String |
ROLE
The Avalon role
|
Constructor and Description |
---|
ExportCDMfrManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
_abstractProgram2CDMCode(ContentHandler contentHandler,
AbstractProgram<? extends ProgramFactory> program)
SAX CDMfr events for a
AbstractProgram codes |
protected void |
_abstractProgram2CDMContacts(ContentHandler contentHandler,
AbstractProgram<? extends ProgramFactory> program,
Set<String> persons,
Set<String> orgUnits)
SAX CDMfr events for a
AbstractProgram contacts |
protected void |
_addNotNullAttribute(AttributesImpl attrs,
String localName,
String value)
SAX value as attributes if not null nor empty
|
protected void |
_addPositiveAttribute(AttributesImpl attrs,
String localName,
double value)
SAX value as attributes if not null nor empty
|
protected void |
_admissionInfo2CDM(ContentHandler contentHandler,
AbstractProgram<? extends ProgramFactory> program)
SAX CDMfr admission info
|
protected void |
_course2CDMContacts(ContentHandler contentHandler,
Course course,
Set<String> persons,
Set<String> orgUnits)
SAX CDMfr events for a
Course contacts |
protected void |
_courselist2CDM(ContentHandler contentHandler,
CourseList cl)
Convert course list info to CDM (without child courses)
|
protected Set<String> |
_courseLists2CDM(ContentHandler contentHandler,
Course course)
Sax the courses lists for a course.
|
protected void |
_credits2CDM(ContentHandler contentHandler,
Course course)
Sax the course credits.
|
protected void |
_degree2CDM(ContentHandler contentHandler,
AbstractProgram<? extends ProgramFactory> program)
SAX CDMfr degree
|
protected String |
_getRootOrgUnitId(Program program)
Get the root organization unit uai code
|
protected void |
_level2CDM(ContentHandler contentHandler,
AbstractProgram<? extends ProgramFactory> program)
SAX CDMfr level
|
protected void |
_orgunit2CDM(ContentHandler contentHandler,
OrgUnit orgunit,
Set<String> persons)
SAX CDMfr event for a
OrgUnit |
protected void |
_orgunit2CDM(ContentHandler contentHandler,
OrgUnit orgunit,
Set<String> persons,
boolean showChildren)
SAX CDMfr event for a
OrgUnit |
protected void |
_place2CDM(ContentHandler contentHandler,
AbstractProgram<? extends ProgramFactory> program)
SAX CDM-fr teaching places
|
protected void |
_programPart2CDMSubPrograms(ContentHandler contentHandler,
TraversableProgramPart programPart,
Set<String> persons,
Set<String> orgUnits,
Set<String> courses)
SAX CDMfr events for a
ProgramPart strcuture |
protected void |
_qualification2CDM(ContentHandler contentHandler,
AbstractProgram<? extends ProgramFactory> program)
SAX CDM-fr qualification
|
protected void |
_romeCodes2CDM(ContentHandler contentHandler,
AbstractProgram<? extends ProgramFactory> program)
SAX CDMfr rome codes
|
protected void |
_saxCohabilitation(ContentHandler contentHandler,
Program program)
Sax cohabilitation informations.
|
protected void |
_saxHabilitationDiploma(ContentHandler contentHandler,
Program program)
Sax habilitation informations of the diploma.
|
protected void |
_saxHabilitationDomains(ContentHandler contentHandler,
String[] domains)
Sax habilitation informations of domains.
|
protected void |
_saxHabilitationJointOrgUnit(ContentHandler contentHandler,
Program program)
Sax habilitation informations of joint orgunits.
|
protected void |
_saxHabilitationLicPro(ContentHandler contentHandler,
Program program)
Sax habilitation informations of professional license.
|
protected void |
_saxHabilitationMention(ContentHandler contentHandler,
Program program,
String mention)
Sax habilitation informations of mention.
|
protected void |
_saxHabilitationOtherDiploma(ContentHandler contentHandler,
Program program)
Sax habilitation informations for another diploma : no mention, not a license.
|
protected void |
_saxHabilitationPartnerShip(ContentHandler contentHandler,
Program program)
Sax habilitation informations of partner ship.
|
protected void |
_saxHabilitationSpeciality(ContentHandler contentHandler,
Program program,
String speciality)
Sax habilitation informations of speciality.
|
protected void |
_syllabus2CDM(ContentHandler contentHandler,
Course course)
SAX the syllabus elements of the course.
|
protected void |
_teachingLocation2CDM(ContentHandler contentHandler,
Course course)
Sax the course teaching locations.
|
void |
abstractProgram2CDM(ContentHandler contentHandler,
AbstractProgram<? extends ProgramFactory> program,
Set<String> persons,
Set<String> orgUnits,
Set<String> courses)
Send the CDM-fr representation of their ProgramPart to the given Contenthandler.
Also collects referenced orgUnits, persons and courses, so that they could be sent afterwards. |
void |
container2CDM(ContentHandler contentHandler,
Container container,
Set<String> persons,
Set<String> orgUnits,
Set<String> courses)
Send the CDM-fr representation of their ProgramPart to the given Contenthandler.
Also collects referenced orgUnits, persons and courses, so that they could be sent afterwards. |
void |
contextualize(Context context) |
void |
course2CDM(ContentHandler contentHandler,
Course course)
Export this entity in CDM-fr format.
|
Set<String> |
course2CDM(ContentHandler contentHandler,
Course course,
Set<String> orgUnits,
Set<String> persons)
Export this entity in CDM-fr format.
|
void |
courselist2CDM(ContentHandler contentHandler,
CourseList cl,
Set<String> courses)
SAX the course list structure
|
void |
generateCDM(ContentHandler contentHandler,
Program program)
Entry point to generate the CDM for a program
|
protected String |
getDiplomaType(Program program)
Get the type of diploma
|
void |
orgunit2CDM(ContentHandler contentHandler,
OrgUnit orgunit)
Export this entity in CDM-fr format.
|
void |
person2CDM(ContentHandler contentHandler,
Person person)
Export this entity in CDM-fr format.
|
void |
program2CDM(ContentHandler contentHandler,
Program program)
Export this entity in CDM-fr format.
|
void |
saxHabilitation(ContentHandler contentHandler,
Program program)
SAX CDMfr events for program's habilitation
|
void |
service(ServiceManager smanager) |
private static final String[] __FIXED_DOMAIN_NAMES
protected AmetysObjectResolver _resolver
protected SourceResolver _sourceResolver
protected OdfReferenceTableHelper _refTableHelper
protected RootOrgUnitProvider _rootOrgUnitProvider
protected CDMfrExtensionPoint _cdmFrExtensionPoint
protected ContentTypeExtensionPoint _cTypeEP
protected ContentTypesHelper _cTypeHelper
public ExportCDMfrManager()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void generateCDM(ContentHandler contentHandler, Program program) throws SAXException
contentHandler
- The content handler to sax intoprogram
- The programSAXException
- if failed to generate CDMpublic void saxHabilitation(ContentHandler contentHandler, Program program) throws SAXException
contentHandler
- the content handler to sax intoprogram
- the programSAXException
- if an error occurredprotected void _saxHabilitationDiploma(ContentHandler contentHandler, Program program) throws SAXException
contentHandler
- The content handlerprogram
- The program to saxSAXException
- if an error occursprotected void _saxHabilitationLicPro(ContentHandler contentHandler, Program program) throws SAXException
contentHandler
- The content handlerprogram
- The program to saxSAXException
- if an error occursprotected void _saxHabilitationOtherDiploma(ContentHandler contentHandler, Program program) throws SAXException
contentHandler
- The content handlerprogram
- The program to saxSAXException
- if an error occursprotected void _saxHabilitationMention(ContentHandler contentHandler, Program program, String mention) throws SAXException
contentHandler
- The content handlerprogram
- The program to saxmention
- The mention to saxSAXException
- if an error occursprotected void _saxHabilitationSpeciality(ContentHandler contentHandler, Program program, String speciality) throws SAXException
contentHandler
- The content handlerprogram
- The program to saxspeciality
- The speciality to saxSAXException
- if an error occursprotected void _saxCohabilitation(ContentHandler contentHandler, Program program) throws SAXException
contentHandler
- The content handlerprogram
- The program to saxSAXException
- if an error occursprotected void _saxHabilitationDomains(ContentHandler contentHandler, String[] domains) throws SAXException
contentHandler
- The content handlerdomains
- The domains to SAXSAXException
- if an error occursprotected void _saxHabilitationJointOrgUnit(ContentHandler contentHandler, Program program) throws SAXException
contentHandler
- The content handlerprogram
- The program to saxSAXException
- if an error occursprotected void _saxHabilitationPartnerShip(ContentHandler contentHandler, Program program) throws SAXException
contentHandler
- The content handlerprogram
- The program to saxSAXException
- if an error occursprotected String _getRootOrgUnitId(Program program)
program
- the exported programprotected String getDiplomaType(Program program)
program
- the programpublic void program2CDM(ContentHandler contentHandler, Program program) throws SAXException
contentHandler
- the target handlerprogram
- the programSAXException
- if an error occurs during export.public void abstractProgram2CDM(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program, Set<String> persons, Set<String> orgUnits, Set<String> courses) throws SAXException
contentHandler
- the receiving contentHandler.program
- the programpersons
- collected Person
ids.orgUnits
- collected OrgUnit
ids.courses
- collected Course
ids.SAXException
- if an error occurs during CDM processing.protected void _place2CDM(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
contentHandler
- the content handler to sax intoprogram
- the program or subprogramSAXException
- if an error occurredprotected void _qualification2CDM(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
contentHandler
- the content handler to sax intoprogram
- the program or subprogramSAXException
- if an error occurredprotected void _degree2CDM(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
contentHandler
- the content handler to sax intoprogram
- the program or subprogramSAXException
- if an error occurredprotected void _romeCodes2CDM(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
contentHandler
- the content handler to sax intoprogram
- the program or subprogramSAXException
- if an error occurredprotected void _level2CDM(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
contentHandler
- the content handler to sax intoprogram
- the program or subprogramSAXException
- if an error occurredprotected void _admissionInfo2CDM(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
contentHandler
- the content handler to sax intoprogram
- the program or subprogramSAXException
- if an error occurredprotected void _abstractProgram2CDMCode(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program) throws SAXException
AbstractProgram
codescontentHandler
- the content handler to sax intoprogram
- the program or subprogramSAXException
- if an error occurredprotected void _abstractProgram2CDMContacts(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program, Set<String> persons, Set<String> orgUnits) throws SAXException
AbstractProgram
contactscontentHandler
- the content handler to sax intoprogram
- the program or subprogrampersons
- the contactsorgUnits
- the orgunitsSAXException
- if an error occurredprotected void _programPart2CDMSubPrograms(ContentHandler contentHandler, TraversableProgramPart programPart, Set<String> persons, Set<String> orgUnits, Set<String> courses) throws SAXException
ProgramPart
strcuturecontentHandler
- the content handler to sax intoprogramPart
- the program partpersons
- the contactsorgUnits
- the orgunitscourses
- the coursesSAXException
- if an error occurredpublic void container2CDM(ContentHandler contentHandler, Container container, Set<String> persons, Set<String> orgUnits, Set<String> courses) throws SAXException
contentHandler
- the receiving contentHandler.container
- The containerpersons
- collected Person
ids.orgUnits
- collected OrgUnit
ids.courses
- collected Course
ids.SAXException
- if an error occurs during CDM processing.public void courselist2CDM(ContentHandler contentHandler, CourseList cl, Set<String> courses) throws SAXException
contentHandler
- The content handler to SAX intocl
- The course listcourses
- References of saxed coursesSAXException
- if an error occursprotected void _courselist2CDM(ContentHandler contentHandler, CourseList cl) throws SAXException
contentHandler
- The content handler to sax intocl
- The course listSAXException
- if an error occurspublic void course2CDM(ContentHandler contentHandler, Course course) throws SAXException
contentHandler
- the target handlercourse
- The courseSAXException
- if an error occurs during export.public Set<String> course2CDM(ContentHandler contentHandler, Course course, Set<String> orgUnits, Set<String> persons) throws SAXException
contentHandler
- the content handler to SAX intocourse
- the courseorgUnits
- the org unitspersons
- the personsSAXException
- if failed to generate CDMprotected Set<String> _courseLists2CDM(ContentHandler contentHandler, Course course) throws SAXException
contentHandler
- the content handler to SAX intocourse
- The courselist container.SAXException
- if failed to generate CDMprotected void _credits2CDM(ContentHandler contentHandler, Course course) throws SAXException
contentHandler
- the content handler to SAX intocourse
- The course to saxSAXException
- if failed to generate CDMprotected void _syllabus2CDM(ContentHandler contentHandler, Course course) throws SAXException
contentHandler
- The content handlercourse
- The course to SAXSAXException
- if an error occursprotected void _teachingLocation2CDM(ContentHandler contentHandler, Course course) throws SAXException
contentHandler
- the content handler to SAX intocourse
- The course to saxSAXException
- if failed to generate CDMprotected void _course2CDMContacts(ContentHandler contentHandler, Course course, Set<String> persons, Set<String> orgUnits) throws SAXException
Course
contactscontentHandler
- the content handler to sax intocourse
- the coursepersons
- the contactsorgUnits
- the orgunitsSAXException
- if an error occurredpublic void orgunit2CDM(ContentHandler contentHandler, OrgUnit orgunit) throws SAXException
contentHandler
- the target handlerorgunit
- the orgunitSAXException
- if an error occurs during export.protected void _orgunit2CDM(ContentHandler contentHandler, OrgUnit orgunit, Set<String> persons) throws SAXException
OrgUnit
contentHandler
- the content handler to sax intoorgunit
- the orgunitpersons
- the contacts of orgunitSAXException
- if an error occurredprotected void _orgunit2CDM(ContentHandler contentHandler, OrgUnit orgunit, Set<String> persons, boolean showChildren) throws SAXException
OrgUnit
contentHandler
- the content handler to sax intoorgunit
- the orgunitpersons
- the contacts of orgunitshowChildren
- true to sax child orgunitsSAXException
- if an error occurredpublic void person2CDM(ContentHandler contentHandler, Person person) throws SAXException
contentHandler
- the target handlerperson
- the personSAXException
- if an error occurs during export.protected void _addNotNullAttribute(AttributesImpl attrs, String localName, String value)
attrs
- the XML attributeslocalName
- the local namevalue
- the valueprotected void _addPositiveAttribute(AttributesImpl attrs, String localName, double value)
attrs
- the XML attributeslocalName
- the local namevalue
- the value