private void writeSrsName(final XMLStreamWriter writer, final Geospatial value) throws XMLStreamException { if (value.getSrid() != null && value.getSrid().isNotDefault()) { writer.writeAttribute(Constants.PREFIX_GML, Constants.NS_GML, Constants.ATTR_SRSNAME, Constants.SRS_URLPREFIX + value.getSrid().toString()); } }
@Override public SRID getSrid() { if (srid != null) return SRID.valueOf(srid); else return null; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final ComposedGeospatial<?> other = (ComposedGeospatial<?>) o; return dimension == other.dimension && (srid == null ? other.srid == null : srid.equals(other.srid)) && geospatials.equals(other.geospatials); }
/** * Constructor. * * @param dimension dimension * @param type type * @param srid SRID */ protected Geospatial(final Dimension dimension, final Type type, final SRID srid) { this.dimension = dimension; this.type = type; this.srid = srid == null ? new SRID() : srid; this.srid.setDimension(dimension); }
SRID getSRID() { SRID result = null; if (jpaAttribute.getJavaMember() instanceof AnnotatedElement) { final AnnotatedElement annotatedElement = (AnnotatedElement) jpaAttribute.getJavaMember(); final EdmGeospatial spatialDetails = annotatedElement.getAnnotation(EdmGeospatial.class); if (spatialDetails != null) { final String srid = spatialDetails.srid(); if (srid.isEmpty()) result = SRID.valueOf(null); else result = SRID.valueOf(srid); result.setDimension(spatialDetails.dimension()); } } return result; }
@Override public CsdlTypeDefinition setSrid(SRID srid) { this.srid = srid.toString(); return this; }
if (geoValue.getSrid() != null && geoValue.getSrid().isNotDefault() && (parentSrid == null || !parentSrid.equals(geoValue.getSrid()))) { srid(json, geoValue.getSrid());
throw new EdmPrimitiveTypeException("The value type " + geoValue.getClass() + " is not supported."); if (geoValue.getSrid() != null && geoValue.getSrid().isNotDefault()) { throw new SerializerException("Non-standard SRID not supported!", SerializerException.MessageKeys.WRONG_PROPERTY_VALUE, name, geoValue.toString());
@Override public SRID getSrid() { if (jpaParameter.srid() != null && !jpaParameter.srid().srid().isEmpty()) { final SRID srid = SRID.valueOf(jpaParameter.srid().srid()); srid.setDimension(jpaParameter.srid().dimension()); return srid; } else return null; } }
@Override public String toString() { return (dimension == null ? "" : dimension.name()) + '\'' + (srid == null ? "" : "SRID=" + srid.toString() + ';') + "Point(" + x + ' ' + y + ")'"; } }
if (value.getSrid() != null && value.getSrid().isNotDefault()) { srid(jgen, value.getSrid());
/** * Constructor. * * @param dimension dimension * @param type type * @param srid SRID */ protected Geospatial(final Dimension dimension, final Type type, final SRID srid) { this.dimension = dimension; this.type = type; this.srid = srid == null ? new SRID() : srid; this.srid.setDimension(dimension); }
@JsonSetter void setSrid(String srid) { if (srid != null) this.srid = SRID.valueOf(srid); else this.srid = null; } }
private void writeSrsName(final XMLStreamWriter writer, final Geospatial value) throws XMLStreamException { if (value.getSrid() != null && value.getSrid().isNotDefault()) { writer.writeAttribute(Constants.PREFIX_GML, Constants.NS_GML, Constants.ATTR_SRSNAME, Constants.SRS_URLPREFIX + value.getSrid().toString()); } }
edmResultType.setScale(definedReturnType.scale()); if (definedReturnType.srid() != null && !definedReturnType.srid().srid().isEmpty()) { final SRID srid = SRID.valueOf(definedReturnType.srid().srid()); srid.setDimension(definedReturnType.srid().dimension()); edmResultType.setSrid(srid);
@Override public String toString() { return (dimension == null ? "" : dimension.name()) + '\'' + (srid == null ? "" : "SRID=" + srid.toString() + ';') + "Point(" + x + ' ' + y + ")'"; } }
if (value.getSrid() != null && value.getSrid().isNotDefault()) { srid(jgen, value.getSrid());
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final Point point = (Point) o; return dimension == point.dimension && (srid == null ? point.srid == null : srid.equals(point.srid)) && x == point.x && y == point.y && z == point.z; }
@JsonSetter void setSrid(String srid) { if (srid != null) this.srid = SRID.valueOf(srid); else this.srid = null; }
private void handleGeometryTypes(SRID srid, String type, BaseColumn c) { //TODO: geometry arrays if (!TypeFacility.RUNTIME_NAMES.GEOMETRY.equals(c.getDatatype().getName())) { return; } if (type.startsWith(EDM_GEOMETRY)) { if (type.length() > EDM_GEOMETRY.length()) { c.setProperty(BaseColumn.SPATIAL_TYPE, type.substring(EDM_GEOMETRY.length()).toUpperCase()); } else { c.setProperty(BaseColumn.SPATIAL_TYPE, "GEOMETRY"); //$NON-NLS-1$ } } else if (type.startsWith(EDM_GEOGRAPHY)) { c.setProperty(BaseColumn.SPATIAL_SRID, "4326"); //$NON-NLS-1$ if (type.length() > EDM_GEOGRAPHY.length()) { c.setProperty(BaseColumn.SPATIAL_TYPE, type.substring(EDM_GEOGRAPHY.length()).toUpperCase()); } else { c.setProperty(BaseColumn.SPATIAL_TYPE, "GEOMETRY"); //$NON-NLS-1$ } } if (srid != null && srid.isNotDefault()) { String value = srid.toString(); if (!value.equalsIgnoreCase("VARIABLE")) { //$NON-NLS-1$ c.setProperty(BaseColumn.SPATIAL_SRID, value); } } }