/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { NativeType nativ = wfsfactory.createNativeType(); // <xsd:attribute name="vendorId" type="xsd:string" use="required"> nativ.setVendorId((String) node.getAttributeValue("vendorId")); // <xsd:attribute name="safeToIgnore" type="xsd:boolean" use="required"> nativ.setSafeToIgnore(((Boolean) node.getAttributeValue("safeToIgnore")).booleanValue()); // <xsd:any processContents="lax" namespace="##other" minOccurs="0"/> if (instance.getText() != null && instance.getText().length() != 0) { nativ.setValue(instance.getText()); } return nativ; } }
public static NativeType unadapt(Native nativ) { NativeType n = WfsFactory.eINSTANCE.createNativeType(); n.setSafeToIgnore(nativ.isSafeToIgnore()); n.setVendorId(nativ.getVendorId()); // TODO: value return n; } }
/** * Sets ith "Native" element */ public void setNativeArray(int i, net.opengis.wfs.NativeType xnative) { synchronized (monitor()) { check_orphaned(); net.opengis.wfs.NativeType target = null; target = (net.opengis.wfs.NativeType)get_store().find_element_user(NATIVE$8, i); if (target == null) { throw new IndexOutOfBoundsException(); } target.set(xnative); } }
@Test public void testNativeType() throws Exception { Parser p = new Parser(getXmlConfiguration11()); NativeType nativ = (NativeType) p.parse( new ByteArrayInputStream( "<wfs:Native safeToIgnore='true' xmlns:wfs='http://www.opengis.net/wfs'>here is some text</wfs:Native>" .getBytes())); assertEquals("here is some text", nativ.getValue()); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { RollbackType rollback = wfsvFactory.createRollbackType(); if (node.hasAttribute("handle")) { rollback.setHandle((String) node.getAttributeValue("handle")); } rollback.setFilter((Filter) node.getChildValue(Filter.class)); rollback.setTypeName((QName) node.getAttributeValue("typeName")); rollback.setToFeatureVersion((String) node.getAttributeValue("toFeatureVersion")); rollback.setVendorId((String) node.getAttributeValue("vendorId")); rollback.setSafeToIgnore(((Boolean) node.getAttributeValue("safeToIgnore")).booleanValue()); rollback.setUser((String) node.getAttributeValue("user")); return rollback; } }
/** * Sets the "Native" element */ public void setNative(net.opengis.wfs.NativeType xnative) { synchronized (monitor()) { check_orphaned(); net.opengis.wfs.NativeType target = null; target = (net.opengis.wfs.NativeType)get_store().find_element_user(NATIVE$0, 0); if (target == null) { target = (net.opengis.wfs.NativeType)get_store().add_element_user(NATIVE$0); } target.set(xnative); } }