@Override public Object read(Object request, Map kvp, Map rawKvp) throws Exception { // special cite compliance check to ensure the client specified typeNames rather than just // typeName (but typename is a parameter in a StoredQuery in CITE tests!!) if (!kvp.containsKey("typenames") && kvp.containsKey("typename") && getWFS().isCiteCompliant() && !kvp.containsKey("STOREDQUERY_ID")) { throw new WFSException("WFS 2.0 requires typeNames, not typeName"); } return super.read(request, kvp, rawKvp); } }
@Override protected void wrapInternal(Map properties, SimpleHash model, WFSInfo wfsInfo) { WorkspaceInfo workspaceInfo = wfsInfo.getWorkspace(); properties.put("workspaceName", workspaceInfo != null ? workspaceInfo.getName() : "NO_WORKSPACE"); properties.put("enabled", wfsInfo.isEnabled() ? "true" : "false"); properties.put("name", wfsInfo.getName()); properties.put("title", wfsInfo.getTitle()); properties.put("maintainer", wfsInfo.getMaintainer()); properties.put("abstract", wfsInfo.getAbstract()); properties.put("accessConstraints", wfsInfo.getAccessConstraints()); properties.put("fees", wfsInfo.getFees()); properties.put("versions", wfsInfo.getVersions()); properties.put("keywords", wfsInfo.getKeywords()); properties.put("metadataLink", wfsInfo.getMetadataLink()); properties.put("citeCompliant", wfsInfo.isCiteCompliant() ? "true" : "false"); properties.put("onlineResource", wfsInfo.getOnlineResource()); properties.put("schemaBaseURL", wfsInfo.getSchemaBaseURL()); properties.put("verbose", wfsInfo.isVerbose() ? "true" : "false"); properties.put("maxFeatures", String.valueOf(wfsInfo.getMaxFeatures())); properties.put("isFeatureBounding", wfsInfo.isFeatureBounding() ? "true" : "false"); properties.put("serviceLevel", wfsInfo.getServiceLevel()); properties.put("isCanonicalSchemaLocation", wfsInfo.isCanonicalSchemaLocation() ? "true" : "false"); properties.put("encodeFeatureMember", wfsInfo.isEncodeFeatureMember() ? "true" : "false"); } });
protected Object parseToken(String token) throws Exception { int i = token.indexOf(':'); if (i != -1 || geoserver.getService(WFSInfo.class).isCiteCompliant()) { return super.parseToken(token); } else { // we don't have the namespace, use the catalog to lookup the feature type // mind, this is lenient behavior so we use it only if the server is not runnig in cite // mode FeatureTypeInfo ftInfo = catalog.getFeatureTypeByName(token); if (ftInfo == null) { return new QName(null, token); } else { final Name name = ftInfo.getFeatureType().getName(); return new QName(name.getNamespaceURI(), name.getLocalPart()); } } } }
public static void initRequestParser(Parser parser, WFSInfo wfs, GeoServer geoServer, Map kvp) { // check the strict flag to determine if we should validate or not Boolean strict = (Boolean) kvp.get("strict"); if (strict == null) { strict = Boolean.FALSE; } // check for cite compliance, we always validate for cite if (wfs.isCiteCompliant()) { strict = Boolean.TRUE; } parser.setValidating(strict.booleanValue()); WFSURIHandler.addToParser(geoServer, parser); Catalog catalog = geoServer.getCatalog(); // "inject" namespace mappings parser.getNamespaces().add(new CatalogNamespaceSupport(catalog)); }
String fid = (String) i.next(); if (getWFS().isCiteCompliant() && typeNames != null && !typeNames.isEmpty()) { QName qName = getTypeNameFromFeatureId(fid); if (qName != null) {
if (wfs.isCiteCompliant()) { element("GML2", null); } else {
public FeatureTypeInfo[] run(DescribeFeatureTypeRequest request) throws WFSException { List<QName> names = new ArrayList<QName>(request.getTypeNames()); final boolean citeConformance = getWFS().isCiteCompliant(); if (!citeConformance) {
if (wfs.isCiteCompliant()) { if (request.getUpdateSequence() != null) { throw new WFSException(request, "Invalid update sequence", "InvalidUpdateSequence"); if (wfs.isCiteCompliant()) { if (!request.isSetService()) {
propertyName.evaluate(featureType, AttributeDescriptor.class); if (descriptor == null) { if (getInfo().isCiteCompliant()) {
protected void setCiteCompliant(boolean value) { WFSInfo wfs = getWFS(); citeCompliant = wfs.isCiteCompliant(); wfs.setCiteCompliant(value); getGeoServer().save(wfs); }
if (getInfo().isCiteCompliant()) { checkFeatureCoordinatesRange(collection);
if (wfs.isCiteCompliant()) {
if (wfs.isCiteCompliant()) { if (wfs.isCiteCompliant()) { fvisitor = new AbstractFilterVisitor() {
if (getInfo().isCiteCompliant()) JTS.checkCoordinatesRange(geometry, source != null ? source : target);
transformer.setGmlPrefixing(wfs.isCiteCompliant() || !gml.getOverrideGMLAttributes());
if (totalOffset == -1 && request.getVersion().startsWith("2") && (wfs.isCiteCompliant() || (request.getMaxFeatures() != null && request.getMaxFeatures().longValue() > 0