// Path: src/main/java/org/votesmart/data/Branches.java
// @XmlRootElement(name="branches")
// public class Branches extends GeneralInfoBase {
// 	
// 	public ArrayList<Branch> branch;
// 	
// 	@XmlType(name="branch", namespace="branches")
// 	public static class Branch {
// 		public String officeBranchId;
// 		public String name;
// 	}
// 
// }
// 
// Path: src/main/java/org/votesmart/data/Levels.java
// @XmlRootElement(name="levels")
// public class Levels extends GeneralInfoBase {
// 
// 	public ArrayList<Level> level;
// 	
// 	@XmlType(name="level", namespace="levels")
// 	public static class Level {
// 		public String officeLevelId;
// 		public String name;
// 	}
// 
// }
// 
// Path: src/main/java/org/votesmart/data/OfficeTypes.java
// @XmlRootElement(name="officeTypes")
// public class OfficeTypes extends GeneralInfoBase {
// 	public ArrayList<Type> type;
// 	
// 	@XmlType(name="type", namespace="office")
// 	public static class Type {
// 		public String officeTypeId;
// 		public String officeLevelId;
// 		public String officeBranchId;
// 		public String name;
// 	}
// }
// 
// Path: src/main/java/org/votesmart/data/Offices.java
// @XmlRootElement(name="offices")
// public class Offices extends GeneralInfoBase {
// 	public ArrayList<Office> office;
// 	
// 	@XmlType(name="office", namespace="offices")
// 	public static class Office {
// 		public String officeId;
// 		public String officeTypeId;
// 		public String officeLevelId;
// 		public String officeBranchId;
// 		public String name;
// 		public String title;
// 		public String shortTitle;		
// 	}
// 
// }


import org.votesmart.api.*;
import org.votesmart.data.Branches;
import org.votesmart.data.Levels;
import org.votesmart.data.OfficeTypes;
import org.votesmart.data.Offices;

package org.votesmart.classes;


/**
 * <pre>
 * Office Class
 * 
 * Office.getTypes
 * This method dumps all office types we keep track of
 * Input: none
 * Output: {@link OfficeTypes} 
 * 
 * Office.getBranches
 * This method dumps the branches of government and their IDs
 * Input: none
 * Output: {@link Branches}
 * 
 * Office.getLevels
 * This method dumps the levels of government and their IDs
 * Input: none
 * Output: {@link Levels}
 * 
 * Office.getOfficesByType
 * This method dumps offices we keep track of according to type.
 * Input: officeTypeId*
 * Output: {@link Offices}
 * 
 * Office.getOfficesByLevel
 * This method dumps offices we keep track of according to level.
 * Input: levelId*
 * Output: {@link Offices}
 * 
 * Office.getOfficesByTypeLevel
 * This method dumps offices we keep track of according to type and level.
 * Input: officeTypeId*, levelId*
 * Output: {@link Offices}
 * 
 * Office.getOfficesByBranchLevel
 * This method dumps offices we keep track of according to branch and level.
 * Input: branchId*, levelId*
 * Output: {@link Offices}
 * 
 * ============== EXAMPLE USAGE ============
 * 
 * // Get general Information about offices
 * OfficeClass officeClass = new OfficeClass();
 * 
 * // get Office.getBranches
 * Branches branches = officeClass.getBranches();
 * Branches.Branch officeBranch = branches.branch.get(1);
 * 
 * // Office.getTypes
 * OfficeTypes officeTypes = officeClass.getTypes();
 * OfficeTypes.Type officeType  = officeTypes.type.get(5);
 * 
 * // Office.getLevels
 * Levels levels = officeClass.getLevels();
 * Levels.Level officeLevel = levels.level.get(1);
 * </pre>
 *  
 */
public class OfficeClass extends ClassesBase {

	/**
	 * Constructor for testing purposes.
	 * 
	 * @param api
	 */
	public OfficeClass(VoteSmartAPI api) {
		super(api);
	}
	
	/**
	 * Default Constructor
	 */
	public OfficeClass() throws VoteSmartException {
		super();
	}
	
	/**
	 * This method dumps all office types we keep track of.
	 * 
	 * @return {@link OfficeTypes}: 
	 */
	public OfficeTypes getTypes() throws VoteSmartException, VoteSmartErrorException {
		return api.query("Office.getTypes", null, OfficeTypes.class );
	}

	/**
	 * This method dumps the branches of government and their IDs.
	 * 
	 * @return {@link Branches}: 
	 */
	public Branches getBranches() throws VoteSmartException, VoteSmartErrorException {
		return api.query("Office.getBranches", null, Branches.class );
	}
	
	/**
	 * This method dumps the levels of government and their IDs.
	 * 
	 * @return {@link Levels}: 
	 */
	public Levels getLevels() throws VoteSmartException, VoteSmartErrorException {

// Path: src/main/java/org/votesmart/data/Branches.java
// @XmlRootElement(name="branches")
// public class Branches extends GeneralInfoBase {
// 	
// 	public ArrayList<Branch> branch;
// 	
// 	@XmlType(name="branch", namespace="branches")
// 	public static class Branch {
// 		public String officeBranchId;
// 		public String name;
// 	}
// 
// }
// 
// Path: src/main/java/org/votesmart/data/Levels.java
// @XmlRootElement(name="levels")
// public class Levels extends GeneralInfoBase {
// 
// 	public ArrayList<Level> level;
// 	
// 	@XmlType(name="level", namespace="levels")
// 	public static class Level {
// 		public String officeLevelId;
// 		public String name;
// 	}
// 
// }
// 
// Path: src/main/java/org/votesmart/data/OfficeTypes.java
// @XmlRootElement(name="officeTypes")
// public class OfficeTypes extends GeneralInfoBase {
// 	public ArrayList<Type> type;
// 	
// 	@XmlType(name="type", namespace="office")
// 	public static class Type {
// 		public String officeTypeId;
// 		public String officeLevelId;
// 		public String officeBranchId;
// 		public String name;
// 	}
// }
// 
// Path: src/main/java/org/votesmart/data/Offices.java
// @XmlRootElement(name="offices")
// public class Offices extends GeneralInfoBase {
// 	public ArrayList<Office> office;
// 	
// 	@XmlType(name="office", namespace="offices")
// 	public static class Office {
// 		public String officeId;
// 		public String officeTypeId;
// 		public String officeLevelId;
// 		public String officeBranchId;
// 		public String name;
// 		public String title;
// 		public String shortTitle;		
// 	}
// 
// }


// Path: src/main/java/org/votesmart/classes/OfficeClass.java
import org.votesmart.api.*;
import org.votesmart.data.Branches;
import org.votesmart.data.Levels;
import org.votesmart.data.OfficeTypes;
import org.votesmart.data.Offices;

package org.votesmart.classes;


/**
 * <pre>
 * Office Class
 * 
 * Office.getTypes
 * This method dumps all office types we keep track of
 * Input: none
 * Output: {@link OfficeTypes} 
 * 
 * Office.getBranches
 * This method dumps the branches of government and their IDs
 * Input: none
 * Output: {@link Branches}
 * 
 * Office.getLevels
 * This method dumps the levels of government and their IDs
 * Input: none
 * Output: {@link Levels}
 * 
 * Office.getOfficesByType
 * This method dumps offices we keep track of according to type.
 * Input: officeTypeId*
 * Output: {@link Offices}
 * 
 * Office.getOfficesByLevel
 * This method dumps offices we keep track of according to level.
 * Input: levelId*
 * Output: {@link Offices}
 * 
 * Office.getOfficesByTypeLevel
 * This method dumps offices we keep track of according to type and level.
 * Input: officeTypeId*, levelId*
 * Output: {@link Offices}
 * 
 * Office.getOfficesByBranchLevel
 * This method dumps offices we keep track of according to branch and level.
 * Input: branchId*, levelId*
 * Output: {@link Offices}
 * 
 * ============== EXAMPLE USAGE ============
 * 
 * // Get general Information about offices
 * OfficeClass officeClass = new OfficeClass();
 * 
 * // get Office.getBranches
 * Branches branches = officeClass.getBranches();
 * Branches.Branch officeBranch = branches.branch.get(1);
 * 
 * // Office.getTypes
 * OfficeTypes officeTypes = officeClass.getTypes();
 * OfficeTypes.Type officeType  = officeTypes.type.get(5);
 * 
 * // Office.getLevels
 * Levels levels = officeClass.getLevels();
 * Levels.Level officeLevel = levels.level.get(1);
 * </pre>
 *  
 */
public class OfficeClass extends ClassesBase {

	/**
	 * Constructor for testing purposes.
	 * 
	 * @param api
	 */
	public OfficeClass(VoteSmartAPI api) {
		super(api);
	}
	
	/**
	 * Default Constructor
	 */
	public OfficeClass() throws VoteSmartException {
		super();
	}
	
	/**
	 * This method dumps all office types we keep track of.
	 * 
	 * @return {@link OfficeTypes}: 
	 */
	public OfficeTypes getTypes() throws VoteSmartException, VoteSmartErrorException {
		return api.query("Office.getTypes", null, OfficeTypes.class );
	}

	/**
	 * This method dumps the branches of government and their IDs.
	 * 
	 * @return {@link Branches}: 
	 */
	public Branches getBranches() throws VoteSmartException, VoteSmartErrorException {
		return api.query("Office.getBranches", null, Branches.class );
	}
	
	/**
	 * This method dumps the levels of government and their IDs.
	 * 
	 * @return {@link Levels}: 
	 */
	public Levels getLevels() throws VoteSmartException, VoteSmartErrorException {

		return api.query("Office.getLevels", null, Levels.class );
