def addDataToKnowledgeInstance(root): kdmanager = KnowledgeDomainManager() domain = kdmanager.getDomain() usrmanager = UserManager() userBox = usrmanager.getUserBoxForUser("jonathan") domain.dataSourceManager.addToKnowledgeInstance(userBox, None, domain) return "<success></success>"
def getKnowledgeInstanceForUser(root): usrmanager = UserManager() userBox = usrmanager.getUserBoxForUser("jonathan") return userBox.knowledgeInstance.asXML()
def resetKnowledgeInstanceForUser(root): usrmanager = UserManager() userBox = usrmanager.getUserBoxForUser("jonathan") userBox.resetKnowledgeInstance() return "<success></success>"