protected void encodeTimeString(DateTime time, TimeFormat format) throws XMLStreamException, EncodingException { chars(DateTimeHelper.formatDateTime2String(time, format)); }
protected void encodeTimeString(DateTime time, TimeFormat format) throws XMLStreamException, EncodingException { chars(DateTimeHelper.formatDateTime2String(time, format)); }
protected void encodeString(QName qn, String v) throws XMLStreamException { start(qn); chars(v); endInline(qn); }
protected void encodeString(QName qn, String v) throws XMLStreamException { start(qn); chars(v); endInline(qn); }
private void encodeChange(EReportingChange v) throws XMLStreamException { start(AqdConstants.QN_AQD_CHANGE); chars(Boolean.toString(v.isChange())); endInline(AqdConstants.QN_AQD_CHANGE); if (v.getDescription().isPresent()) { start(AqdConstants.QN_AQD_CHANGE_DESCRIPTION); chars(v.getDescription().get()); endInline(AqdConstants.QN_AQD_CHANGE_DESCRIPTION); } }
private void encodeChange(EReportingChange v) throws XMLStreamException { start(AqdConstants.QN_AQD_CHANGE); chars(Boolean.toString(v.isChange())); endInline(AqdConstants.QN_AQD_CHANGE); if (v.getDescription().isPresent()) { start(AqdConstants.QN_AQD_CHANGE_DESCRIPTION); chars(v.getDescription().get()); endInline(AqdConstants.QN_AQD_CHANGE_DESCRIPTION); } }
protected void encodeNillableString(QName qn, Nillable<?> v) throws XMLStreamException { if (!v.isAbsent()) { if (v.isNil()) { empty(qn); encodeNilAttr(v.getNilReason()); } else { start(qn); chars(v.get().toString()); endInline(qn); } } }
protected void encodeNillableString(QName qn, Nillable<?> v) throws XMLStreamException { if (!v.isAbsent()) { if (v.isNil()) { empty(qn); encodeNilAttr(v.getNilReason()); } else { start(qn); chars(v.get().toString()); endInline(qn); } } }
protected void encodeNillableCodeType(QName qn, Nillable<CodeType> v) throws XMLStreamException { if (!v.isAbsent()) { if (v.isNil()) { empty(qn); encodeNilAttr(v.getNilReason()); } else { start(qn); if (v.get().isSetCodeSpace()) { attr(AqdConstants.AN_CODE_SPACE, v.get().getCodeSpace().toString()); } chars(v.get().getValue()); endInline(qn); } } }
protected void encodeNillableCodeType(QName qn, Nillable<CodeType> v) throws XMLStreamException { if (!v.isAbsent()) { if (v.isNil()) { empty(qn); encodeNilAttr(v.getNilReason()); } else { start(qn); if (v.get().isSetCodeSpace()) { attr(AqdConstants.AN_CODE_SPACE, v.get().getCodeSpace().toString()); } chars(v.get().getValue()); endInline(qn); } } }
protected void encodeNillableFreeText(QName qn, Nillable<PT_FreeText> nillable) throws XMLStreamException { if (!nillable.isAbsent()) { if (nillable.isNil()) { empty(qn); encodeGCONilAttr(nillable); } else { for (LocalisedCharacterString lcs : nillable.get().getTextGroup()) { start(qn); start(GcoConstants.QN_GCO_CHARACTER_STRING); chars(lcs.getValue()); endInline(GcoConstants.QN_GCO_CHARACTER_STRING); end(qn); } } } }
protected void encodeNillableFreeText(QName qn, Nillable<PT_FreeText> nillable) throws XMLStreamException { if (!nillable.isAbsent()) { if (nillable.isNil()) { empty(qn); encodeGCONilAttr(nillable); } else { for (LocalisedCharacterString lcs : nillable.get().getTextGroup()) { start(qn); start(GcoConstants.QN_GCO_CHARACTER_STRING); chars(lcs.getValue()); endInline(GcoConstants.QN_GCO_CHARACTER_STRING); end(qn); } } } }
private void encodeAddress(AddressRepresentation v) throws XMLStreamException { start(AqdConstants.QN_AD_ADDRESS_REPRESENTATION); for (GeographicalName value : v.getAdminUnits()) { start(AqdConstants.QN_AD_ADMIN_UNIT); encodeGeographicalName(value); end(AqdConstants.QN_AD_ADMIN_UNIT); } for (String value : v.getLocatorDesignators()) { start(AqdConstants.QN_AD_LOCATOR_DESIGNATOR); chars(value); endInline(AqdConstants.QN_AD_LOCATOR_DESIGNATOR); } for (GeographicalName value : v.getLocatorNames()) { start(AqdConstants.QN_AD_LOCATOR_NAME); encodeGeographicalName(value); end(AqdConstants.QN_AD_LOCATOR_NAME); } for (Nillable<GeographicalName> value : v.getAddressAreas()) { encodeNillableGeographicalName(AqdConstants.QN_AD_ADDRESS_AREA, value); } for (Nillable<GeographicalName> value : v.getPostNames()) { encodeNillableGeographicalName(AqdConstants.QN_AD_POST_NAME, value); } encodeNillableString(AqdConstants.QN_AD_POST_CODE, v.getPostCode()); for (Nillable<GeographicalName> value : v.getThoroughfares()) { encodeNillableGeographicalName(AqdConstants.QN_AD_THOROUGHFARE, value); } encodeNillableReference(AqdConstants.QN_AD_ADDRESS_FEATURE, v.getAddressFeature()); end(AqdConstants.QN_AD_ADDRESS_REPRESENTATION); }
private void encodeAddress(AddressRepresentation v) throws XMLStreamException { start(AqdConstants.QN_AD_ADDRESS_REPRESENTATION); for (GeographicalName value : v.getAdminUnits()) { start(AqdConstants.QN_AD_ADMIN_UNIT); encodeGeographicalName(value); end(AqdConstants.QN_AD_ADMIN_UNIT); } for (String value : v.getLocatorDesignators()) { start(AqdConstants.QN_AD_LOCATOR_DESIGNATOR); chars(value); endInline(AqdConstants.QN_AD_LOCATOR_DESIGNATOR); } for (GeographicalName value : v.getLocatorNames()) { start(AqdConstants.QN_AD_LOCATOR_NAME); encodeGeographicalName(value); end(AqdConstants.QN_AD_LOCATOR_NAME); } for (Nillable<GeographicalName> value : v.getAddressAreas()) { encodeNillableGeographicalName(AqdConstants.QN_AD_ADDRESS_AREA, value); } for (Nillable<GeographicalName> value : v.getPostNames()) { encodeNillableGeographicalName(AqdConstants.QN_AD_POST_NAME, value); } encodeNillableString(AqdConstants.QN_AD_POST_CODE, v.getPostCode()); for (Nillable<GeographicalName> value : v.getThoroughfares()) { encodeNillableGeographicalName(AqdConstants.QN_AD_THOROUGHFARE, value); } encodeNillableReference(AqdConstants.QN_AD_ADDRESS_FEATURE, v.getAddressFeature()); end(AqdConstants.QN_AD_ADDRESS_REPRESENTATION); }