Examples of ProjectManager


Examples of de.FeatureModellingTool.ProjectManager.ProjectManager

    public void propertyChange(PropertyChangeEvent e) {
      String propertyName = e.getPropertyName();

      if (de.FeatureModellingTool.ProjectManager.ConstantDefinition.PROJECT_OPENED
          .equals(propertyName)) {
        ProjectManager pm = (ProjectManager) e.getNewValue();

        Project currentProject = (Project) projectManager
            .getContext()
            .getValue(
                de.FeatureModellingTool.ProjectManager.ConstantDefinition.PROJECT);
View Full Code Here

Examples of edu.stanford.smi.protege.ui.ProjectManager

    // show main frame
    frame.setVisible(true);

    // load project
    //get manager
    ProjectManager manager = ProjectManager.getProjectManager();
    // try to close existing project if it works then continue
    if (manager.closeProjectRequest()) {
      if(ont != null && ont instanceof POntology){
        try{
          ont.load();
          manager.setCurrentProject(((POntology)ont).getModel().getProject(),false);
        }catch(IOntologyException ex){
          ex.printStackTrace();
        }
      }
    }
View Full Code Here

Examples of edu.stanford.smi.protege.ui.ProjectManager

    // show main frame
    frame.setVisible(true);

    // load project
    //get manager
    ProjectManager manager = ProjectManager.getProjectManager();
    // try to close existing project if it works then continue
    if (manager.closeProjectRequest()) {
      if(ont != null && ont instanceof POntology){
        try{
          ont.load();
          manager.setCurrentProject(((POntology)ont).getModel().getProject(),false);
        }catch(IOntologyException ex){
          ex.printStackTrace();
        }
      }
    }
View Full Code Here

Examples of edu.uga.galileo.voci.model.ProjectManager

        // editing permission for each, and attach that data to the
        // search results
        if ((forwardRequestTo.indexOf("/do/") != -1)
            && (results != null)) {
          WorkflowManager wm = new WorkflowManager();
          ProjectManager pm = new ProjectManager();
          User user = (User) request.getSession()
              .getAttribute("user");
          // if user is null, stick with the default that none of
          // the results is editable
          if (user != null) {
            SearchResult result;
            boolean includeExtras = request
                .getParameter("includeExtras") == null ? false
                : true;
            for (int m = results.size() - 1; m >= 0; m--) {
              result = results.get(m);
              try {
                if (wm.canEdit(user, pm.getProjectHandle(result
                    .getProjectId()), ContentType.valueOf(
                    result.getVBO().getType()).getPlural(),
                    result.getVBO().getId())) {
                  result.setUserEditable(true);
                } else if (!includeExtras) {
View Full Code Here

Examples of edu.uga.galileo.voci.model.ProjectManager

    try {
      if ((includeOnly != null) && (includeOnly.size() == 0)) {
        results = new ArrayList<SearchResult>();
      } else {
        results = manager.performBasicQuery(query, searchType,
            (new ProjectManager()).getProjectID(command
                .getProject()), activeOnly, allowsZero, true,
            useBlurbFields, includeOnly, username, updateDateStart,
            updateDateEnd);
      }
      if (request.getParameter("ctype") != null) {
View Full Code Here

Examples of edu.uga.galileo.voci.model.ProjectManager

          qualifier = null;
        }

        try {
          int metadataId = MetadataManager.getMetadataId(element,
              qualifier, (new ProjectManager())
                  .getProjectID(command.getProject()),
              contentTypeId);

          if (advancedQuery.length() > 0) {
            advancedQuery.append('|');
          }
          advancedQuery.append(contentTypeLetter);
          advancedQuery.append(metadataId);
          advancedQuery.append(':');
          advancedQuery.append(paramValue.toLowerCase());
        } catch (NoSuchMetadataException e) {
          Logger.warn("Metadata ID couldn't be found to query.", e);
        } catch (NoSuchProjectException e) {
          Logger.warn("Project ID couldn't be found to query.", e);
        }
      }
    }

    // perform the query
    String advancedQueryString = StringUtils
        .undoSpecialCharReplacements(advancedQuery.toString());
    SearchManager manager = new SearchManager();
    List<SearchResult> results = null;
    ArrayList<Integer> includeOnly = processSearchPlugins(request);
    try {
      if ((includeOnly != null) && (includeOnly.size() == 0)) {
        results = new ArrayList<SearchResult>();
      } else {
        results = manager.performAdvancedQuery(advancedQueryString,
            searchType, (new ProjectManager()).getProjectID(command
                .getProject()), contentTypeId, activeOnly,
            allowsZero, true, useBlurbFields, includeOnly,
            username, updateDateStart, updateDateEnd);
      }
      request.getSession().setAttribute("searchResults", results);
View Full Code Here

Examples of edu.uga.galileo.voci.model.ProjectManager

          .getParameterValues("blurbMe");

      ContentType contentType = ContentType.valueOf(Integer
          .parseInt(request.getParameter("ctype")));
      try {
        int projectId = (new ProjectManager()).getProjectID(command
            .getProject());
        for (int m = 0; m < newFieldsToBlurbFrom.length; m++) {
          // strip out the starting "s:" from the advanced search
          // pages
          newFieldsToBlurbFrom[m] = newFieldsToBlurbFrom[m]
View Full Code Here

Examples of edu.uga.galileo.voci.model.ProjectManager

    String[] commandPieces = uri.split("/");
    Command command = new Command(commandPieces[2], commandPieces[3],
        (commandPieces.length > 4 ? commandPieces[4] : null),
        (commandPieces.length > 5 ? ArrayUtils.subset(commandPieces, 5,
            commandPieces.length - 1) : null));
    (new ProjectManager()).setDisplayProject(command);
    if (commandPieces[1].equals("go")) {
      command.setViewCommand(true);
    }

    // any command can be saved in the user's session for later retrieval
View Full Code Here

Examples of edu.uga.galileo.voci.model.ProjectManager

   *            The <code>HttpServletRequest</code> associated with this
   *            request.
   */
  @SuppressWarnings("unchecked")
  private void doProjectSetup(Command command, HttpServletRequest request) {
    ProjectManager pm = new ProjectManager();

    // since project information is regularly required for display,
    // we keep a map of them in the application context so all jsps
    // can reach it. the project servlet will remove any updated
    // project so that it'll be picked up again in the next request.
    HashMap<String, Project> projectMap;
    boolean needsProjectAdded = false;
    if (getServletContext().getAttribute("projectMap") == null) {
      projectMap = new HashMap<String, Project>();
      getServletContext().setAttribute("projectMap", projectMap);
      needsProjectAdded = true;
      Logger.debug("Empty project map added to context.");
    } else {
      projectMap = (HashMap<String, Project>) getServletContext()
          .getAttribute("projectMap");
      Logger.debug("Project map retrieved from context.");
      if (!projectMap.containsKey(command.getProject())) {
        needsProjectAdded = true;
      }
    }

    // add the project if it wasn't found in the map
    if (needsProjectAdded) {
      try {
        projectMap.put(command.getProject(), pm.getProject(command
            .getProject()));
        Logger.debug("'" + command.getProject()
            + "' added to project map");
      } catch (NoSuchProjectException e) {
        // just warn here, b/c the fatal errors will come soon
        // enough if this happens
        Logger.warn("Couldn't get project '" + command.getProject()
            + "'", e);
      }
    }

    // then add any "support project"-related information to the servlet
    // request, listing on those that the user has administrative privileges
    // within
    if (request.getSession().getAttribute("user") != null) {
      User user = (User) request.getSession().getAttribute("user");
      HashMap<String, String> userAdminRoleMap;

      Project project = projectMap.get(command.getProject());
      if (project.getParentId() > 0) {
        // this is a support project, so get the parent project's name
        // and
        // handle for public face linking (LeftHandMenu.jsp)
        try {
          Project parentProject = pm.getProject(pm
              .getProjectHandle(project.getParentId()));
          userAdminRoleMap = user.getAdminRoles().get(
              parentProject.getHandle());
          if ((userAdminRoleMap != null)
              && (userAdminRoleMap.size() > 0)) {
            request.setAttribute("parentProject", parentProject);
          }
        } catch (NoSuchProjectException e) {
          Logger.warn("Couldn't find parent project for display.", e);
        }
      } else {
        // this is a main project, so get any available child projects'
        // names and handles for public face linking
        // (LeftHandMenu.jsp)
        ArrayList<Project> supportProjects = pm
            .getSupportProjects(project);
        if (supportProjects!=null) {
          for (int m = supportProjects.size() - 1; m >= 0; m--) {
            userAdminRoleMap = user.getAdminRoles().get(
                supportProjects.get(m).getHandle());
View Full Code Here

Examples of edu.uga.galileo.voci.model.ProjectManager

  @SuppressWarnings("unchecked")
  public void getItemWrappersForNode(Command command, User user,
      HttpServletRequest request) {
    int projectId;
    try {
      projectId = (new ProjectManager()).getProjectID(command
          .getProject());
    } catch (NoSuchProjectException e) {
      Logger.warn("No project found matching handle "
          + command.getProject(), e);
      return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.