/** * Creates an encoder from a configuration. * <p> * This constructor calls through to {@link #Encoder(Configuration, XSDSchema)} * obtaining the schema instance from {@link Configuration#schema()}. * </p> * @param configuration The encoder configuration. */ public Encoder(Configuration configuration) { this(configuration, configuration.schema()); }
protected XSDSchema gmlSchema() { if (gml2Schema == null) { gml2Schema = xmlConfiguration.schema(); } return gml2Schema; }
/** * Creates an encoder from a configuration. * <p> * This constructor calls through to {@link #Encoder(Configuration, XSDSchema)} * obtaining the schema instance from {@link Configuration#schema()}. * </p> * @param configuration The encoder configuration. */ public Encoder(Configuration configuration) { this( configuration, configuration.schema() ); }
/** * Creates an encoder from a configuration. * <p> * This constructor calls through to {@link #Encoder(Configuration, XSDSchema)} * obtaining the schema instance from {@link Configuration#schema()}. * </p> * @param configuration The encoder configuration. */ public Encoder(Configuration configuration) { this(configuration, configuration.schema()); }
protected XSDSchema gmlSchema() { if (gml3Schema == null) { gml3Schema = xmlConfiguration.schema(); } return gml3Schema; }
private XSDSchema createGml3Schema() { return xmlConfiguration.schema(); }
Encoder encoder = new Encoder(configuration, configuration.schema());
Encoder encoder = new Encoder(configuration, configuration.schema()); encoder.setSchemaLocation(org.geoserver.wfs.xml.v1_1_0.WFS.NAMESPACE, ResponseUtils.appendPath(wfs.getSchemaBaseURL(), "wfs/1.1.0/wfs.xsd"));
protected void encode(FeatureCollectionResponse hits, OutputStream output, WFSInfo wfs) throws IOException { Encoder encoder = new Encoder(configuration, configuration.schema()); encoder.setEncoding(Charset.forName(wfs.getGeoServer().getSettings().getCharset())); encoder.setSchemaLocation( org.geoserver.wfs.xml.v1_1_0.WFS.NAMESPACE, ResponseUtils.appendPath(wfs.getSchemaBaseURL(), "wfs/1.1.0/wfs.xsd")); encoder.encode( hits.getAdaptee(), org.geoserver.wfs.xml.v1_1_0.WFS.FEATURECOLLECTION, output); } }
copy[schemas.length] = config.schema(); schemas = copy; } else {
protected Encoder createEncoder( Configuration configuration, Map<String, Set<ResourceInfo>> resources, Object request) { // reuse the WFS configuration feature builder, otherwise build a new one FeatureTypeSchemaBuilder schemaBuilder; if (configuration instanceof WFSConfiguration) { schemaBuilder = ((WFSConfiguration) configuration).getSchemaBuilder(); } else { schemaBuilder = new FeatureTypeSchemaBuilder.GML3(geoServer); } // create this request specific schema ApplicationSchemaXSD1 schema = new ApplicationSchemaXSD1(schemaBuilder); schema.setBaseURL(GetFeatureRequest.adapt(request).getBaseURL()); schema.setResources(resources); if (schema.getFeatureTypes().isEmpty()) { // no feature types so let's use the base WFS schema return new Encoder(configuration, configuration.schema()); } try { // let's just instantiate the encoder return new Encoder(configuration, schema.getSchema()); } catch (IOException exception) { throw new RuntimeException( "Error generating the XSD schema during the encoder instantiation.", exception); } }
copy[schemas.length] = config.schema(); schemas = copy;
copy[schemas.length] = config.schema(); schemas = copy; } else {