.get("string"); decl.setTypeDefinition(type);
protected void setAttributeType(XSDAttributeDeclaration ad) { ad = ad.getResolvedAttributeDeclaration(); if (ad != null && newType instanceof XSDSimpleTypeDefinition) { ad.setTypeDefinition((XSDSimpleTypeDefinition)newType); } } }
protected void setAttributeType(EAttribute attribute, XSDAttributeDeclaration attrDecl) { XSDSimpleTypeDefinition attrType = getType(attribute.getEAttributeType()); if (attrType != null) { attrDecl.setTypeDefinition(attrType); } }
protected void setAttributeType(EAttribute attribute, XSDAttributeDeclaration attrDecl) { XSDSimpleTypeDefinition attrType = getType(attribute.getEAttributeType()); if (attrType != null) { attrDecl.setTypeDefinition(attrType); } }
protected void setReferenceAttribType(XSDAttributeDeclaration xsdAttributeDeclaration) { addEMFSchema(); xsdAttributeDeclaration.setTypeDefinition(xsdSchema.getSchemaForSchema().resolveSimpleTypeDefinition(REFERENCE_TYPE_NAME)); }
protected void setReferenceAttribType(XSDAttributeDeclaration xsdAttributeDeclaration) { addEMFSchema(); xsdAttributeDeclaration.setTypeDefinition(xsdSchema.getSchemaForSchema().resolveSimpleTypeDefinition(REFERENCE_TYPE_NAME)); }
protected XSDAttributeDeclaration createGlobalXSDAttributeDeclaration(XSDSchema xsdSchema) { ensureSchemaElement(xsdSchema); XSDAttributeDeclaration attribute = XSDFactory.eINSTANCE.createXSDAttributeDeclaration(); attribute.setTypeDefinition(xsdSchema.getSchemaForSchema().resolveSimpleTypeDefinition("string")); //$NON-NLS-1$ attribute.setName(XSDCommonUIUtils.createUniqueElementName("NewAttribute", xsdSchema.getAttributeDeclarations())); //$NON-NLS-1$ Text textNode = xsdSchema.getDocument().createTextNode("\n"); //$NON-NLS-1$ xsdSchema.getElement().appendChild(textNode); xsdSchema.getContents().add(attribute); return attribute; }
attrDecl.setTypeDefinition (component.getSchema().resolveSimpleTypeDefinition((String)type));
attrDecl.setTypeDefinition (component.getSchema().resolveSimpleTypeDefinition((String)type));
protected XSDAttributeUse createAttributeUse(XSDSchema schema, String name, String type, String use, String form, String fixed) { XSDAttributeDeclaration attributeDeclaration = XSDFactory.eINSTANCE.createXSDAttributeDeclaration(); attributeDeclaration.setName(name); attributeDeclaration.setTypeDefinition(schema.getSchemaForSchema().resolveSimpleTypeDefinition(type)); if ("qualified".equals(form)) { attributeDeclaration.setForm(XSDForm.QUALIFIED_LITERAL); } XSDAttributeUse attributeUse = XSDFactory.eINSTANCE.createXSDAttributeUse(); attributeUse.setContent(attributeDeclaration); if ("optional".equals(use)) { attributeUse.setUse(XSDAttributeUseCategory.OPTIONAL_LITERAL); } if ("required".equals(use)) { attributeUse.setUse(XSDAttributeUseCategory.REQUIRED_LITERAL); } if (fixed != null) { attributeUse.setConstraint(XSDConstraint.FIXED_LITERAL); attributeUse.setLexicalValue("2.0"); } return attributeUse; }
protected XSDAttributeUse createAttributeUse(XSDSchema schema, String name, String type, String use, String form, String fixed) { XSDAttributeDeclaration attributeDeclaration = XSDFactory.eINSTANCE.createXSDAttributeDeclaration(); attributeDeclaration.setName(name); attributeDeclaration.setTypeDefinition(schema.getSchemaForSchema().resolveSimpleTypeDefinition(type)); if ("qualified".equals(form)) { attributeDeclaration.setForm(XSDForm.QUALIFIED_LITERAL); } XSDAttributeUse attributeUse = XSDFactory.eINSTANCE.createXSDAttributeUse(); attributeUse.setContent(attributeDeclaration); if ("optional".equals(use)) { attributeUse.setUse(XSDAttributeUseCategory.OPTIONAL_LITERAL); } if ("required".equals(use)) { attributeUse.setUse(XSDAttributeUseCategory.REQUIRED_LITERAL); } if (fixed != null) { attributeUse.setConstraint(XSDConstraint.FIXED_LITERAL); attributeUse.setLexicalValue("2.0"); } return attributeUse; }
simpleAttributeDeclaration./*{@link XSDAttributeDeclaration#setTypeDefinition */setTypeDefinition/*}*/ (prototypeSchema.resolveSimpleTypeDefinition(/*{@link #*/someOtherSchemaURI/*}*/, "someOtherTypeDefinition")); simpleAttributeDeclaration./*{@link XSDAttributeDeclaration#setConstraint */setConstraint/*}*/(/*{@link */XSDConstraint/*}*/.DEFAULT_LITERAL);
simpleAttributeDeclaration./*{@link XSDAttributeDeclaration#setTypeDefinition */setTypeDefinition/*}*/ (prototypeSchema.resolveSimpleTypeDefinition(/*{@link #*/someOtherSchemaURI/*}*/, "someOtherTypeDefinition")); simpleAttributeDeclaration./*{@link XSDAttributeDeclaration#setConstraint */setConstraint/*}*/(/*{@link */XSDConstraint/*}*/.DEFAULT_LITERAL);
simpleAttributeDeclarationGroupMember./*{@link XSDAttributeDeclaration#setTypeDefinition */setTypeDefinition/*}*/ (prototypeSchema./*{@link XSDConcreteComponent#resolveSimpleTypeDefinition(String, String) */resolveSimpleTypeDefinition/*}*/(/*{@link #*/someOtherSchemaURI/*}*/, "someOtherTypeDefinition"));
simpleAttributeDeclarationGroupMember./*{@link XSDAttributeDeclaration#setTypeDefinition */setTypeDefinition/*}*/ (prototypeSchema./*{@link XSDConcreteComponent#resolveSimpleTypeDefinition(String, String) */resolveSimpleTypeDefinition/*}*/(/*{@link #*/someOtherSchemaURI/*}*/, "someOtherTypeDefinition"));
child.setTypeDefinition(parent.getSchema().getSchemaForSchema().resolveSimpleTypeDefinition("string")); return child;
parent.getSchema().getContents().add(globalTypeDef); ((XSDAttributeDeclaration) parent) .setTypeDefinition((XSDSimpleTypeDefinition) globalTypeDef);
protected XSDAttributeDeclaration buildGlobalAttribute(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature) { XSDAttributeDeclaration xsdAttributeDeclaration = XSDFactory.eINSTANCE.createXSDAttributeDeclaration(); xsdAttributeDeclaration.setName(extendedMetaData.getName(eStructuralFeature)); XSDSimpleTypeDefinition xsdSimpleTypeDefinition = xsdSchema.resolveSimpleTypeDefinitionURI(getURI(eStructuralFeature.getEType())); handleImport(xsdSchema, xsdSimpleTypeDefinition); xsdAttributeDeclaration.setTypeDefinition(xsdSimpleTypeDefinition); String defaultValue = eStructuralFeature.getDefaultValueLiteral(); if (defaultValue != null) { xsdAttributeDeclaration.setConstraint(XSDConstraint.DEFAULT_LITERAL); xsdAttributeDeclaration.setLexicalValue(defaultValue); } xsdSchema.getContents().add(xsdAttributeDeclaration); map(xsdAttributeDeclaration, eStructuralFeature); if (eStructuralFeature.eIsSet(EcorePackage.Literals.ETYPED_ELEMENT__EGENERIC_TYPE)) { createEcoreAnnotation(xsdAttributeDeclaration, "type", getGenericType(xsdSchema, eStructuralFeature.getEGenericType())); } buildAnnotations(xsdAttributeDeclaration, eStructuralFeature); return xsdAttributeDeclaration; }
attribute.setTypeDefinition(xsdComplexTypeDefinition.getSchema().getSchemaForSchema().resolveSimpleTypeDefinition("string")); //$NON-NLS-1$ attribute.setTypeDefinition(parent.getSchema().getSchemaForSchema().resolveSimpleTypeDefinition("string")); //$NON-NLS-1$
protected XSDAttributeDeclaration buildGlobalAttribute(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature) { XSDAttributeDeclaration xsdAttributeDeclaration = XSDFactory.eINSTANCE.createXSDAttributeDeclaration(); xsdAttributeDeclaration.setName(extendedMetaData.getName(eStructuralFeature)); XSDSimpleTypeDefinition xsdSimpleTypeDefinition = xsdSchema.resolveSimpleTypeDefinitionURI(getURI(eStructuralFeature.getEType())); handleImport(xsdSchema, xsdSimpleTypeDefinition); xsdAttributeDeclaration.setTypeDefinition(xsdSimpleTypeDefinition); String defaultValue = eStructuralFeature.getDefaultValueLiteral(); if (defaultValue != null) { xsdAttributeDeclaration.setConstraint(XSDConstraint.DEFAULT_LITERAL); xsdAttributeDeclaration.setLexicalValue(transformDefaultValue(xsdAttributeDeclaration.getTypeDefinition(), defaultValue)); } xsdSchema.getContents().add(xsdAttributeDeclaration); map(xsdAttributeDeclaration, eStructuralFeature); if (eStructuralFeature.eIsSet(EcorePackage.Literals.ETYPED_ELEMENT__EGENERIC_TYPE)) { createEcoreAnnotation(xsdAttributeDeclaration, "type", getGenericType(xsdSchema, eStructuralFeature.getEGenericType())); } buildAnnotations(xsdAttributeDeclaration, eStructuralFeature); return xsdAttributeDeclaration; }