| java.lang.Object org.sakaiproject.tool.assessment.qti.helper.AuthoringXml
AuthoringXml | public class AuthoringXml (Code) | | Utility to load XML templates from Sprint context or local file system.
Copyright: Copyright (c) 2005 Sakai
author: Ed Smiley esmiley@stanford.edu version: $Id: AuthoringXml.java 9274 2006-05-10 22:50:48Z daisyf@stanford.edu $ |
SURVEY_AVERAGE | final public static String SURVEY_AVERAGE(Code) | | |
SURVEY_EXCELLENT | final public static String SURVEY_EXCELLENT(Code) | | |
SURVEY_STRONGLY | final public static String SURVEY_STRONGLY(Code) | | |
SURVEY_UNDECIDED | final public static String SURVEY_UNDECIDED(Code) | | |
validTemplates | public Map validTemplates(Code) | | |
AuthoringXml | public AuthoringXml(int qtiVersion)(Code) | | |
addAttribute | public Document addAttribute(Document document, String elementXpath, String attributeName)(Code) | | Based on method in XmlStringBuffer
author: rpembry author: casong changed XmlStringBuffer to be org.w3c.dom compliance, author: Ed Smiley esmiley@stanford.edu changed method signatures used Document Parameters: document - Document Parameters: elementXpath - Parameters: attributeName - modified Document |
addElement | public Document addElement(Document document, String parentXpath, Element element)(Code) | | Based on method in XmlStringBuffer
author: rpembry author: casong changed XmlStringBuffer to be org.w3c.dom compliance, author: Ed Smiley esmiley@stanford.edu changed method signatures used Document Parameters: document - Document Parameters: parentXpath - Parameters: element - modified Document |
getQtiVersion | public int getQtiVersion()(Code) | | |
getTemplateAsString | public String getTemplateAsString(InputStream templateStream)(Code) | | get a template as a string from its input stream
Parameters: templateName - the xml string |
getTemplateInputStream | public InputStream getTemplateInputStream(String templateName)(Code) | | get template as stream using spring's ClassPathResource
Parameters: templateName - Parameters: context - |
isAssessment | public boolean isAssessment(String documentType)(Code) | | |
isSection | public boolean isSection(String documentType)(Code) | | |
isSurveyFragment | public boolean isSurveyFragment(String documentType)(Code) | | |
readDocumentFromString | public static Document readDocumentFromString(String in)(Code) | | Read a DOM Document from xml in a string.
Parameters: in - The string containing the XML A new DOM Document with the xml contents. |
readXMLDocument | public Document readXMLDocument(InputStream inputStream)(Code) | | read in XML document from input stream
Parameters: inputStream - source for XML document the Document |
selectNodes | final public List selectNodes(Document document, String xpath)(Code) | | Based on method in XmlStringBuffer
author: rpembry author: casong changed XmlStringBuffer to be org.w3c.dom compliance, author: Ed Smiley esmiley@stanford.edu changed method signatures used Document a List of Nodes |
setQtiVersion | public void setQtiVersion(int qtiVersion)(Code) | | |
update | public Document update(Document document, String xpath, Element element)(Code) | | Based on method in XmlStringBuffer
author: rpembry author: casong changed XmlStringBuffer to be org.w3c.dom compliance, author: Ed Smiley esmiley@stanford.edu changed method signatures used Document Parameters: document - Document Parameters: xpath - Parameters: element - modified Document |
update | public Document update(Document document, String xpath, String value) throws DOMException, Exception(Code) | | perform Update on this object
Based on method originally in XmlStringBuffer
author: rashmi author: casong author: Ed Smiley esmiley@stanford.edu changed method signatures used Document Parameters: document - Document Parameters: xpath - :- xpath and Parameters: value - :- Value of xpath modified Document throws: DOMException - DOCUMENTATION PENDING throws: Exception - DOCUMENTATION PENDING |
valid | public boolean valid(String s)(Code) | | test that a String is a valid template key
Parameters: s - a key true if it is a valid key |
|
|