public class OdfReferenceTableHelper extends AbstractLogEnabled implements Component, Serviceable
| Modifier and Type | Field and Description | 
|---|---|
| private ContentTypeExtensionPoint | _cTypeEP | 
| private ContentTypesHelper | _cTypeHelper | 
| private AmetysObjectResolver | _resolver | 
| static String | ABSTRACT_MENTIONMention licence | 
| static String | ABSTRACT_TABLE_REFAbstract table ref | 
| static String | ABSTRACT_TABLE_REF_CATEGORYAbstract table ref for category | 
| static String | APPRENTICESHIP_CONTRACTApprenticeship contract | 
| static String | AVAILABLE_CERTIFICATIONAvailable certification | 
| static String | CAMPUSCampus | 
| static String | CODE_CITE97Code Cite97 | 
| static String | CODE_DGESIPCode DGESIP | 
| static String | CODE_ERASMUSCode ERASMUS | 
| static String | CODE_ERASMUS_CATEGORYCategory for code Erasmus | 
| static String | CODE_FAPCode FAP | 
| static String | CODE_FAP_CATEGORYCategory for code FAP | 
| static String | CODE_NSFCode NSF | 
| static String | CODE_ROMECode ROME | 
| static String | CODE_SISECode SISE | 
| static String | CONTAINER_NATURENature of container | 
| static String | COURSE_NATURENature of course | 
| static String | DEGREEDegree | 
| static String | DISCIPLINEDiscipline | 
| static String | DISTANCE_LEARNING_MODALITIESDistance learning modalities | 
| static String | DOMAINDomain | 
| static String | DURATIONDuration | 
| static String | ECTSECTS | 
| static String | FOREIGN_PLACEForeign place | 
| static String | FORMOFTEACHING_METHODForm of teaching | 
| static String | FORMOFTEACHING_ORGOrgnization of teaching | 
| static String | INTERNATIONAL_EDUCATIONInternational education | 
| static String | INTERNSHIPType of training course | 
| static String | JOIN_ORGUNITJoin orgunit | 
| static String | LANGUAGELanguage | 
| static String | LEVELLevel | 
| static String | MENTION_LICENCEMention licence | 
| static String | MENTION_LICENCEPROMention licence pro | 
| static String | MENTION_MASTERMention master | 
| static String | ORGUNIT_TYPEOrgUnit type | 
| static String | PERIODPeriod | 
| static String | PERSON_ROLEPerson role | 
| static String | PLACEPlace | 
| static String | PROGRAM_FIELDProgram field | 
| static String | PROGRAM_TYPEProgram type. | 
| static String | RNCP_LEVELRNCP level | 
| static String | ROLEAvalon Role | 
| static String | SECTORSSectors | 
| static String | TEACHING_ACTIVITYTeaching method | 
| static String | TEACHING_TERMTeaching term. | 
| static String | TIME_SLOTTime slot | 
| Constructor and Description | 
|---|
| OdfReferenceTableHelper() | 
| Modifier and Type | Method and Description | 
|---|---|
| private Map<String,MetadataDefinition> | _getTableRefMetadata(AbstractMetadataSetElement element,
                    MetadataDefinitionHolder parentMetaDef,
                    String prefix) | 
| private Map<String,MetadataDefinition> | _getTableRefMetadata(MetadataDefinitionHolder parentMetaDef,
                    String prefix) | 
| private void | _saxItems(ContentHandler contentHandler,
         AttributesImpl rootAttrs,
         String tableRefId) | 
| String | getCDMfrValue(String tableRefIf,
             String code)Get the CDM-fr value associated with the given code | 
| String | getItemCDMfrValue(String tableRefId,
                 String contentId,
                 boolean returnCodeIfEmpty)Returns the CMD value of an reference table entry | 
| String | getItemCode(String tableRefId,
           String contentId)Returns the code of an reference table entry from its CDM value | 
| String | getItemCodeFromCDM(String tableRefId,
                  String cdmValue)Returns the code of an reference table entry from its CDM value | 
| OdfReferenceTableEntry | getItemFromCDM(String tableRefId,
              String cdmValue)Returns the entry of an reference table entry from its cdmValue | 
| OdfReferenceTableEntry | getItemFromCode(String tableRefId,
               String code)Returns the entry of an reference table entry from its code | 
| String | getItemLabel(String tableRefId,
            String contentId,
            String lang)Returns the label of an reference table entry | 
| List<OdfReferenceTableEntry> | getItems(String tableRefId)Get all items of an enumeration and their label | 
| Map<String,String> | getMentionContentTypes(List<String> degreeIds)Get the content type for mention for this degree | 
| Set<String> | getTableReferenceIds()Get the id of table references | 
| Map<String,MetadataDefinition> | getTableRefMetadataDefinition(String cTypeId)Get the metadata definitions for table references for a given content type | 
| Map<String,MetadataDefinition> | getTableRefMetadataDefinition(String cTypeId,
                             String medatataSetName,
                             boolean isEditionMetadataSet)Get the metadata definitions for table references for a given content type and a metadata set | 
| boolean | isTableReference(String cTypeId)Determines if the content type is a ODF table reference | 
| boolean | isTableReferenceEntry(Content content)Determines if the content is an entry of a ODF table reference | 
| void | saxItems(ContentHandler contentHandler,
        MetadataDefinition metaDef)SAX items of a reference table | 
| void | saxItems(ContentHandler contentHandler,
        String tableRefId)SAX items of a reference table | 
| void | service(ServiceManager manager) | 
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerpublic static final String ABSTRACT_TABLE_REF
public static final String DOMAIN
public static final String DEGREE
public static final String LEVEL
public static final String PROGRAM_TYPE
public static final String FORMOFTEACHING_METHOD
public static final String FORMOFTEACHING_ORG
public static final String TEACHING_ACTIVITY
public static final String INTERNSHIP
public static final String DISTANCE_LEARNING_MODALITIES
public static final String PLACE
public static final String TEACHING_TERM
public static final String TIME_SLOT
public static final String CODE_ROME
public static final String CODE_ERASMUS
public static final String CODE_DGESIP
public static final String CODE_SISE
public static final String CODE_CITE97
public static final String CODE_FAP
public static final String CODE_NSF
public static final String RNCP_LEVEL
public static final String JOIN_ORGUNIT
public static final String ABSTRACT_MENTION
public static final String MENTION_LICENCE
public static final String MENTION_LICENCEPRO
public static final String MENTION_MASTER
public static final String ABSTRACT_TABLE_REF_CATEGORY
public static final String APPRENTICESHIP_CONTRACT
public static final String AVAILABLE_CERTIFICATION
public static final String CAMPUS
public static final String CODE_ERASMUS_CATEGORY
public static final String CODE_FAP_CATEGORY
public static final String CONTAINER_NATURE
public static final String COURSE_NATURE
public static final String DISCIPLINE
public static final String DURATION
public static final String ECTS
public static final String FOREIGN_PLACE
public static final String INTERNATIONAL_EDUCATION
public static final String LANGUAGE
public static final String ORGUNIT_TYPE
public static final String PERIOD
public static final String PERSON_ROLE
public static final String PROGRAM_FIELD
public static final String SECTORS
private AmetysObjectResolver _resolver
private ContentTypeExtensionPoint _cTypeEP
private ContentTypesHelper _cTypeHelper
public OdfReferenceTableHelper()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic boolean isTableReference(String cTypeId)
cTypeId - The id of content typepublic boolean isTableReferenceEntry(Content content)
content - The contenttrue if the content is an entry of a ODF table referencepublic Set<String> getTableReferenceIds()
public Map<String,MetadataDefinition> getTableRefMetadataDefinition(String cTypeId)
cTypeId - The id of content typepublic Map<String,MetadataDefinition> getTableRefMetadataDefinition(String cTypeId, String medatataSetName, boolean isEditionMetadataSet)
cTypeId - The id of content typemedatataSetName - the name of the metadata set. Cannot be null.isEditionMetadataSet - true if the metadata set is for edition.private Map<String,MetadataDefinition> _getTableRefMetadata(MetadataDefinitionHolder parentMetaDef, String prefix)
private Map<String,MetadataDefinition> _getTableRefMetadata(AbstractMetadataSetElement element, MetadataDefinitionHolder parentMetaDef, String prefix)
public Map<String,String> getMentionContentTypes(List<String> degreeIds)
degreeIds - The ids of degreespublic String getCDMfrValue(String tableRefIf, String code)
tableRefIf - The id of content typecode - The codepublic List<OdfReferenceTableEntry> getItems(String tableRefId)
tableRefId - The id of content typepublic String getItemLabel(String tableRefId, String contentId, String lang)
tableRefId - The id of content typecontentId - The content idlang - The requested language of labelnull if not foundpublic String getItemCDMfrValue(String tableRefId, String contentId, boolean returnCodeIfEmpty)
tableRefId - The id of content typecontentId - The content idreturnCodeIfEmpty - true to return the code if CDM-fr value is emptypublic String getItemCode(String tableRefId, String contentId)
tableRefId - The id of content typecontentId - The id of contentpublic String getItemCodeFromCDM(String tableRefId, String cdmValue)
tableRefId - The id of content typecdmValue - The CDM-fr valuenull if not foundpublic OdfReferenceTableEntry getItemFromCDM(String tableRefId, String cdmValue)
tableRefId - The id of content typecdmValue - The CDM-fr valuenull if not foundpublic OdfReferenceTableEntry getItemFromCode(String tableRefId, String code)
tableRefId - The id of content typecode - The codenull if not foundpublic void saxItems(ContentHandler contentHandler, String tableRefId) throws SAXException
contentHandler - The content handler to sax intotableRefId - The id of reference tableSAXException - if an error occurred while saxingpublic void saxItems(ContentHandler contentHandler, MetadataDefinition metaDef) throws SAXException
contentHandler - the content handler to sax intometaDef - the metadata definitionSAXException - if an error occurs while saxingprivate void _saxItems(ContentHandler contentHandler, AttributesImpl rootAttrs, String tableRefId) throws SAXException
SAXException