org.sakaiproject.tool.assessment.qti.asi
Class ASIBaseClass

java.lang.Object
  extended byorg.sakaiproject.tool.assessment.qti.util.XmlStringBuffer
      extended byorg.sakaiproject.tool.assessment.qti.asi.ASIBaseClass
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Assessment, Item, Section

public abstract class ASIBaseClass
extends XmlStringBuffer

Copyright: Copyright (c) 2004

Organization: Sakai Project

Version:
$Id: ASIBaseClass.java 1726 2005-09-14 23:55:18Z esmiley@stanford.edu $
Author:
rshastri, Ed Smiley esmiley@stanford.edu
See Also:
Serialized Form

Constructor Summary
protected ASIBaseClass()
          Creates a new ASIBaseClass object.
protected ASIBaseClass(Document document)
          Creates a new ASIBaseClass object.
protected ASIBaseClass(String xml)
          Creates a new ASIBaseClass object.
 
Method Summary
protected  void createFieldentry(String xpath, String fieldlabel)
           
static String escapeXml(String s)
          Simple wrapper over commons lang util method, but we may add additional logic in the future for special QTI export purposes.
protected  String extractString(String tagName)
          extract string for tag
protected  List getAllSections(String basePath)
           
protected  String getFieldentry(String xpath)
          DOCUMENTATION PENDING
 String getIdString()
           
protected  List getNumOfSections(String basePath, int selectNumber)
           
protected  List processSelectElement(String basePath, Element selectElement)
           
protected  void removeSections(String basePath)
           
protected  ArrayList selectSections(String basePath)
           
protected  void setFieldentry(String xpath, String value)
          Set field entry.
 void setIdString(String idString)
           
protected  void wrappingMattext()
           
 
Methods inherited from class org.sakaiproject.tool.assessment.qti.util.XmlStringBuffer
add, addAttribute, addElement, addJDOMElement, clear, getDocument, insertElement, isEmpty, removeElement, replace, selectNodes, selectSingleValue, stringValue, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASIBaseClass

protected ASIBaseClass()
Creates a new ASIBaseClass object.


ASIBaseClass

protected ASIBaseClass(String xml)
Creates a new ASIBaseClass object.

Parameters:
xml - XML string

ASIBaseClass

protected ASIBaseClass(Document document)
Creates a new ASIBaseClass object.

Parameters:
document - Document
Method Detail

extractString

protected String extractString(String tagName)
                        throws ParserConfigurationException,
                               SAXException,
                               IOException,
                               DOMException
extract string for tag

Parameters:
tagName - name of tag
Returns:
a String
Throws:
ParserConfigurationException
SAXException
IOException
DOMException

escapeXml

public static String escapeXml(String s)
Simple wrapper over commons lang util method, but we may add additional logic in the future for special QTI export purposes.

Parameters:
s -
Returns:
escaped string e.g. < ËÉrnesen & Jones > becomes <Ӑrnesen & Jones >

getFieldentry

protected String getFieldentry(String xpath)
DOCUMENTATION PENDING

Parameters:
xpath - DOCUMENTATION PENDING
Returns:
DOCUMENTATION PENDING

setFieldentry

protected void setFieldentry(String xpath,
                             String value)
Set field entry.

Parameters:
xpath -

createFieldentry

protected void createFieldentry(String xpath,
                                String fieldlabel)
Parameters:
xpath -
fieldlabel -

getAllSections

protected List getAllSections(String basePath)
Parameters:
basePath -
Returns:

removeSections

protected void removeSections(String basePath)
Parameters:
basePath -

selectSections

protected ArrayList selectSections(String basePath)
Parameters:
basePath -
Returns:

processSelectElement

protected List processSelectElement(String basePath,
                                    Element selectElement)
Parameters:
basePath -
selectElement -
Returns:

getNumOfSections

protected List getNumOfSections(String basePath,
                                int selectNumber)
Parameters:
basePath -
selectNumber -
Returns:

wrappingMattext

protected void wrappingMattext()

getIdString

public String getIdString()

setIdString

public void setIdString(String idString)