|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.tomp.el.author.io.AuthorIO
public class AuthorIO
Constructor Summary | |
---|---|
AuthorIO()
|
Method Summary | |
---|---|
protected java.lang.String[] |
listCourseIds(CourseTree tree)
Browses the tree's directory and gets the IDs (= names of the courses' directories) of the courses. |
protected java.lang.String[] |
listLectureIds(Lectures lectures)
Browses the lectures' directories and gets the IDs of the lectures (= names of the lectures' files). |
protected java.lang.String[] |
listPracticeIds(Practices practices)
Browses the practices' directories and gets the IDs of the practices (= names of the practices' files). |
protected java.lang.String[] |
listProjectIds(Projects projects)
Browses the projects' directories and gets the IDs of the projects (= names of the projects' files). |
protected java.lang.String[] |
listTaskIds(Tasks tasks)
Browses the tasks' directories and gets the IDs of the tasks (= names of the tasks' files). |
Course |
loadCourse(CourseTree tree,
java.lang.String id)
Creates a new instance of Course, adds it to the CourseTree loads the lectures of the course. |
void |
loadCourses(CourseTree tree)
Loads all courses in the tree. |
CourseTree |
loadCourseTree(java.lang.String id)
Creates a new instance of CourseTree and loads the courses of the CourseTree. |
Lecture |
loadLecture(Course course,
java.lang.String id)
Loads a lecture of the course |
void |
loadLectures(Course course)
Loads lectures for a course. |
Practice |
loadPractice(Course course,
java.lang.String id)
Loads a practice of the course |
void |
loadPractices(Course course)
Loads practices for a course. |
Project |
loadProject(Course course,
java.lang.String id)
Loads a project of the course |
void |
loadProjects(Course course)
Loads projects for a course. |
Task |
loadTask(Course course,
java.lang.String id)
Loads a task of the course |
void |
loadTasks(Course course)
Loads tasks for a course. |
void |
saveCourse(Course course)
Builds up a new XML document for Course using DOM4J factory and saves it. |
void |
saveCourses(CourseTree tree)
Saves all courses in the tree. |
void |
saveCourseTree(CourseTree tree)
Saves the CourseTree |
void |
saveLecture(Lecture lecture)
Builds up a new XML document for lecture using DOM4J factory and saves it. |
void |
saveLectures(Course course)
Saves all lectures of the course. |
void |
savePractice(Practice t)
Builds up a new XML document for practice using DOM4J factory and saves it. |
void |
saveProject(Project t)
Builds up a new XML document for project using DOM4J factory and saves it. |
void |
saveTask(Task t)
Builds up a new XML document for task using DOM4J factory and saves it. |
void |
write(org.dom4j.Document doc,
java.io.File f)
Writes the XML document (e. g. of a lecture) to a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthorIO()
Method Detail |
---|
public CourseTree loadCourseTree(java.lang.String id) throws java.net.MalformedURLException, org.dom4j.DocumentException
id
- CourseTree ID
java.net.MalformedURLException
org.dom4j.DocumentException
public void saveCourseTree(CourseTree tree) throws java.net.MalformedURLException, org.dom4j.DocumentException
tree
- The CourseTree to be saved.
java.net.MalformedURLException
org.dom4j.DocumentException
public void loadCourses(CourseTree tree) throws java.net.MalformedURLException, org.dom4j.DocumentException
tree
- Courses from this tree will be loaded.
java.net.MalformedURLException
org.dom4j.DocumentException
public void saveCourses(CourseTree tree) throws java.io.UnsupportedEncodingException, org.dom4j.DocumentException, java.io.IOException
tree
- Courses from this tree will be saved
java.io.UnsupportedEncodingException
org.dom4j.DocumentException
java.io.IOException
public Course loadCourse(CourseTree tree, java.lang.String id) throws java.net.MalformedURLException, org.dom4j.DocumentException
tree
- Tree where the new Course will be loaded.id
- Course ID
java.net.MalformedURLException
org.dom4j.DocumentException
public void saveCourse(Course course) throws java.io.UnsupportedEncodingException, org.dom4j.DocumentException, java.io.IOException
course
- This course will be saved.
java.io.UnsupportedEncodingException
org.dom4j.DocumentException
java.io.IOException
public void loadLectures(Course course) throws java.net.MalformedURLException, org.dom4j.DocumentException
course
- Lectures from this course will be loaded.
java.net.MalformedURLException
org.dom4j.DocumentException
public void saveLectures(Course course) throws java.io.UnsupportedEncodingException, org.dom4j.DocumentException, java.io.IOException
course
- lectures from this course will be saved.
java.io.UnsupportedEncodingException
org.dom4j.DocumentException
java.io.IOException
public Lecture loadLecture(Course course, java.lang.String id) throws java.net.MalformedURLException, org.dom4j.DocumentException
course
- Lectures from this course will be loaded.id
- Lecture ID
java.net.MalformedURLException
org.dom4j.DocumentException
public void saveLecture(Lecture lecture) throws java.io.UnsupportedEncodingException, org.dom4j.DocumentException, java.io.IOException
lecture
- This lecture will be saved.
java.io.UnsupportedEncodingException
org.dom4j.DocumentException
java.io.IOException
public Task loadTask(Course course, java.lang.String id) throws java.net.MalformedURLException, org.dom4j.DocumentException
course
- Tasks from this course will be loaded.id
- Task ID
java.net.MalformedURLException
org.dom4j.DocumentException
public void loadTasks(Course course) throws java.net.MalformedURLException, org.dom4j.DocumentException
course
- Tasks from this course will be loaded.
java.net.MalformedURLException
org.dom4j.DocumentException
public void saveTask(Task t) throws java.io.UnsupportedEncodingException, org.dom4j.DocumentException, java.io.IOException
t
- This task will be saved.
java.io.UnsupportedEncodingException
org.dom4j.DocumentException
java.io.IOException
public Practice loadPractice(Course course, java.lang.String id) throws java.net.MalformedURLException, org.dom4j.DocumentException
course
- Practices from this course will be loaded.id
- Practice ID
java.net.MalformedURLException
org.dom4j.DocumentException
public void loadPractices(Course course) throws java.net.MalformedURLException, org.dom4j.DocumentException
course
- Practices from this course will be loaded.
java.net.MalformedURLException
org.dom4j.DocumentException
public void savePractice(Practice t) throws java.io.UnsupportedEncodingException, org.dom4j.DocumentException, java.io.IOException
t
- This practice will be saved.
java.io.UnsupportedEncodingException
org.dom4j.DocumentException
java.io.IOException
public Project loadProject(Course course, java.lang.String id) throws java.net.MalformedURLException, org.dom4j.DocumentException
course
- Projects from this course will be loaded.id
- Project ID
java.net.MalformedURLException
org.dom4j.DocumentException
public void loadProjects(Course course) throws java.net.MalformedURLException, org.dom4j.DocumentException
course
- Projects from this course will be loaded.
java.net.MalformedURLException
org.dom4j.DocumentException
public void saveProject(Project t) throws java.io.UnsupportedEncodingException, org.dom4j.DocumentException, java.io.IOException
t
- This project will be saved.
java.io.UnsupportedEncodingException
org.dom4j.DocumentException
java.io.IOException
protected java.lang.String[] listCourseIds(CourseTree tree)
tree
- This tree (courses' directories) will be browsed.
protected java.lang.String[] listLectureIds(Lectures lectures)
lectures
- These lectures will be browsed.
protected java.lang.String[] listTaskIds(Tasks tasks)
tasks
- These tasks will be browsed.
protected java.lang.String[] listPracticeIds(Practices practices)
practices
- These practices will be browsed.
protected java.lang.String[] listProjectIds(Projects projects)
projects
- These projects will be browsed.
public void write(org.dom4j.Document doc, java.io.File f) throws org.dom4j.DocumentException, java.io.UnsupportedEncodingException, java.io.IOException
doc
- The generated XML document which will
be saved.f
- The names of the file to save do XML document to.
org.dom4j.DocumentException
java.io.UnsupportedEncodingException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |