Package org.geotools.gml.producer

Examples of org.geotools.gml.producer.FeatureTransformer.addSchemaLocation()


    // define feature information
    final SimpleFeatureType schema = featureCollection.getSchema();
    String prefix = (String) schema.getUserData().get("prefix");
    String namespace = schema.getName().getNamespaceURI();
    transform.getFeatureTypeNamespaces().declareDefaultNamespace(prefix, namespace);
    transform.addSchemaLocation(prefix, namespace);
   
    String srsName = CRS.toSRS(schema.getCoordinateReferenceSystem());
    if (srsName != null) {
        transform.setSrsName(srsName);
    }
View Full Code Here


   
    // also work-around, get the schema of the featureType
    Schema s = SchemaFactory.getInstance(namespaceURI);
   
    // define a schemaLocation and allow thereby validation!
    tx.addSchemaLocation(namespaceURI, s.getURI().toASCIIString());
   
    tx.transform(fc, out);
    // transformExample2 end
}
View Full Code Here

        transform.setIndentation(4);
        transform.setGmlPrefixing(true);

        if (prefix != null && namespace != null) {
            transform.getFeatureTypeNamespaces().declareDefaultNamespace(prefix, namespace);
            transform.addSchemaLocation(prefix, namespace);
            // transform.getFeatureTypeNamespaces().declareDefaultNamespace("", namespace );
        }

        if (TYPE.getName().getNamespaceURI() != null && TYPE.getUserData().get("prefix") != null) {
            String typeNamespace = TYPE.getName().getNamespaceURI();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.