public void add(final SimpleFeature feature) { Name name = feature.getFeatureType().getName(); QName typeName = getTypeName(); if (!new NameImpl(typeName).equals(name)) { throw new IllegalArgumentException( "Type name does not match. Expected " + new NameImpl(typeName) + ", but got " + name); } WFSStrategy strategy = getStrategy(); FeatureTypeInfo typeInfo = strategy.getFeatureTypeInfo(typeName); CoordinateReferenceSystem crs = typeInfo.getCRS(); for (Property property : feature.getProperties()) { if (!(property instanceof GeometryAttribute)) { continue; } CoordinateReferenceSystem attCrs = ((GeometryType) property.getType()).getCoordinateReferenceSystem(); if (!CRS.equalsIgnoreMetadata(crs, attCrs)) { throw new IllegalArgumentException( "Added Features shall match the native CRS: " + typeInfo.getDefaultSRS() + ". Got " + attCrs); } } added.add(feature); }
private void encodeProperty(Feature f, Property p) { if (p.getType() == CSWRecordDescriptor.SIMPLE_LITERAL) { encodeSimpleLiteral(p); } else if (CSWRecordDescriptor.RECORD_BBOX_NAME.equals(p.getName())) { // skip it for the moment, it is constrained to be last } else { throw new IllegalArgumentException( "Don't know how to encode property " + p + " in record " + f); } }
private void encodeProperty(Feature f, Property p) { if (p.getType() == CSWRecordDescriptor.SIMPLE_LITERAL) { encodeSimpleLiteral(p); } else if (CSWRecordDescriptor.RECORD_BBOX_NAME.equals(p.getName())) { // skip it for the moment, it is constrained to be last } else { throw new IllegalArgumentException("Don't know how to encode property " + p + " in record " + f); } }
&& (serviceJIDParts[2].startsWith("master") || serviceJIDParts[2].indexOf("@") < 0)) { if (serviceName.equals(occupantServiceName)) { mustDeregisterService = false; break;
else if (MetaDataDescriptor.RECORD_BBOX_NAME.equals(p.getName())) {
public void add(final SimpleFeature feature) { Name name = feature.getFeatureType().getName(); QName typeName = getTypeName(); if (!new NameImpl(typeName).equals(name)) { throw new IllegalArgumentException( "Type name does not match. Expected " + new NameImpl(typeName) + ", but got " + name); } WFSStrategy strategy = getStrategy(); FeatureTypeInfo typeInfo = strategy.getFeatureTypeInfo(typeName); CoordinateReferenceSystem crs = typeInfo.getCRS(); for (Property property : feature.getProperties()) { if (!(property instanceof GeometryAttribute)) { continue; } CoordinateReferenceSystem attCrs = ((GeometryType) property.getType()).getCoordinateReferenceSystem(); if (!CRS.equalsIgnoreMetadata(crs, attCrs)) { throw new IllegalArgumentException( "Added Features shall match the native CRS: " + typeInfo.getDefaultSRS() + ". Got " + attCrs); } } added.add(feature); }
} else if (MetaDataDescriptor.RECORD_BBOX_NAME.equals(p.getName())) {