Iterator book_itr = bookEle.getChildren();
while (book_itr.hasNext()) {
Object obj = book_itr.next();
if (obj instanceof OMElement) {
OMElement omElement = (OMElement) obj;
allBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
}
}
BookList availableBookList = new BookList(LibraryConstants.AVAILABLE_BOOK);
OMElement avaliableBooksEle =
element.getFirstChildWithName(new QName(LibraryConstants.AVAILABLE_BOOK));
if (avaliableBooksEle != null) {
Iterator available_book_itr = avaliableBooksEle.getChildren();
while (available_book_itr.hasNext()) {
Object obj = available_book_itr.next();
if (obj instanceof OMElement) {
OMElement omElement = (OMElement) obj;
availableBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
}
}
}
BookList lendBookList = new BookList(LibraryConstants.LEND_BOOK);
OMElement lendBooksEle =
element.getFirstChildWithName(new QName(LibraryConstants.LEND_BOOK));
if (lendBooksEle != null) {
Iterator lend_book_itr = lendBooksEle.getChildren();
while (lend_book_itr.hasNext()) {
Object obj = lend_book_itr.next();
if (obj instanceof OMElement) {
OMElement omElement = (OMElement) obj;
lendBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
}
}
}
UserList users = new UserList();
OMElement usersEle =
element.getFirstChildWithName(new QName(LibraryConstants.USER_LIST));
if (usersEle != null) {
Iterator usre_itr = usersEle.getChildren();
while (usre_itr.hasNext()) {
Object obj = usre_itr.next();
if (obj instanceof OMElement) {
OMElement omElement = (OMElement) obj;
users.addUser((User) BeanUtil.deserialize(User.class, omElement,
new DefaultObjectSupplier(), "user"));
}
}
}
if (fileFound) {