Search in sources :

Example 1 with Address

use of net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo.Address in project arctic-sea by 52North.

the class SensorMLEncoderV101Test method checkResponsibleParty.

private void checkResponsibleParty(final SmlResponsibleParty responsibleParty, final ResponsibleParty xbResponsibleParty) {
    assertThat(xbResponsibleParty.getIndividualName(), is(responsibleParty.getIndividualName()));
    assertThat(xbResponsibleParty.getOrganizationName(), is(responsibleParty.getOrganizationName()));
    assertThat(xbResponsibleParty.getPositionName(), is(responsibleParty.getPositionName()));
    final ContactInfo xbContactInfo = xbResponsibleParty.getContactInfo();
    assertThat(xbContactInfo.getContactInstructions(), is(responsibleParty.getContactInstructions()));
    assertThat(xbContactInfo.getHoursOfService(), is(responsibleParty.getHoursOfService()));
    assertThat(xbContactInfo.getOnlineResourceArray(0).getHref(), is(responsibleParty.getOnlineResources().get(0)));
    final Phone xbPhone = xbContactInfo.getPhone();
    assertThat(xbPhone.getVoiceArray(0), is(responsibleParty.getPhoneVoice().get(0)));
    assertThat(xbPhone.getFacsimileArray(0), is(responsibleParty.getPhoneFax().get(0)));
    final Address xbAddress = xbContactInfo.getAddress();
    assertThat(xbAddress.getAdministrativeArea(), is(responsibleParty.getAdministrativeArea()));
    assertThat(xbAddress.getCity(), is(responsibleParty.getCity()));
    assertThat(xbAddress.getCountry(), is(responsibleParty.getCountry()));
    assertThat(xbAddress.getElectronicMailAddress(), is(responsibleParty.getEmail()));
    assertThat(xbAddress.getDeliveryPointArray(0), is(responsibleParty.getDeliveryPoint().get(0)));
    assertThat(xbAddress.getPostalCode(), is(responsibleParty.getPostalCode()));
}
Also used : Address(net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo.Address) Phone(net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo.Phone) ContactInfo(net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo)

Example 2 with Address

use of net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo.Address in project arctic-sea by 52North.

the class SensorMLEncoderV101Test method setResponsiblePartyValues.

private void setResponsiblePartyValues(final SmlResponsibleParty rp1, final ResponsibleParty xbRP1) {
    xbRP1.setIndividualName(rp1.getIndividualName());
    xbRP1.setOrganizationName(rp1.getOrganizationName());
    xbRP1.setPositionName(rp1.getPositionName());
    final ContactInfo xbContactInfo = xbRP1.addNewContactInfo();
    xbContactInfo.setContactInstructions(rp1.getContactInstructions());
    xbContactInfo.setHoursOfService(rp1.getHoursOfService());
    xbContactInfo.addNewOnlineResource().setHref(rp1.getOnlineResources().get(0));
    final Address xbAddress = xbContactInfo.addNewAddress();
    xbAddress.setAdministrativeArea(rp1.getAdministrativeArea());
    xbAddress.setCity(rp1.getCity());
    xbAddress.setCountry(rp1.getCountry());
    xbAddress.addNewDeliveryPoint().setStringValue(rp1.getDeliveryPoint().get(0));
    xbAddress.setElectronicMailAddress(rp1.getEmail());
    xbAddress.setPostalCode(rp1.getPostalCode());
    final Phone xbPhone = xbContactInfo.addNewPhone();
    xbPhone.addNewFacsimile().setStringValue(rp1.getPhoneFax().get(0));
    xbPhone.addNewVoice().setStringValue(rp1.getPhoneVoice().get(0));
}
Also used : Address(net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo.Address) Phone(net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo.Phone) ContactInfo(net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo)

Aggregations

ContactInfo (net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo)2 Address (net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo.Address)2 Phone (net.opengis.sensorML.x101.ContactInfoDocument.ContactInfo.Phone)2