/**
   * ************************************************************************ Get the database path
   * for this project
   *
   * @return ***********************************************************************
   */
  @SuppressWarnings("unchecked")
  public String getDatabasePath() {
    HashMap<QualifiedName, Object> properties = null;
    try {
      properties = new HashMap<QualifiedName, Object>(m_project.getPersistentProperties());
    } catch (CoreException e1) {
      System.err.println(
          "Cannot retrieve persistent properties for project " + m_project.getName());
      return null;
    }
    if (!properties.containsKey(ProjectDatabaseProperty.GCS_DATABASE.getKey())) {
      restoreProjectProperties(ProjectDatabaseProperty.GCS_DATABASE);
    }

    try {
      String path = m_project.getPersistentProperty(ProjectDatabaseProperty.GCS_DATABASE.getKey());
      // Relative path
      boolean absolute = true;
      if (!path.isEmpty()) {
        absolute = new File(path).isAbsolute();
      }
      if (!path.isEmpty() && !absolute) {
        IPath projAbsolute = m_project.getLocation();
        String projectPath = projAbsolute.toFile().getAbsolutePath();
        path = projectPath + File.separator + path;
      }
      return path;
    } catch (CoreException e) {
      return null;
    }
  }
 /**
  * ************************************************************************ Change the database to
  * load when a resource from this project is opened
  *
  * @param project
  * @param newDBPath ***********************************************************************
  */
 public void setDatabasePath(String newDBPath) {
   try {
     // If path is inside the project directory, then change
     String projectPath = m_project.getLocation().toFile().getAbsolutePath();
     if (newDBPath.startsWith(projectPath)) {
       // + 1 for removing a File.separator
       newDBPath = newDBPath.substring(projectPath.length() + 1);
     }
     m_project.setPersistentProperty(ProjectDatabaseProperty.GCS_DATABASE.getKey(), newDBPath);
   } catch (CoreException e) {
     System.err.println("Cannot set property " + ProjectDatabaseProperty.GCS_DATABASE.getKey());
   }
 }