Class OdfXSLTHelper

    • Method Detail

      • degreeLabel

        public static String degreeLabel​(String cdmValue)
        Get the label associated with the degree key
        Parameters:
        cdmValue - The code of degree
        Returns:
        The label of degree or code if not found
      • getCode

        public static String getCode​(String tableRefEntryId)
        Get the code associated with the given reference table's entry
        Parameters:
        tableRefEntryId - The id of entry
        Returns:
        the code or null if not found
      • getEntryId

        public static String getEntryId​(String tableRefId,
                                        String code)
        Get the id of reference table's entry
        Parameters:
        tableRefId - The id of content type
        code - The code
        Returns:
        the id or null if not found
      • degreeLabel

        public static String degreeLabel​(String cdmValue,
                                         String lang)
        Get the label associated with the degree key
        Parameters:
        cdmValue - The cdm value of degree
        lang - The language
        Returns:
        The label of degree or empty string if not found
      • getSubProgramStructure

        public static Node getSubProgramStructure​(String subprogramId)
        Get the whole structure of a subprogram, including the structure of child subprograms
        Parameters:
        subprogramId - The id of subprogram
        Returns:
        Node with the subprogram structure
      • getSubProgramStructure

        public static Node getSubProgramStructure​(String subprogramId,
                                                  int depth)
        Get the structure of a subprogram, including the structure of child subprograms until the given depth
        Parameters:
        subprogramId - The id of subprogram
        depth - Set a positive number to get structure of child subprograms until given depth. Set a negative number to get the whole structure recursively, including the structure of child subprograms. This parameter concerns only subprograms.
        Returns:
        Node with the subprogram structure
      • getParentProgram

        public static NodeList getParentProgram​(String subprogramId)
        Get the parent program information
        Parameters:
        subprogramId - The id of subprogram
        Returns:
        a node for each program's information
      • getCertificationLabel

        public static String getCertificationLabel​(String abstractProgramId)
        Get the certification label of a AbstractProgram. Returns null if the program is not certified.
        Parameters:
        abstractProgramId - the id of program or subprogram
        Returns:
        the certification label
      • getProgram

        public static Node getProgram​(String programId)
        Get the program information
        Parameters:
        programId - The id of program
        Returns:
        Node with the program's information
      • getParentProgramStructure

        public static NodeList getParentProgramStructure​(String subprogramId,
                                                         int depth)
        Get the structure of a parent programs, including the structure of child subprograms until the given depth.
        Parameters:
        subprogramId - The id of subprogram
        depth - Set a positive number to get structure of child subprograms until given depth. Set a negative number to get the whole structure recursively, including the structure of child subprograms. This parameter concerns only subprograms.
        Returns:
        a node for each program's structure
      • getProgramStructure

        public static Node getProgramStructure​(String programId,
                                               int depth)
        Get the structure of a program until the given depth.
        Parameters:
        programId - The id of program
        depth - Set a positive number to get structure of child subprograms until given depth. Set a negative number to get the whole structure recursively, including the structure of child subprograms. This parameter concerns only subprograms.
        Returns:
        Node with the program structure
      • getTableRefItems

        public static Node getTableRefItems​(String tableRefId,
                                            String lang)
        Get the items of a reference table
        Parameters:
        tableRefId - the id of reference table
        lang - the language to use for labels
        Returns:
        the items
      • getTableRefItems

        public static Node getTableRefItems​(String tableRefId,
                                            String lang,
                                            boolean ordered)
        Get the items of a reference table
        Parameters:
        tableRefId - the id of reference table
        lang - the language to use for labels
        ordered - true to sort items by 'order' attribute
        Returns:
        the items
      • getRootOrgUnitId

        public static String getRootOrgUnitId()
        Get the id of root orgunit
        Returns:
        The id of root
      • getOrgUnitIdByUAICode

        public static String getOrgUnitIdByUAICode​(String uaiCode)
        Get the id of the first orgunit matching the given UAI code
        Parameters:
        uaiCode - the UAI code
        Returns:
        the id of orgunit or null if not found
      • getEducationalBooklet

        public static AmetysNodeList getEducationalBooklet​(String subProgramId)
        Get the more recent educational booklet for one subprogram
        Parameters:
        subProgramId - the subprogram id
        Returns:
        the pdf as an ametys node list