Search in sources :

Example 1 with TopLevelSimpleType

use of org.mule.runtime.module.extension.internal.capability.xml.schema.model.TopLevelSimpleType in project mule by mulesoft.

the class SchemaBuilder method registerEnum.

private void registerEnum(Schema schema, StringType enumType) {
    TopLevelSimpleType enumSimpleType = new TopLevelSimpleType();
    enumSimpleType.setName(sanitizeName(getId(enumType)) + SchemaConstants.ENUM_TYPE_SUFFIX);
    Union union = new Union();
    union.getSimpleType().add(createEnumSimpleType(enumType));
    union.getSimpleType().add(createExpressionAndPropertyPlaceHolderSimpleType());
    enumSimpleType.setUnion(union);
    schema.getSimpleTypeOrComplexTypeOrGroup().add(enumSimpleType);
}
Also used : TopLevelSimpleType(org.mule.runtime.module.extension.internal.capability.xml.schema.model.TopLevelSimpleType) Union(org.mule.runtime.module.extension.internal.capability.xml.schema.model.Union)

Aggregations

TopLevelSimpleType (org.mule.runtime.module.extension.internal.capability.xml.schema.model.TopLevelSimpleType)1 Union (org.mule.runtime.module.extension.internal.capability.xml.schema.model.Union)1