private ArrayList<ContextItem> XMLToContext(String xml) {
		ArrayList<ContextItem> result = new ArrayList<ContextItem>();
		try {
			Document document = DocumentHelper.parseText(xml);
			Element caseElement = document.getRootElement();

			ArrayList<Element> contextElements = new ArrayList<Element>(caseElement.elements("context"));
			Iterator<Element> i = contextElements.iterator();
			while(i.hasNext()) {
				Element contextElement = i.next();
				String predicate = contextElement.elementText("predicate");
				String object = contextElement.elementText("object");
					
				if(predicate != null && object != null) {
					ContextItem newContextItem = new ContextItem();
					newContextItem.setObject(object);
					newContextItem.setPredicate(predicate);
					result.add(newContextItem);
				}
			}
		}catch (Exception e) {
			e.printStackTrace();
		}
		return result;
	}