public GMLParserDelegate() { super(new GMLConfiguration()); } }
/** Creates the new gml configuration, with a depenendency on {@link XLINKConfiguration} */ public GMLConfiguration() { super(GML.getInstance()); // add xlink cdependency addDependency(new XLINKConfiguration()); // add the parse unknown attributes property, this is mostly for // the "fid" attribute getProperties().add(Parser.Properties.PARSE_UNKNOWN_ELEMENTS); getProperties().add(Parser.Properties.PARSE_UNKNOWN_ATTRIBUTES); }
private boolean getForceDecimalEncoding(Configuration configuration) { GMLConfiguration config = getGMLConfiguration(configuration); if (config == null) { return true; } else { return config.getForceDecimalEncoding(); } }
private int getNumDecimals(Configuration configuration) { GMLConfiguration config = getGMLConfiguration(configuration); if (config == null) { return 6; } else { return config.getNumDecimals(); } }
@Override public void encode(ContentHandler output) throws Exception { Object value = ((PropertyType) object).getValue(); output.startElement(WFS.NAMESPACE, VALUE, "wfs:" + VALUE, new AttributesImpl()); if (value instanceof Geometry) { Encoder encoder = new Encoder(new org.geotools.gml2.GMLConfiguration()); encoder.setInline(true); encoder.encode(value, org.geotools.gml2.GML._Geometry, output); } else { String s = value.toString(); output.characters(s.toCharArray(), 0, s.length()); } output.endElement(WFS.NAMESPACE, VALUE, "wfs:" + VALUE); } };
/** * Creates the new gml configuration, with a depenendency * on {@link XLINKConfiguration} */ public GMLConfiguration() { super(GML.getInstance()); //add xlink cdependency addDependency(new XLINKConfiguration()); //add the parse unknown attributes property, this is mostly for // the "fid" attribute getProperties().add(Parser.Properties.PARSE_UNKNOWN_ELEMENTS); getProperties().add(Parser.Properties.PARSE_UNKNOWN_ATTRIBUTES); }
@Override public void encode(ContentHandler output) throws Exception { Object value = ((PropertyType) object).getValue(); output.startElement( WFS.NAMESPACE, WFS.Value.getLocalPart(), "wfs:" + WFS.Value.getLocalPart(), new AttributesImpl()); if (value instanceof Geometry) { Encoder encoder = new Encoder(new org.geotools.gml2.GMLConfiguration()); encoder.setInline(true); encoder.encode(value, org.geotools.gml2.GML._Geometry, output); } else { String s = value.toString(); output.characters(s.toCharArray(), 0, s.length()); } output.endElement( WFS.NAMESPACE, WFS.Value.getLocalPart(), "wfs:" + WFS.Value.getLocalPart()); } };
/** Adds a dependency on {@link GMLConfiguration} */ public OGCConfiguration() { super(OGC.getInstance()); addDependency(new GMLConfiguration()); }
gmlNamespace = org.geotools.gml2.GML.NAMESPACE; gmlLocation = "gml/2.1.2/feature.xsd"; gmlConfiguration = new org.geotools.gml2.GMLConfiguration(); schemas.add(new org.geotools.gml2.GMLSchema().profile());
public GML2(Class type, QName element) { super(type, "text/xml; subtype=gml/2.1.2", element); xml = new GMLConfiguration(); }
public GML2(Class type,QName element) { super(type, "text/xml; subtype=gml/2.1.2",element); xml = new GMLConfiguration(); }
/** * Adds a dependency on {@link GMLConfiguration} */ public OGCConfiguration() { super(); addDependency(new GMLConfiguration()); }
import org.geotools.gml3.GMLConfiguration; import org.geotools.xml.Parser; import com.vividsolutions.jts.geom.Geometry; Reader reader = new StringReader(gmlString); GMLConfiguration gmlConfiguration = new GMLConfiguration(); Parser gmlParser = new Parser(gmlConfiguration); Geometry geometry = (Geometry) gmlParser.parse(reader);
public GML2(GeoServer gs) { super(gs); profiles.add(new GML2Profile()); gmlNamespace = org.geotools.gml2.GML.NAMESPACE; gmlSchemaLocation = "gml/2.1.2/feature.xsd"; baseType = "AbstractFeatureType"; substitutionGroup = "_Feature"; describeFeatureTypeParams = params("request", "DescribeFeatureType", "version", "1.0.0", "service", "WFS"); gmlPrefix = "gml"; xmlConfiguration = new GMLConfiguration(); }
/** * Adds a dependency on {@link GMLConfiguration} */ public OGCConfiguration() { super(OGC.getInstance()); addDependency(new GMLConfiguration()); }
addDependency(new GMLConfiguration());
schematypeTuple.getNamespaceURI(), schemaLocation); } else { configuration = new GMLConfiguration(); shouldSetParserStrict = false; } catch (SAXException e5) { configuration = new GMLConfiguration(); parser = new org.geotools.xml.Parser(configuration); parser.setStrict(false);