use of org.eclipse.vorto.repository.api.content.EnumModel in project vorto by eclipse.
the class ModelDtoFactory method createResource.
public static EnumModel createResource(Enum model) {
EnumModel resource = new EnumModel(new ModelId(model.getName(), model.getNamespace(), model.getVersion()), ModelType.Datatype);
resource.setDescription(model.getDescription());
resource.setDisplayName(model.getDisplayname());
resource.setReferences(model.getReferences().stream().map(reference -> createModelId(reference)).collect(Collectors.toList()));
resource.setLiterals(model.getEnums().stream().map(p -> createLiteral(p)).collect(Collectors.toList()));
return resource;
}