Search in sources :

Example 1 with SmlReferencedContact

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;
}
Also used : SmlReferencedContact(org.n52.shetland.ogc.sensorML.SmlReferencedContact) SmlContactList(org.n52.shetland.ogc.sensorML.SmlContactList) ContactList(net.opengis.sensorML.x101.ContactListDocument.ContactList) SmlContactList(org.n52.shetland.ogc.sensorML.SmlContactList) SmlContact(org.n52.shetland.ogc.sensorML.SmlContact)

Aggregations

ContactList (net.opengis.sensorML.x101.ContactListDocument.ContactList)1 SmlContact (org.n52.shetland.ogc.sensorML.SmlContact)1 SmlContactList (org.n52.shetland.ogc.sensorML.SmlContactList)1 SmlReferencedContact (org.n52.shetland.ogc.sensorML.SmlReferencedContact)1