public FeatureCollectionTypeBinding( WfsFactory wfsfactory, Catalog catalog, Configuration configuration, Encoder encoder) { this.wfsfactory = wfsfactory; this.catalog = catalog; this.encoder = encoder; this.generateBounds = !configuration.getProperties().contains(GMLConfiguration.NO_FEATURE_BOUNDS); this.encodeFeatureMember = configuration.getProperties().contains(GMLConfiguration.ENCODE_FEATURE_MEMBER); }
public Object read(Object request, Reader reader, Map kvp) throws Exception { // TODO: make this configurable? configuration.getProperties().add(Parser.Properties.PARSE_UNKNOWN_ELEMENTS); Parser parser = new Parser(configuration); // set the input source with the correct encoding InputSource source = new InputSource(reader); source.setEncoding(wfs.getCharSet().name()); Object parsed = parser.parse(source); // valid request? this should definitley be a configuration option // TODO: HACK, disabling validation for transaction if (!"Transaction".equalsIgnoreCase(getElement().getLocalPart())) { if (!parser.getValidationErrors().isEmpty()) { WFSException exception = new WFSException("Invalid request", "InvalidParameterValue"); for (Iterator e = parser.getValidationErrors().iterator(); e.hasNext();) { Exception error = (Exception) e.next(); exception.getExceptionText().add(error.getLocalizedMessage()); } throw exception; } } return parsed; } }
public Object read(Object request, Reader reader, Map kvp) throws Exception { // TODO: make this configurable? configuration.getProperties().add(Parser.Properties.PARSE_UNKNOWN_ELEMENTS); Parser parser = new Parser(configuration); parser.setEntityResolver(entityResolverProvider.getEntityResolver()); WFSXmlUtils.initRequestParser(parser, wfs, geoServer, kvp); Object parsed = WFSXmlUtils.parseRequest(parser, reader, wfs); WFSXmlUtils.checkValidationErrors(parser, this); return parsed; } }
for (Iterator p = dependency.getProperties().iterator(); p.hasNext();) { QName property = (QName) p.next();
List properties = new ArrayList(dependency.getProperties()); for ( Iterator p = properties.iterator(); p.hasNext(); ) { QName property = (QName) p.next();
List properties = new ArrayList(dependency.getProperties()); for (Iterator p = properties.iterator(); p.hasNext();) { QName property = (QName) p.next();
public Object read(Object request, Reader reader, Map kvp) throws Exception { configuration.getProperties().add(Parser.Properties.PARSE_UNKNOWN_ELEMENTS);
@Override protected Configuration customizeConfiguration( Configuration configuration, Map<String, Set<ResourceInfo>> resources, Object request) { FeatureTypeSchemaBuilder schemaBuilder = new FeatureTypeSchemaBuilder.GML32(geoServer); ApplicationSchemaXSD2 xsd = new ApplicationSchemaXSD2(schemaBuilder); xsd.setBaseURL(GetFeatureRequest.adapt(request).getBaseURL()); xsd.setResources(resources); org.geotools.wfs.v2_0.WFSConfiguration wfs = new org.geotools.wfs.v2_0.WFSConfiguration(); wfs.getDependency(GMLConfiguration.class) .setSrsSyntax( getInfo() .getGML() .get(WFSInfo.Version.V_20) .getSrsNameStyle() .toSrsSyntax()); ApplicationSchemaConfiguration2 config = new ApplicationSchemaConfiguration2(xsd, wfs); // adding properties from original configuration to allow // hints handling config.getProperties().addAll(configuration.getProperties()); return config; }