/** Creates a new configuration, adding the dependency on {@link OWSConfiguration}. */ public OWSConfiguration() { super(OWS.getInstance()); addDependency(new XLINKConfiguration()); }
@Override protected Configuration createConfiguration() { return new OWSConfiguration(); }
public void testParseServiceException() throws Exception { String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<ows:ExceptionReport version=\"1.0.0\"\n" + " xsi:schemaLocation=\"http://www.opengis.net/ows http://demo.opengeo.org/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd\"\n" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ows=\"http://www.opengis.net/ows\">\n" + " <ows:Exception exceptionCode=\"InvalidParameterValue\" locator=\"service\">\n" + " <ows:ExceptionText>No service: ( madeUp )</ows:ExceptionText>\n" + " </ows:Exception>\n" + "</ows:ExceptionReport>\n" + ""; document = dom(xml); Object result = parse(OWS.EXCEPTIONREPORT); assertNotNull(result); assertTrue(result instanceof ExceptionReportType); ExceptionReportType er = (ExceptionReportType) result; assertEquals("1.0.0", er.getVersion()); assertEquals(1, er.getException().size()); ExceptionType ex = (ExceptionType) er.getException().get(0); assertEquals("InvalidParameterValue", ex.getExceptionCode()); assertEquals("service", ex.getLocator()); assertEquals(1, ex.getExceptionText().size()); assertEquals("No service: ( madeUp )", ex.getExceptionText().get(0)); } }
OWSConfiguration configuration = new OWSConfiguration(); Encoder encoder = new Encoder(configuration, configuration.schema()); encoder.setIndenting(true); encoder.setIndentSize(2);
protected void addDependencies(Set dependencies) { super.addDependencies(dependencies); dependencies.add(OGC.getInstance()); dependencies.add(GML.getInstance()); dependencies.add(OWS.getInstance()); }
public WFSConfiguration( GeoServer geoServer, FeatureTypeSchemaBuilder schemaBuilder, final WFS wfs) { super(wfs); this.catalog = geoServer.getCatalog(); this.schemaBuilder = schemaBuilder; addDependency(new OGCConfiguration()); addDependency(new OWSConfiguration()); addDependency(new GMLConfiguration()); // OGC and OWS add two extra GML configurations in the mix, make sure to configure them // all... CurvedGeometryFactory gf = new CurvedGeometryFactory(Double.MAX_VALUE); for (Object configuration : allDependencies()) { if (configuration instanceof GMLConfiguration) { GMLConfiguration gml = (GMLConfiguration) configuration; gml.setGeometryFactory(gf); } } }