use of eu.europa.ec.inspire.schemas.base2.x20.RelatedPartyType in project arctic-sea by 52North.
the class RelatedPartyTypeDecoder method parseContact.
private Contact parseContact(RelatedPartyType rpt) throws DecodingException {
ContactType ct = rpt.getContact().getContact();
Contact contact = new Contact();
contact.setAddress(parseAddress(ct));
contact.setContactInstructions(parseContactInstructions(ct));
contact.setElectronicMailAddress(parseElectronicMailAddress(ct));
contact.setTelephoneFacsimile(parseTelephoneFacsimile(ct));
contact.setTelephoneVoice(parseTelephoneVoice(ct));
contact.setWebsite(parseWebsite(ct));
return contact;
}
use of eu.europa.ec.inspire.schemas.base2.x20.RelatedPartyType in project arctic-sea by 52North.
the class RelatedPartyTypeDecoder method decode.
@Override
public RelatedParty decode(XmlObject xmlObject) throws DecodingException {
if (xmlObject instanceof RelatedPartyType) {
RelatedPartyType rpt = (RelatedPartyType) xmlObject;
RelatedParty relatedParty = new RelatedParty();
relatedParty.setContact(parseContact(rpt));
relatedParty.setIndividualName((PT_FreeText) decodeXmlElement(rpt.getIndividualName()));
relatedParty.setOrganisationName((PT_FreeText) decodeXmlElement(rpt.getOrganisationName()));
relatedParty.setPositionName((PT_FreeText) decodeXmlElement(rpt.getPositionName()));
relatedParty.setRoles(parseRole(rpt));
return relatedParty;
}
throw new UnsupportedDecoderInputException(this, xmlObject);
}
use of eu.europa.ec.inspire.schemas.base2.x20.RelatedPartyType in project arctic-sea by 52North.
the class RelatedPartyTypeEncoder method createRelatedParty.
private XmlObject createRelatedParty(RelatedParty relatedParty) throws EncodingException {
RelatedPartyType rpt = RelatedPartyType.Factory.newInstance();
addContact(rpt, relatedParty);
addIndividualName(rpt, relatedParty);
addOrganisationName(rpt, relatedParty);
addPositionName(rpt, relatedParty);
addRole(rpt, relatedParty);
return rpt;
}
Aggregations