@Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Envelope envelope = (Envelope) super.parse(instance, node, value); // handle the box CRS CoordinateReferenceSystem crs = this.crs; if (node.hasAttribute("srsName")) { URI srs = (URI) node.getAttributeValue("srsName"); crs = CRS.decode(srs.toString()); } if (crs != null) { return new ReferencedEnvelope(envelope, crs); } else { return envelope; } } }
public Object parse(ElementInstance instance, Node node, Object value) throws Exception { ComplexDataType data = factory.createComplexDataType(); if ( node.hasAttribute( "schema" ) ) { data.setSchema( node.getAttributeValue( "schema").toString() ); } if ( node.hasAttribute( "mimeType" ) ) { data.setMimeType( node.getAttributeValue( "mimeType").toString() ); } if ( node.hasAttribute( "encoding" ) ) { data.setEncoding( node.getAttributeValue( "encoding").toString() ); } for ( Iterator i = node.getChildren().iterator(); i.hasNext(); ) { Node c = (Node) i.next(); data.getData().add( c.getValue() ); } return data; } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { List l = node.getChildValues(Symbolizer.class); Symbolizer[] syms = (Symbolizer[]) l.toArray(new Symbolizer[l.size()]); FeatureTypeStyle style = sb.createFeatureTypeStyle(syms, 1.0, 1.0); //if the style has an id, throw it in to the style cache if (node.hasAttribute("id")) { String id = (String) node.getAttributeValue("id"); //create a uri with just a fragment URI uri = new URI("#" + id); styleMap.put(uri, style); } return style; } }
public void initializeChildContext( ElementInstance childInstance, Node node, MutablePicoContainer context) { // if an srsName is set for this geometry, put it in the context for // children, so they can use it as well if (node.hasAttribute("srsName")) { try { CoordinateReferenceSystem crs = GML2ParsingUtils.crs(node); if (crs != null) { context.registerComponentInstance(CoordinateReferenceSystem.class, crs); } } catch (Exception e) { throw new WFSException(e, "InvalidParameterValue"); } } }
public void initializeChildContext( ElementInstance childInstance, Node node, MutablePicoContainer context) { // if an srsName is set for this geometry, put it in the context for // children, so they can use it as well if (node.hasAttribute("srsName")) { try { CoordinateReferenceSystem crs = GML2ParsingUtils.crs(node); if (crs != null) { context.registerComponentInstance(CoordinateReferenceSystem.class, crs); } } catch (Exception e) { throw new WFSException(e, "InvalidParameterValue"); } } }
/** * Set the viewParams in the binding class manually * * @param object * @param node * @throws Exception */ public static void viewParams(EObject object, Node node) throws Exception { if (node.hasAttribute("viewParams")) { String rawViewParams = (String) node.getAttributeValue("viewParams"); List viewParams = (List) wfsSqlViewKvpParser.parse(rawViewParams); WFSBindingUtils.set(object, "viewParams", viewParams); } } }
public void initializeChildContext( ElementInstance childInstance, Node node, MutablePicoContainer context) { // if an srsName is set for this geometry, put it in the context for // children, so they can use it as well if (node.hasAttribute("srsName")) { try { CoordinateReferenceSystem crs = GML2ParsingUtils.crs(node); if (crs != null) { context.registerComponentInstance(CoordinateReferenceSystem.class, crs); } } catch (Exception e) { throw new WFSException(e, "InvalidParameterValue"); } } }
public void initializeChildContext( ElementInstance childInstance, Node node, MutablePicoContainer context) { // if an srsName is set for this geometry, put it in the context for // children, so they can use it as well if (node.hasAttribute("srsName")) { try { CoordinateReferenceSystem crs = GML2ParsingUtils.crs(node); if (crs != null) { context.registerComponentInstance(CoordinateReferenceSystem.class, crs); } } catch (Exception e) { throw new WFSException(e, "InvalidParameterValue"); } } }
public void initializeChildContext( ElementInstance childInstance, Node node, MutablePicoContainer context) { // if an srsName is set for this geometry, put it in the context for // children, so they can use it as well if (node.hasAttribute("srsName")) { try { CoordinateReferenceSystem crs = GML2ParsingUtils.crs(node); if (crs != null) { context.registerComponentInstance(CoordinateReferenceSystem.class, crs); } } catch (Exception e) { throw new WFSException(e, "InvalidParameterValue"); } } }
public void initializeChildContext( ElementInstance childInstance, Node node, MutablePicoContainer context) { // if an srsName is set for this geometry, put it in the context for // children, so they can use it as well if (node.hasAttribute("srsName")) { try { CoordinateReferenceSystem crs = GML2ParsingUtils.crs(node); if (crs != null) { context.registerComponentInstance(CoordinateReferenceSystem.class, crs); } } catch (Exception e) { throw new WFSException(e, "InvalidParameterValue"); } } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Expression e1 = (Expression) node.getChildValue(0); Expression e2 = (Expression) node.getChildValue(1); //filter 1.1 only //<xsd:attribute default="true" name="matchCase" type="xsd:boolean" use="optional"/> Boolean matchCase = Boolean.TRUE; if (node.hasAttribute("matchCase")) { matchCase = (Boolean) node.getAttributeValue("matchCase"); } return filterfactory.notEqual(e1, e2, matchCase.booleanValue()); } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Expression e1 = (Expression) node.getChildValue(0); Expression e2 = (Expression) node.getChildValue(1); //filter 1.1 only //<xsd:attribute default="true" name="matchCase" type="xsd:boolean" use="optional"/> Boolean matchCase = Boolean.TRUE; if (node.hasAttribute("matchCase")) { matchCase = (Boolean) node.getAttributeValue("matchCase"); } return filterfactory.notEqual(e1, e2, matchCase.booleanValue()); } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Expression e1 = (Expression) node.getChildValue(0); Expression e2 = (Expression) node.getChildValue(1); //<xsd:attribute default="true" name="matchCase" type="xsd:boolean" use="optional"/> Boolean matchCase = Boolean.TRUE; if (node.hasAttribute("matchCase")) { matchCase = (Boolean) node.getAttributeValue("matchCase"); } return filterfactory.equal(e1, e2, matchCase.booleanValue()); } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Expression e1 = (Expression) node.getChildValue(0); Expression e2 = (Expression) node.getChildValue(1); //<xsd:attribute default="true" name="matchCase" type="xsd:boolean" use="optional"/> Boolean matchCase = Boolean.TRUE; if (node.hasAttribute("matchCase")) { matchCase = (Boolean) node.getAttributeValue("matchCase"); } return filterfactory.equal(e1, e2, matchCase.booleanValue()); } }
/** * Fix the node object to store a parsed list of viewParams instead of a raw string. This * prevents the parse() method choking later on... */ public static void fixNodeObject(Node node) throws Exception { List viewParams = null; if (node.hasAttribute("viewParams")) { Node viewParamsAttribute = node.getAttribute("viewParams"); viewParams = (List) wfsSqlViewKvpParser.parse((String) viewParamsAttribute.getValue()); EList viewParamsList = new org.eclipse.emf.common.util.BasicEList(); viewParamsList.addAll(viewParams); viewParamsAttribute.setValue(viewParamsList); } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { GetDiffType result = wfsvFactory.createGetDiffType(); result.getDifferenceQuery().addAll(node.getChildValues(DifferenceQueryType.class)); if (node.hasAttribute("outputFormat")) { result.setOutputFormat((String) node.getAttributeValue("outputFormat")); } return result; } }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { DescribeFeatureTypeType describeFeatureType = wfsfactory.createDescribeFeatureTypeType(); // <xsd:element maxOccurs="unbounded" minOccurs="0" // name="TypeName" type="xsd:QName"> describeFeatureType.getTypeName().addAll(node.getChildValues(QName.class)); // lt;xsd:attribute default="text/xml; subtype=gml/3.1.1" // name="outputFormat" type="xsd:string" use="optional"> if (node.hasAttribute("outputFormat")) { describeFeatureType.setOutputFormat((String) node.getAttributeValue("outputFormat")); } return describeFeatureType; } }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { DeleteElementType deleteElement = wfsfactory.createDeleteElementType(); // <xsd:element maxOccurs="1" minOccurs="1" ref="ogc:Filter"> deleteElement.setFilter((Filter) node.getChildValue(Filter.class)); // <xsd:attribute name="handle" type="xsd:string" use="optional"/> if (node.hasAttribute("handle")) { deleteElement.setHandle((String) node.getAttributeValue("handle")); } // <xsd:attribute name="typeName" type="xsd:QName" use="required"/> deleteElement.setTypeName((QName) node.getAttributeValue(QName.class)); return deleteElement; } }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { DeleteElementType deleteElement = wfsfactory.createDeleteElementType(); // <xsd:element maxOccurs="1" minOccurs="1" ref="ogc:Filter"> deleteElement.setFilter((Filter) node.getChildValue(Filter.class)); // <xsd:attribute name="handle" type="xsd:string" use="optional"/> if (node.hasAttribute("handle")) { deleteElement.setHandle((String) node.getAttributeValue("handle")); } // <xsd:attribute name="typeName" type="xsd:QName" use="required"/> deleteElement.setTypeName((QName) node.getAttributeValue(QName.class)); return deleteElement; } }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { net.opengis.ows10.GetCapabilitiesType owsGetCapabilities = (net.opengis.ows10.GetCapabilitiesType) value; GetCapabilitiesType getCapabilities = wfsfactory.createGetCapabilitiesType(); getCapabilities.setAcceptFormats(owsGetCapabilities.getAcceptFormats()); getCapabilities.setAcceptVersions(owsGetCapabilities.getAcceptVersions()); getCapabilities.setSections(owsGetCapabilities.getSections()); getCapabilities.setUpdateSequence(owsGetCapabilities.getUpdateSequence()); if (node.hasAttribute("service")) { getCapabilities.setService((String) node.getAttributeValue("service")); } return getCapabilities; } }