}
return ssn;
}
Person getPersonFromSiteServiceParticipation(SiteServiceParticipation ssp) {
Person personReturn = null;
JAXBContext jc = null;
InputStream zis = openXMLStream(hudXMLURL);
XMLStreamReader xmlr9 = null;
try {
// set up a StAX reader
xmlr9 = xmlif.createXMLStreamReader(zis);
} catch (Exception e) {
log.info("exception caught creating StAX stream " + e.toString());
}
BigInteger sspID = ssp.getSiteServiceParticipationID().getIDNum();
// Use StAX to get Person that possesses that ssp id
try {
jc = JAXBContext.newInstance(Person.class);
} catch (JAXBException e) {
log.info("JAXB Person.class context problem: " + e.toString());
}
try {
unmarshaller = jc.createUnmarshaller();
} catch (JAXBException e) {
log.info("Problem unmarshalling Person context: " + e.toString());
}
try {
while(xmlr9.hasNext()) {
//Get and check each Person with the right Head of Household ID
xmlr9.next();
if (xmlr9.isStartElement()) {
if (xmlr9.getLocalName().equals("Person")) {
xmlr9.require(XMLStreamConstants.START_ELEMENT, null, "Person");
JAXBElement<Person> personJAXB = unmarshaller.unmarshal(xmlr9, Person.class);
Person person = (Person)personJAXB.getValue();
//Get only the person with the same id as the head of household's id
for (SiteServiceParticipation ssp2 : person.getSiteServiceParticipation()) {
if (ssp2.getSiteServiceParticipationID().getIDNum().equals(sspID)) {
personReturn = person;
break;
}
}