code: public static void main(String[] args){
  		PDBDomainProvider dom = new PDBDomainProvider();
  		String name;
  		name = "2CDG";
  
  		SortedSet<String> domains = dom.getDomainNames(name);
  
  		System.out.println("Domains for "+name+":");
  		for(String s : domains) {
  			System.out.println(s);
  		}
  
  		SortedSet<String> reprs = dom.getRepresentativeDomains();
  		System.out.format("%nFound %d clusters.%n",reprs.size());
  
  		try {
  			File outfile  = new File("/Users/blivens/Downloads/representativeDomainsJava.xml");
  			Writer out = new BufferedWriter(new FileWriter(outfile));
  
  			for(String repr : reprs) {
  				out.write(String.format("  <representative name=\"%s\"/>%n", repr));
  			}
  			out.close();
  		} catch (IOException e) {
  			e.printStackTrace();
  		}
  
  	}
docs: TODO Add methods to access http://www.rcsb.org/pdb/rest/representatives