private void setupSubjects(List<SubjectType> subjects)
			throws ParsingException {
		// make sure that there is at least one Subject
		if (subjects.size() == 0)
			throw new ParsingException("Request must a contain subject");

		// now go through the subject attributes
		for (SubjectType subject : subjects) {
			String category = subject.getSubjectCategory();
			Map<String, Set<AttributeType>> categoryMap = null;

			// see if we've already got a map for the category
			if (subjectMap.containsKey(category)) {
				categoryMap = subjectMap.get(category);
			} else {
				categoryMap = new HashMap();
				subjectMap.put(category, categoryMap);
			}

			// iterate over the set of attributes
			List<AttributeType> subjectAttributes = subject.getAttribute();

			for (AttributeType attr : subjectAttributes) {
				String id = attr.getAttributeId();

				if (categoryMap.containsKey(id)) {
					// add to the existing set of Attributes w/this id
					Set<AttributeType> attributes = categoryMap.get(id);
					attributes.add(attr);
				} else {
					// this is the first Attr w/this id
					Set<AttributeType> attributes = new HashSet<AttributeType>();
					attributes.add(attr);
					categoryMap.put(id, attributes);
				}
			}
		}
	}