Refine search
@Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Polygon polygon = (Polygon)node.getChildValue(Polygon.class); MultiPolygon surface = (MultiPolygon)node.getChildValue(MultiPolygon.class); if (polygon != null) { return gf.createMultiPolygon(new Polygon[] {polygon}); } else { return surface; } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { return factory.featureId(node.getAttributeValue("fid").toString()); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { //<element maxOccurs="unbounded" minOccurs="0" ref="gml:surfaceMember"/> List surfaces = node.getChildValues(Polygon.class); return gf.createMultiPolygon((Polygon[]) surfaces.toArray(new Polygon[surfaces.size()])); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { //<xsd:element minOccurs="0" name="GeometryOperands" type="ogc:GeometryOperandsType"/> GeometryOperand[] gos = (GeometryOperand[]) node.getChildValue(GeometryOperand[].class); //<xsd:attribute name="name" type="ogc:SpatialOperatorNameType"/> return factory.spatialOperator((String) node.getAttributeValue("name"), gos); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Expression[] args = new Expression[node.getChildren().size()]; for (int i = 0; i < node.getChildren().size(); i++) { Node child = (Node) node.getChildren().get(i); args[i] = (Expression) child.getValue(); } String name = (String) node.getAttribute("name").getValue(); return factory.function(name, args); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { if (node.getChild("coord") != null) { Coordinate c = (Coordinate) node.getChild("coord").getValue(); return gFactory.createPoint(c); } if (node.getChild("coordinates") != null) { CoordinateSequence seq = (CoordinateSequence) node.getChild("coordinates").getValue(); return gFactory.createPoint(seq); } throw new RuntimeException("Could not find a coordinate"); }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { ThemeType theme = factory.createThemeType(); theme.setIdentifier((CodeType) node.getChildValue("Identifier")); for (Object c : node.getChildValues("LayerRef")) { theme.getLayerRef().add(((URI) c).toString()); } theme.getTheme().addAll(node.getChildValues("Theme")); return theme; } }
@SuppressWarnings("unchecked") private void addDCPTypes(Node node, OperationType operationType) { List<Node> dcpNodes = node.getChildren(DCPType.class); for (Node dcpNode : dcpNodes) { DCPType dcp = (DCPType) dcpNode.getValue(); operationType.getDCP().add(dcp); } }
@SuppressWarnings("unchecked") private void addParameter(Node node, Ows10Factory ows10Factory, OperationType operationType, String parameterName) { Node paramParentNode = node.getChild(parameterName); List<String> paramValues = childNames(paramParentNode); DomainType domain = ows10Factory.createDomainType(); domain.setName(parameterName); for (String paramValue : paramValues) { domain.getValue().add(paramValue); } operationType.getParameter().add(domain); }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { GetCapabilitiesType getCapabilities = wfsFactory.createGetCapabilitiesType(); getCapabilities.setAcceptVersions(owsFactory.createAcceptVersionsType()); WFSBindingUtils.service(getCapabilities, node); getCapabilities.getAcceptVersions().getVersion().add(node.getAttributeValue("version")); return getCapabilities; } }
/** * 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 { ThemesType themes = factory.createThemesType(); themes.getTheme().addAll(node.getChildValues("theme")); return themes; } }
/** * * <!-- 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 { DimensionType dimension = factory.createDimensionType(); dimension.setCurrent((boolean) node.getChildValue("Current", false)); dimension.setDefault((String) node.getChildValue("Default")); dimension.setIdentifier((CodeType) node.getChildValue("Identifier")); dimension.setUnitSymbol((String) node.getChildValue("UnitSymbol", null)); // dimension.setUOM((DomainMetadataType) node.getChildValue("UOM")); dimension.getValue().addAll(node.getChildValues("Value")); return dimension; } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { CoordinateSequence coordinates = (CoordinateSequence) node.getChildValue(KML.coordinates.getLocalPart()); return geometryFactory.createPoint(coordinates.getCoordinate(0)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { LinearRing shell = (LinearRing) node.getChild("outerBoundaryIs").getValue(); List innerRings = node.getChildren("innerBoundaryIs"); LinearRing[] holes = new LinearRing[innerRings.size()]; for (int i = 0; i < innerRings.size(); i++) { Node inode = (Node) innerRings.get(i); holes[i] = (LinearRing) inode.getValue(); } return gFactory.createPolygon(shell, holes); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { LineString[] segments = (LineString[]) node.getChildValue("segments"); return gf.createMultiLineString(segments); //return new Curve(segments, gf); }
/** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { //<xsd:element ref="se:DateValue"/> Expression date = (Expression) node.getChildValue("DateValue"); //<xsd:element ref="se:Pattern"/> Expression format = filterFactory.literal(node.getChildValue("Pattern")); return filterFactory.function("dateFormat", format, date); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { List lines = node.getChildValues(LineString.class); return gFactory.createMultiLineString((LineString[]) lines.toArray( new LineString[lines.size()])); }
/** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { ColorMapEntry entry = styleFactory.createColorMapEntry(); //<xsd:element ref="se:Data"/> entry.setQuantity(filterFactory.literal(node.getChildValue("Data"))); //<xsd:element ref="se:Value"/> entry.setColor((Expression) node.getChildValue("Value")); return entry; }