use of org.n52.shetland.ogc.sensorML.SmlReferencedContact in project arctic-sea by 52North.
the class SensorMLDecoderV101 method parseContactListMembers.
private SmlContact parseContactListMembers(final ContactList contactList) {
SmlContactList smlContactList = new SmlContactList();
if (contactList.getMemberArray() != null && contactList.getMemberArray().length > 0) {
for (ContactList.Member member : contactList.getMemberArray()) {
SmlContact thisSmlContact = null;
if (member.getPerson() != null) {
thisSmlContact = parsePerson(member.getPerson());
} else if (member.getResponsibleParty() != null) {
thisSmlContact = parseResponsibleParty(member.getResponsibleParty());
} else if (member.isSetHref()) {
thisSmlContact = new SmlReferencedContact();
thisSmlContact.setHref(member.getHref());
if (member.isSetTitle()) {
thisSmlContact.setTitle(member.getTitle());
}
}
if (thisSmlContact != null) {
if (member.getRole() != null) {
thisSmlContact.setRole(member.getRole());
}
smlContactList.addMember(thisSmlContact);
}
}
}
return smlContactList;
}
Aggregations