Class ItemHelperBase

    • Field Detail

      • ITEM_AUDIO

        protected static final long ITEM_AUDIO
      • ITEM_ESSAY

        protected static final long ITEM_ESSAY
      • ITEM_FILE

        protected static final long ITEM_FILE
      • ITEM_FIB

        protected static final long ITEM_FIB
      • ITEM_FIN

        protected static final long ITEM_FIN
      • ITEM_MCSC

        protected static final long ITEM_MCSC
      • ITEM_SURVEY

        protected static final long ITEM_SURVEY
      • ITEM_MCMC

        protected static final long ITEM_MCMC
      • ITEM_MCMC_SS

        protected static final long ITEM_MCMC_SS
      • ITEM_TF

        protected static final long ITEM_TF
      • ITEM_MATCHING

        protected static final long ITEM_MATCHING
      • ITEM_MXSURVEY

        protected static final long ITEM_MXSURVEY
      • ITEM_CALCQ

        protected static final long ITEM_CALCQ
      • ITEM_IMAGMQ

        protected static final long ITEM_IMAGMQ
      • ITEM_EMI

        protected static final long ITEM_EMI
    • Constructor Detail

      • ItemHelperBase

        public ItemHelperBase()
    • Method Detail

      • getAuthoringXml

        protected abstract AuthoringXml getAuthoringXml()
        We will have a versioned AuthoringXml in subclasses.
        Returns:
      • getQtiVersion

        protected abstract int getQtiVersion()
        Get the QTI version for each subclass.
        Returns:
        a QTIVersion.VERSION_... constant
      • readXMLDocument

        public Item readXMLDocument​(InputStream inputStream)
        Read an item XML document from a stream into an Item XML object
        Specified by:
        readXMLDocument in interface ItemHelperIfc
        Parameters:
        inputStream - XML document stream
        Returns:
        an Item XML object
      • readTypeXMLItem

        public Item readTypeXMLItem​(Long type)
        Get Item Xml for a given item type as a TypeIfc.
        Specified by:
        readTypeXMLItem in interface ItemHelperIfc
        Parameters:
        type - item type as a TypeIfc
        Returns:
      • readTypeSurveyItem

        public Item readTypeSurveyItem​(String scaleName)
        Get Item Xml for a given survey item scale name.
        Specified by:
        readTypeSurveyItem in interface ItemHelperIfc
        Parameters:
        scaleName -
        Returns:
      • updateItemXml

        public Item updateItemXml​(Item itemXml,
                                  String xpath,
                                  String value)
        Update path with value
        Specified by:
        updateItemXml in interface ItemHelperIfc
        Parameters:
        itemXml - the item xml
        xpath - the xpath
        value - the value to set
        Returns:
        the item xml
      • makeItemNodeText

        protected String makeItemNodeText​(Item itemXml,
                                          String xpath)
        Concatenate nodes for xpath
        Parameters:
        itemXml -
        xpath -
        Returns: