@Override
	public List<Object> getAll(String type){
		try {
			db.start();
			DBCollection collection = db.getDB().getCollection("nonmoves");
			
			XStream xStream = new XStream();
			
			DBCursor cursor = collection.find();
	
			if (cursor == null)
				return null;
			
			List<Object> commands = new ArrayList<Object>();
			
			while(cursor.hasNext()) {
				DBObject obj = cursor.next();
				String xml = (String)obj.get(type);
				if (xml != null)
					commands.add((Object) xStream.fromXML(xml));
			}
			
			
			db.stop(true);
			
			return commands;
		}
		catch(Exception e) {
			e.printStackTrace();
			return null;
		}
	}