/** * Adds a new project to the metaproject. This sets up the name of the project and the description * of the project in the metaproject. (Location is not set/used by this implementation - not all * implementations use pprj files anymore). * * @param newProjectSettings The info about the new project */ private void addProjectToMetaProject(ProjectId projectId, NewProjectSettings newProjectSettings) { MetaProject mp = getMetaProject(); ProjectInstance pi = mp.createProject(projectId.getId()); pi.setDescription(newProjectSettings.getProjectDescription()); final Instance protegeInstance = pi.getProtegeInstance(); final KnowledgeBase kb = protegeInstance.getKnowledgeBase(); final Slot displayNameSlot = kb.getSlot("displayName"); protegeInstance.setOwnSlotValue(displayNameSlot, newProjectSettings.getDisplayName()); User user = mp.getUser(newProjectSettings.getProjectOwner().getUserName()); pi.setOwner(user); OWLAPIMetaProjectStore.getStore().saveMetaProject(this); }
public void setDescription(ProjectId projectId, String description) { ProjectInstance pi = getProjectInstance(projectId); pi.setDescription(description); }