Package net.bioclipse.managers
Class UIManager
java.lang.Object
net.bioclipse.managers.UIManager
- All Implemented Interfaces:
IBactingManager
,net.bioclipse.managers.business.IBioclipseManager
Bioclipse manager providing core functionality, focusing on
the Bioclipse workspace and user interface interaction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Appends the new content to write to a new or existing file in the Bioclipse workspace.void
append
(String path, InputStream toWrite) Appends the new content to write to a new or existing file in the Bioclipse workspace.void
Appends the new content to write to a new or existing file in the Bioclipse workspace.doi()
Lists the DOIs of the articles associated to this manager.boolean
fileExists
(String file) Determines if the given file exists in the Bioclipse workspace.Creates a new file in the Bioclipse workspace.Creates a new file in the Bioclipse workspace with the given contentnewProject
(String name) Creates a new project in the Bioclipse workspace.void
Not currently implemented.Read a file content line by line into memory.String[]
readFileIntoArray
(String path) Read a file line by line into memory.void
Deletes the file in the Bioclipse workspace.Creates a new empty file in the Bioclipse workspace or empties the existing file.
-
Constructor Details
-
UIManager
Creates a newUIManager
.- Parameters:
workspaceRoot
- location of the workspace, e.g. "."
-
-
Method Details
-
fileExists
Determines if the given file exists in the Bioclipse workspace.- Parameters:
file
- the location of the file in the Bioclipse workspace- Returns:
- true, if the file exists
-
newFile
Creates a new file in the Bioclipse workspace.- Parameters:
path
- the location of the file in the Bioclipse workspace- Returns:
- the location of the file in the Bioclipse workspace
- Throws:
IOException
- when the file could not be created
-
renewFile
Creates a new empty file in the Bioclipse workspace or empties the existing file.- Parameters:
file
- the location of the file in the Bioclipse workspace- Returns:
- the location of the file in the Bioclipse workspace
- Throws:
IOException
- when the file could not be created
-
newFile
Creates a new file in the Bioclipse workspace with the given content- Parameters:
path
- the location of the file in the Bioclipse workspacecontent
- the content of the new file- Returns:
- the location of the file in the Bioclipse workspace
- Throws:
IOException
- when the file could not be created
-
remove
Deletes the file in the Bioclipse workspace.- Parameters:
path
- the location of the file in the Bioclipse workspace
-
append
Appends the new content to write to a new or existing file in the Bioclipse workspace.- Parameters:
path
- the location of the file in the Bioclipse workspacetoWrite
- the content to append to the new file
-
append
Appends the new content to write to a new or existing file in the Bioclipse workspace.- Parameters:
path
- the location of the file in the Bioclipse workspacetoWrite
- the content to append to the new file
-
append
Appends the new content to write to a new or existing file in the Bioclipse workspace.- Parameters:
path
- the location of the file in the Bioclipse workspacetoWrite
- the content to append to the new file
-
open
Not currently implemented.- Parameters:
object
- the object to be opened in Bioclipse
-
newProject
Creates a new project in the Bioclipse workspace.- Parameters:
name
- the location of the project in the Bioclipse workspace- Returns:
- the location of the project in the Bioclipse workspace
- Throws:
IOException
- when the project could not be created
-
readFile
Read a file content line by line into memory.- Parameters:
path
- IFile to read from- Returns:
- String with contents
- Throws:
net.bioclipse.core.business.BioclipseException
- when the file does not exist or could not be opened or read
-
readFileIntoArray
public String[] readFileIntoArray(String path) throws net.bioclipse.core.business.BioclipseException Read a file line by line into memory.- Parameters:
path
- IFile to read from- Returns:
- String[] with one entry per line
- Throws:
net.bioclipse.core.business.BioclipseException
- when the file does not exist or could not be opened or read
-
getManagerName
- Specified by:
getManagerName
in interfacenet.bioclipse.managers.business.IBioclipseManager
-
doi
Description copied from interface:IBactingManager
Lists the DOIs of the articles associated to this manager.- Specified by:
doi
in interfaceIBactingManager
- Returns:
- a
List
of String with DOIs
-