use of org.eclipse.vorto.core.api.model.BuilderUtils.EnumBuilder in project vorto by eclipse.
the class ModelContentToEcoreConverter method convertEnum.
private org.eclipse.vorto.core.api.model.datatype.Enum convertEnum(EnumModel model) {
EnumBuilder builder = BuilderUtils.newEnum(new ModelId(ModelType.Datatype, model.getId().getName(), model.getId().getNamespace(), model.getId().getVersion()));
builder.withCategory(model.getCategory());
builder.withDescription(model.getDescription());
builder.withDisplayName(model.getDisplayName());
builder.withVortolang(model.getVortolang());
for (org.eclipse.vorto.model.EnumLiteral literal : model.getLiterals()) {
builder.withLiteral(literal.getName(), literal.getDescription());
}
return builder.build();
}
Aggregations