Package org.ametys.odf.enumeration
Class OdfReferenceTableHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.enumeration.OdfReferenceTableHelper
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
This component handles ODF reference tables
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
This class represents a sort field for reference table. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Mention licencestatic final String
Abstract table refstatic final String
Abstract table ref for categorystatic final String
Apprenticeship contractstatic final String
Available certificationstatic final String
Campusstatic final String
Code Cite97static final String
Code DGESIPstatic final String
Code ERASMUSstatic final String
Category for code Erasmusstatic final String
Code FAPstatic final String
Category for code FAPstatic final String
Code NSFstatic final String
Code ROMEstatic final String
Code SISEstatic final String
Nature of containerstatic final String
Nature of coursestatic final String
Degreestatic final String
Attribute name for mention type in table refe degreestatic final String
Disciplinestatic final String
Distance learning modalitiesstatic final String
Domainstatic final String
Durationstatic final String
ECTSstatic final String
Nature of course partstatic final String
Category of nature of course partstatic final String
Foreign placestatic final String
Form of teachingstatic final String
Orgnization of teachingstatic final String
International educationstatic final String
Type of training coursestatic final String
Join orgunitstatic final String
Languagestatic final String
Levelstatic final String
Mention BUTstatic final String
Mention BUTstatic final String
Mention licencestatic final String
Mention licence prostatic final String
Mention masterstatic final String
OrgUnit typestatic final String
Periodstatic final String
Period typestatic final String
Person rolestatic final String
Placestatic final String
Program fieldstatic final String
Program type.static final String
RNCP levelstatic final String
Avalon Rolestatic final String
Sectorsstatic final String
Skillstatic final String
Skill setstatic final String
Teaching methodstatic final String
Teaching term.static final String
Time slot -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBUTParcoursForMention
(String mentionId) Get the available BUT training paths for a BUT mentiongetBUTParcoursItems
(String programItemId) Get the available BUT training paths for aProgramItem
getBUTParcoursItems
(String contentId, String mentionId) Get the available BUT training paths for a contentgetCDMfrValue
(String tableRefId, String code) Get the CDM-fr value associated with the given codeReturns the reference table entry from its CDM valuegetItemCDMfrValue
(String contentId, boolean returnCodeIfEmpty) Returns the CMD value of an reference table entrygetItemCDMfrValue
(String tableRefId, String contentId, boolean returnCodeIfEmpty) Deprecated.getItemCode
(String contentId) Returns the code of an reference table entry from its CDM valuegetItemCode
(String tableRefId, String contentId) Deprecated.UsegetItemCode(String)
insteadgetItemCodeFromCDM
(String tableRefId, String cdmValue) Returns the code of an reference table entry from its CDM valuegetItemFromApogee
(String tableRefId, String codeApogee) Returns the entry of a reference table entry from its code ApogeegetItemFromCDM
(String tableRefId, String cdmValue) Returns the entry of an reference table entry from its cdmValuegetItemFromCode
(String tableRefId, String code) Returns the entry of an reference table entry from its codegetItemLabel
(String contentId, String lang) Returns the label of an reference table entrygetItemLabel
(String tableRefId, String contentId, String lang) Deprecated.UsegetItemLabel(String, String)
insteadGet all items of an enumeration and their labelgetItems
(String tableRefId, OdfReferenceTableHelper.SortField... sortFields) Get all items of an enumeration and their label, sorted by given fieldsgetMentionContentTypes
(List<String> degreeIds) Get the content type for mention for this degreegetMentionForDegree
(String degreeId) Get the mention for a given degree.getMentionType
(Program program) Get the type of mention for a programgetTableRefAttributeDefinitions
(String cTypeId) Get the attribute definitions for table references for a given content typegetTableRefAttributeDefinitions
(String cTypeId, String viewName) Get the attribute definitions for table references for a given content type and a viewGet the id of table referencesboolean
isBUTDiploma
(Program program) Determines if the program is a BUT diplomaboolean
isTableReference
(String cTypeId) Determines if the content type is a ODF table referenceboolean
isTableReferenceEntry
(Content content) Determines if the content is an entry of a ODF table referencevoid
saxItems
(ContentHandler contentHandler, String tableRefId) SAX items of a reference tablevoid
saxItems
(ContentHandler contentHandler, String tableRefId, String lang) SAX items of a reference tablevoid
saxItems
(ContentHandler contentHandler, ContentAttributeDefinition attributeDefinition) SAX items of a reference tablevoid
saxItems
(ContentHandler contentHandler, ContentAttributeDefinition attributeDefinition, String lang) SAX items of a reference tablevoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role -
ABSTRACT_TABLE_REF
Abstract table ref- See Also:
-
DOMAIN
Domain- See Also:
-
DEGREE
Degree- See Also:
-
LEVEL
Level- See Also:
-
PROGRAM_TYPE
Program type.- See Also:
-
FORMOFTEACHING_METHOD
Form of teaching- See Also:
-
FORMOFTEACHING_ORG
Orgnization of teaching- See Also:
-
TEACHING_ACTIVITY
Teaching method- See Also:
-
INTERNSHIP
Type of training course- See Also:
-
DISTANCE_LEARNING_MODALITIES
Distance learning modalities- See Also:
-
PLACE
Place- See Also:
-
TEACHING_TERM
Teaching term.- See Also:
-
TIME_SLOT
Time slot- See Also:
-
CODE_ROME
Code ROME- See Also:
-
CODE_ERASMUS
Code ERASMUS- See Also:
-
CODE_DGESIP
Code DGESIP- See Also:
-
CODE_SISE
Code SISE- See Also:
-
CODE_CITE97
Code Cite97- See Also:
-
CODE_FAP
Code FAP- See Also:
-
CODE_NSF
Code NSF- See Also:
-
RNCP_LEVEL
RNCP level- See Also:
-
JOIN_ORGUNIT
Join orgunit- See Also:
-
ABSTRACT_MENTION
Mention licence- See Also:
-
MENTION_BUT
Mention BUT- See Also:
-
MENTION_BUT_ATTRIBUTE_PARCOURS
Mention BUT- See Also:
-
MENTION_LICENCE
Mention licence- See Also:
-
MENTION_LICENCEPRO
Mention licence pro- See Also:
-
MENTION_MASTER
Mention master- See Also:
-
ABSTRACT_TABLE_REF_CATEGORY
Abstract table ref for category- See Also:
-
APPRENTICESHIP_CONTRACT
Apprenticeship contract- See Also:
-
AVAILABLE_CERTIFICATION
Available certification- See Also:
-
CAMPUS
Campus- See Also:
-
CODE_ERASMUS_CATEGORY
Category for code Erasmus- See Also:
-
CODE_FAP_CATEGORY
Category for code FAP- See Also:
-
CONTAINER_NATURE
Nature of container- See Also:
-
COURSE_NATURE
Nature of course- See Also:
-
DISCIPLINE
Discipline- See Also:
-
DURATION
Duration- See Also:
-
ECTS
ECTS- See Also:
-
FOREIGN_PLACE
Foreign place- See Also:
-
INTERNATIONAL_EDUCATION
International education- See Also:
-
LANGUAGE
Language- See Also:
-
ORGUNIT_TYPE
OrgUnit type- See Also:
-
PERIOD
Period- See Also:
-
PERIOD_TYPE
Period type- See Also:
-
PERSON_ROLE
Person role- See Also:
-
PROGRAM_FIELD
Program field- See Also:
-
SECTORS
Sectors- See Also:
-
ENSEIGNEMENT_NATURE
Nature of course part- See Also:
-
ENSEIGNEMENT_NATURE_CATEGORY
Category of nature of course part- See Also:
-
SKILL
Skill- See Also:
-
SKILL_SET
Skill set- See Also:
-
DEGREE_MENTION_TYPE
Attribute name for mention type in table refe degree- See Also:
-
-
Constructor Details
-
OdfReferenceTableHelper
public OdfReferenceTableHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
isTableReference
Determines if the content type is a ODF table reference- Parameters:
cTypeId
- The id of content type- Returns:
- true if the content type is a ODF table reference
-
isTableReferenceEntry
Determines if the content is an entry of a ODF table reference- Parameters:
content
- The content- Returns:
true
if the content is an entry of a ODF table reference
-
getTableReferenceIds
Get the id of table references- Returns:
- The content type's id
-
getTableRefAttributeDefinitions
Get the attribute definitions for table references for a given content type- Parameters:
cTypeId
- The id of content type- Returns:
- The attribute definitions for table references
-
getTableRefAttributeDefinitions
public Map<String,ContentAttributeDefinition> getTableRefAttributeDefinitions(String cTypeId, String viewName) Get the attribute definitions for table references for a given content type and a view- Parameters:
cTypeId
- The id of content typeviewName
- the name of the view. Cannot be null.- Returns:
- The attributes definitions for table references
-
getMentionContentTypes
Get the content type for mention for this degree- Parameters:
degreeIds
- The ids of degrees- Returns:
- A map with the id of content type or null if there is no mention for this degree
-
getBUTParcoursForMention
Get the available BUT training paths for a BUT mention- Parameters:
mentionId
- the id of BUT mention- Returns:
- the BUT training paths
-
getBUTParcoursItems
Get the available BUT training paths for a content- Parameters:
contentId
- the content's idmentionId
- the id of mention. Can be null or empty- Returns:
- the available BUT training paths
-
getBUTParcoursItems
Get the available BUT training paths for aProgramItem
- Parameters:
programItemId
- the id of program item- Returns:
- the BUT training paths
-
isBUTDiploma
Determines if the program is a BUT diploma- Parameters:
program
- the program- Returns:
- true if the program has a BUT
-
getMentionType
Get the type of mention for a program- Parameters:
program
- the program- Returns:
- the type of mention or null if there is no mention for this program
-
getMentionForDegree
Get the mention for a given degree.- Parameters:
degreeId
- The degree ID- Returns:
- The associated mention reference table, null if there isn't
-
getCDMfrValue
Get the CDM-fr value associated with the given code- Parameters:
tableRefId
- The id of content typecode
- The code- Returns:
- The CDM-fr value or empty string if not found
-
getItems
Get all items of an enumeration and their label- Parameters:
tableRefId
- The id of content type- Returns:
- items of enumeration
-
getItems
public List<OdfReferenceTableEntry> getItems(String tableRefId, OdfReferenceTableHelper.SortField... sortFields) Get all items of an enumeration and their label, sorted by given fields- Parameters:
tableRefId
- The id of content typesortFields
- The sort fields to order results- Returns:
- items of enumeration
-
getItemLabel
Returns the label of an reference table entry- Parameters:
contentId
- The content idlang
- The requested language of label- Returns:
- the item label or
null
if not found
-
getItemLabel
Deprecated.UsegetItemLabel(String, String)
insteadReturns the label of an reference table entry- Parameters:
tableRefId
- The id of content type (useless)contentId
- The content idlang
- The requested language of label- Returns:
- the item label or
null
if not found
-
getItemCDMfrValue
Returns the CMD value of an reference table entry- Parameters:
contentId
- The content idreturnCodeIfEmpty
-true
to return the code if CDM-fr value is empty- Returns:
- the CDM-fr value or empty value if not found
-
getItemCDMfrValue
@Deprecated public String getItemCDMfrValue(String tableRefId, String contentId, boolean returnCodeIfEmpty) Deprecated.UsegetItemCDMfrValue(String, boolean)
insteadReturns the CMD value of an reference table entry- Parameters:
tableRefId
- The id of content type (useless)contentId
- The content idreturnCodeIfEmpty
-true
to return the code if CDM-fr value is empty- Returns:
- the CDM-fr value or empty value if not found
-
getItemCode
Returns the code of an reference table entry from its CDM value- Parameters:
contentId
- The id of content- Returns:
- the code or empty value if not found
-
getItemCode
Deprecated.UsegetItemCode(String)
insteadReturns the code of an reference table entry from its CDM value- Parameters:
tableRefId
- The id of content type (useless)contentId
- The id of content- Returns:
- the code or empty value if not found
-
getItemCodeFromCDM
Returns the code of an reference table entry from its CDM value- Parameters:
tableRefId
- The id of content typecdmValue
- The CDM-fr value- Returns:
- the code or
null
if not found
-
getItemFromCDM
Returns the entry of an reference table entry from its cdmValue- Parameters:
tableRefId
- The id of content typecdmValue
- The CDM-fr value- Returns:
- the entry or
null
if not found
-
getItemFromCode
Returns the entry of an reference table entry from its code- Parameters:
tableRefId
- The id of content typecode
- The code- Returns:
- the entry or
null
if not found
-
getItemFromApogee
Returns the entry of a reference table entry from its code Apogee- Parameters:
tableRefId
- The id of content typecodeApogee
- The Apogee code- Returns:
- the entry or
null
if not found
-
getItem
Returns the reference table entry from its CDM value- Parameters:
contentId
- The id of content- Returns:
- the item as an
OdfReferenceTableEntry
or null if not found
-
saxItems
SAX items of a reference table- Parameters:
contentHandler
- The content handler to sax intotableRefId
- The id of reference table- Throws:
SAXException
- if an error occurred while saxing
-
saxItems
public void saxItems(ContentHandler contentHandler, ContentAttributeDefinition attributeDefinition) throws SAXException SAX items of a reference table- Parameters:
contentHandler
- the content handler to sax intoattributeDefinition
- the metadata definition- Throws:
SAXException
- if an error occurs while saxing
-
saxItems
public void saxItems(ContentHandler contentHandler, String tableRefId, String lang) throws SAXException SAX items of a reference table- Parameters:
contentHandler
- The content handler to sax intotableRefId
- The id of reference tablelang
- the language to use to display items, can benull
then odf language is used- Throws:
SAXException
- if an error occurred while saxing
-
saxItems
public void saxItems(ContentHandler contentHandler, ContentAttributeDefinition attributeDefinition, String lang) throws SAXException SAX items of a reference table- Parameters:
contentHandler
- the content handler to sax intoattributeDefinition
- the metadata definitionlang
- the language to use to display items, can benull
then odf language is used- Throws:
SAXException
- if an error occurs while saxing
-
getItemCDMfrValue(String, boolean)
instead