OLINGO-1293 adding srid to property metadata

This commit is contained in:
shawkins 2018-09-24 13:11:00 -04:00
parent 8cbe468c2a
commit 4b77243d9e
2 changed files with 9 additions and 0 deletions

View File

@ -714,6 +714,10 @@ public class MetadataDocumentJsonSerializer {
if (property.getScale() != null) {
json.writeNumberField(SCALE, property.getScale());
}
if (property.getSrid() != null) {
json.writeStringField(SRID, "" + property.getSrid());
}
appendAnnotations(json, property, null);
json.writeEndObject();

View File

@ -96,6 +96,7 @@ public class MetadataDocumentXmlSerializer {
private static final String XML_PROPERTY_REF = "PropertyRef";
private static final String XML_KEY = "Key";
private static final String XML_SCALE = "Scale";
private static final String XML_SRID = "SRID";
private static final String XML_PRECISION = "Precision";
private static final String XML_MAX_LENGTH = "MaxLength";
private static final String XML_DEFAULT_VALUE = "DefaultValue";
@ -905,6 +906,10 @@ public class MetadataDocumentXmlSerializer {
if (property.getScale() != null) {
writer.writeAttribute(XML_SCALE, "" + property.getScale());
}
if (property.getSrid() != null) {
writer.writeAttribute(XML_SRID, "" + property.getSrid());
}
appendAnnotations(writer, property);
writer.writeEndElement();