@Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { ComplexDataType cd = (ComplexDataType) super.parse(instance, node, value); // handle non xml content as well if(cd.getData().size() == 0) { cd.getData().add(instance.getText().toString()); } return cd; } }
if (instance.getElementDeclaration().getTypeDefinition().getBaseType() instanceof XSDTypeDefinition) { if ((value != null) && EMFUtils.has(eObject, "value")) { setProperty(eObject, "value", value, false);
public Object parse(ElementInstance instance, Node node, Object value) throws Exception { catalog.getFeatureTypeByName(instance.getNamespace(), instance.getName()); if (meta != null) { FeatureType featureType = meta.getFeatureType();
@Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { SimpleLiteral sl = Csw20Factory.eINSTANCE.createSimpleLiteral(); sl.setName(instance.getName()); sl.setValue(value); Node scheme = node.getAttribute("scheme"); if (scheme != null) { sl.setScheme((URI) scheme.getValue()); } return sl; }
ElementInstance parentElement = (ElementInstance) parent.getComponent(); List childParticles = index.getChildElementParticles(parentElement .getElementDeclaration());
SimpleFeatureType customFeatureType = schemaRegistry.get(instance.getName()); featureType = appendAttributes(featureType, customFeatureType);
@Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { ComplexDataType cd = (ComplexDataType) super.parse(instance, node, value); // handle non xml content as well if (cd.getData().size() == 0) { cd.getData().add(instance.getText().toString()); } return cd; } }
ElementInstance parentElement = (ElementInstance) parent.getComponent(); List childParticles = index.getChildElementParticles( parentElement.getElementDeclaration() ); if ( childParticles.size() == 1 ) { XSDParticle particle =
/** * * <!-- 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; } }
ElementInstance parentElement = (ElementInstance) parent.getComponent(); List childParticles = index.getChildElementParticles(parentElement .getElementDeclaration());
/** * <!-- begin-user-doc --> * Even though the spec allows an instance of ParamterValueType to have * multiple expressions as children, it is more often that there is only * one. Therefore this binding returns the first expression it finds or * null. If a subtype needs multiple expressions they should ovveride. * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { //first look for an expresion in the child text String text = instance.getText(); if ((text != null) && !"".equals(text)) { return filterFactory.createLiteralExpression(text); } for (Iterator itr = node.getChildren().iterator(); itr.hasNext();) { Node child = (Node) itr.next(); if (child.getValue() instanceof Expression) { return child.getValue(); } } return null; } }
throws Exception { XSDElementDeclaration decl = instance.getElementDeclaration();
@Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { CssParameter option = new CssParameter((String) node.getAttributeValue("name")); option.setExpression(filterFactory.literal(instance.getText())); return option; } }
String text = instance.getText();
String text = instance.getText();