public String getDescription(ProjectId projectId) { ProjectInstance pi = getProjectInstance(projectId); String result = pi.getDescription(); if (result == null) { return ""; } return result; }
private static ProjectDetails createProjectDetailsFromProjectInstance( ProjectInstance projectInstance) { final ProjectId projectId = ProjectId.get(projectInstance.getName()); final String description = projectInstance.getDescription(); final User projectOwner = projectInstance.getOwner(); final UserId ownerId = projectOwner != null ? UserId.getUserId(projectOwner.getName()) : UserId.getGuest(); final boolean inTrash = isInTrash(projectInstance); final Slot displayNameSlot = projectInstance.getProtegeInstance().getKnowledgeBase().getSlot("displayName"); final String displayName = (String) projectInstance.getProtegeInstance().getOwnSlotValue(displayNameSlot); return new ProjectDetails(projectId, displayName, description, ownerId, inTrash); }