private CollectionView getBean(NodeList nodelist) {

		CollectionView bean = new CollectionView();
		for (int counter = 0; counter < nodelist.getLength(); counter++) {
			Node parentNode = nodelist.item(counter);
			NodeList children = parentNode.getChildNodes();
			Node node = children.item(0);

			if (node == null)
				continue;

			String nodeName = parentNode.getNodeName();
			String nodeValue = node.getNodeValue();

			// check for Invalid data.
			if (XmlUtils.isInvalidData(nodeValue))
				continue;

			if (nodeName.equalsIgnoreCase(COLLECTIONID)) {
				if (XmlUtils.isNumeric(nodeValue))
					bean.setCollectionID(Integer.parseInt(nodeValue));
			} else if (nodeName.equalsIgnoreCase(NAME)) {
				bean.setName(nodeValue);
			} else if (nodeName.equalsIgnoreCase(DESCRIPTION)) {
				bean.setDescription(nodeValue);
			} else if (nodeName.equalsIgnoreCase(VIEW_ID)) {
				if (XmlUtils.isNumeric(nodeValue)) {
					bean.setViewID(Integer.parseInt(nodeValue));
					List<JobDetail> jobList = jobdetailService
							.getDataList(nodeValue);
					bean.setJobDetails(jobList);
				}
			}
		}
		return bean;
	}