public class Project extends Object
Constructor and Description |
---|
Project(File projectDir,
Component mainFrame)
Create a Project instance to represent an existing project
|
Project(File projectDir,
Component mainFrame,
boolean create)
Create a Project instance to represent an existing project
|
Modifier and Type | Method and Description |
---|---|
void |
addMission(String missionPath)
Copy a mission file from another location to this project mission
directory.
|
static File |
chooseNewProjectPath(Component parent,
String startingDirPath) |
static File |
chooseProjectDirectory(Component parentComponent,
String startingDirPath)
Provide file chooser to select project directory
|
void |
closeProject() |
void |
deleteProjectConfiguration()
Used before restoring default configuration files
|
protected void |
doCheckUpdatedConfigurationTemplates()
This will replace the project configuration files with template version configuration files
|
String[] |
getAllMissions()
Just return a list of the missions directory
|
File |
getCevarsDirectory() |
File |
getConfigDirectory() |
String |
getDescription() |
String[] |
getGeoOrigin() |
File |
getImagesDirectory() |
String |
getLocaleImageryPath() |
String[] |
getMissionOffset() |
File |
getMissionsDirectory() |
String[] |
getOpenMissions() |
File |
getProjectDirectory() |
File |
getProjectFile() |
File |
getResultsDirectory() |
File |
getX3dDirectory() |
static boolean |
isAuvwProject(File f)
Report if directory f is an AUV Workbench Project
|
boolean |
isMissionOpened(String missionPath)
Indicate a mission is already open
|
static File |
newProjectFromArchive(Component parent,
String startingDirPath) |
static File |
openArchiveDirectory(Component parent,
String startingDirPath)
Returns a pointer to a valid project folder on the local machine for
compressing
|
void |
setDescription(String newDescription) |
void |
setGeoOrigin(String han,
String lat,
String lon,
String scale,
String wrl) |
void |
setLocalImageryPath(String path) |
void |
setMissionOffset(String north,
String east,
String units) |
void |
setMissionOpened(String missionName,
boolean add)
Determines whether an openmission element should be written to the
auvwProject.xml file
|
public static final String OPENMISSION_ELEMENT
public static final String DESCRIPTION_ELEMENT
public static final String X3D_ELEMENT
public static final String LOCALEIMAGERY_ELEMENT
public static final String CONFIGURATION_ELEMENT
public static final String GEOLOCATION_ELEMENT
public static final String GEO_UNITS_ATTRIBUTE
public static final String GEO_HANDLE_ELEMENT
public static final String GEO_LAT_ELEMENT
public static final String GEO_LON_ELEMENT
public static final String GEO_SCALE_ELEMENT
public static final String MISSIONOFFSET_ELEMENT
public static final String MO_UNITS_ATTRIBUTE
public static final String MO_UNITS_ATTRIBUTE_DEFAULT
public static final String NORTHING_ELEMENT
public static final String EASTING_ELEMENT
public static final String MISSIONS_DIR
public static final String X3D_DIR
public static final String CONFIGURATION_DIR
public static final String RESULTS_DIR
public static final String IMAGES_DIR
public static final String CEVARS_DIR
public static final String PROJECT_FILENAME
public static final String PROJECT_COMMONS_CONFIGURATION_FILENAME
public Project(File projectDir, Component mainFrame) throws Exception
projectDir
- base directorymainFrame
- the parent UI FrameException
- if projectDir does not exist or project is missing some piecespublic Project(File projectDir, Component mainFrame, boolean create) throws Exception
projectDir
- base directorymainFrame
- the parent UI Framecreate
- if true, no exceptions if project structure incompleteException
- if create == false and projectDir faulty or projectDir exists and is not a directorypublic void closeProject()
public static boolean isAuvwProject(File f)
f
- the project directory to testauv/AuvWorkbench/configuration
public File getProjectDirectory()
public File getMissionsDirectory()
public File getImagesDirectory()
public File getResultsDirectory()
public File getX3dDirectory()
public File getCevarsDirectory()
public File getConfigDirectory()
public File getProjectFile()
public String[] getAllMissions()
public String[] getOpenMissions()
public boolean isMissionOpened(String missionPath)
missionPath
- the path to the missionpublic void setMissionOpened(String missionName, boolean add)
missionName
- the mission to make a determination onadd
- true if addition of an openmission element is desiredpublic void addMission(String missionPath)
missionPath
- the path of the mission to copypublic String[] getMissionOffset()
public String[] getGeoOrigin()
public void setLocalImageryPath(String path)
public String getLocaleImageryPath()
protected final void doCheckUpdatedConfigurationTemplates()
public void deleteProjectConfiguration()
public static File chooseNewProjectPath(Component parent, String startingDirPath)
public static File chooseProjectDirectory(Component parentComponent, String startingDirPath)
parentComponent
- the component parent for a JOptionPanestartingDirPath
- a path to start looking from in dir chooserpublic static File newProjectFromArchive(Component parent, String startingDirPath)
parent
- the parent UI for this JFileChooserstartingDirPath
- the directory to begin search for .zip archivepublic static File openArchiveDirectory(Component parent, String startingDirPath)
parent
- the Swing parent component to referencestartingDirPath
- the path to the current project directorypublic String getDescription()
public void setDescription(String newDescription)
newDescription
- the description to set for this project