Search in sources :

Example 6 with EditorAttributeIdentifier

use of org.molgenis.metadata.manager.model.EditorAttributeIdentifier in project molgenis by molgenis.

the class EntityTypeParentMapper method toEditorEntityTypeParent.

EditorEntityTypeParent toEditorEntityTypeParent(EntityType entityType) {
    if (entityType == null) {
        return null;
    }
    String id = entityType.getId();
    String label = entityType.getLabel();
    ImmutableList<EditorAttributeIdentifier> attributes = attributeReferenceMapper.toEditorAttributeIdentifiers(entityType.getOwnAllAttributes());
    EditorEntityTypeParent parent = toEditorEntityTypeParent(entityType.getExtends());
    return EditorEntityTypeParent.create(id, label, attributes, parent);
}
Also used : EditorAttributeIdentifier(org.molgenis.metadata.manager.model.EditorAttributeIdentifier) EditorEntityTypeParent(org.molgenis.metadata.manager.model.EditorEntityTypeParent)

Aggregations

EditorAttributeIdentifier (org.molgenis.metadata.manager.model.EditorAttributeIdentifier)6 Test (org.testng.annotations.Test)5 Attribute (org.molgenis.data.meta.model.Attribute)4 EntityType (org.molgenis.data.meta.model.EntityType)4 EditorEntityTypeParent (org.molgenis.metadata.manager.model.EditorEntityTypeParent)3 EditorEntityTypeIdentifier (org.molgenis.metadata.manager.model.EditorEntityTypeIdentifier)2