public boolean canEncode(Element element, Object value, Map hints) { if ((hints != null) && hints.containsKey(FilterSchema.FILTER_CAP_KEY)) { FilterCapabilities fc = (FilterCapabilities) hints.get(FilterSchema.FILTER_CAP_KEY); if ((fc.getSpatialOps() & FilterCapabilities.SPATIAL_BBOX) != FilterCapabilities.SPATIAL_BBOX) { return false; } } return (element.getType() != null) && getName().equals(element.getType().getName()) && value instanceof BinarySpatialOperator; }
/** * @see org.geotools.xml.schema.Type#canEncode(org.geotools.xml.schema.Element, * java.lang.Object, java.util.Map) */ public boolean canEncode(Element element, Object value, Map hints) { if ((hints != null) && hints.containsKey(FilterSchema.FILTER_CAP_KEY)) { FilterCapabilities fc = (FilterCapabilities) hints.get(FilterSchema.FILTER_CAP_KEY); if (fc.getSpatialOps() == 0) { return false; } } return (element.getType() != null) && getName().equals(element.getType().getName()) && value instanceof BinarySpatialOperator; }
public boolean canEncode(Element element, Object value, Map hints) { if ((hints != null) && hints.containsKey(FilterSchema.FILTER_CAP_KEY)) { FilterCapabilities fc = (FilterCapabilities) hints.get(FilterSchema.FILTER_CAP_KEY); if ((fc.getSpatialOps() & (FilterCapabilities.SPATIAL_BEYOND | FilterCapabilities.SPATIAL_DWITHIN)) != (FilterCapabilities.SPATIAL_BEYOND | FilterCapabilities.SPATIAL_DWITHIN)) { return false; } } return (element.getType() != null) && getName().equals(element.getType().getName()) && value instanceof DistanceBufferOperator; }
public boolean canEncode(Element element, Object value, Map hints) { if ((hints != null) && hints.containsKey(FilterSchema.FILTER_CAP_KEY)) { FilterCapabilities fc = (FilterCapabilities) hints.get(FilterSchema.FILTER_CAP_KEY); if ((fc.getSpatialOps() & (FilterCapabilities.SPATIAL_BEYOND | FilterCapabilities.SPATIAL_DWITHIN)) != (FilterCapabilities.SPATIAL_BEYOND | FilterCapabilities.SPATIAL_DWITHIN)) { return false; } } return (element.getType() != null) && getName().equals(element.getType().getName()) && value instanceof DistanceBufferOperator; }
/** * @see org.geotools.xml.schema.Type#canEncode(org.geotools.xml.schema.Element, * java.lang.Object, java.util.Map) */ public boolean canEncode(Element element, Object value, Map hints) { if ((hints != null) && hints.containsKey(FilterSchema.FILTER_CAP_KEY)) { FilterCapabilities fc = (FilterCapabilities) hints.get(FilterSchema.FILTER_CAP_KEY); if ((fc.getScalarOps() == 0) && (fc.getSpatialOps() == 0)) { return false; } } boolean r = ((element != null) && (element.getType() != null) && getName().equals(element.getType().getName())); r = (r && (value != null) && value instanceof Filter && Filters.getFilterType((Filter) value) != 0); return r; }