|
||||||||||
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). |
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. |
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 |
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 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
protected java.lang.String[] listCourseIds(CourseTree tree)
tree
- This tree (courses' directories) will be browsed.
protected java.lang.String[] listLectureIds(Lectures lectures)
lectures
- This lectures 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 |