Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
91f24a2b
Commit
91f24a2b
authored
17 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
LMS-103
add Javadoc SVN: 2137
parent
897cc265
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bds/source/java/ch/systemsx/cisd/bds/Utilities.java
+22
-1
22 additions, 1 deletion
bds/source/java/ch/systemsx/cisd/bds/Utilities.java
bds/source/java/ch/systemsx/cisd/bds/Version.java
+3
-0
3 additions, 0 deletions
bds/source/java/ch/systemsx/cisd/bds/Version.java
with
25 additions
and
1 deletion
bds/source/java/ch/systemsx/cisd/bds/Utilities.java
+
22
−
1
View file @
91f24a2b
...
...
@@ -22,12 +22,19 @@ import ch.systemsx.cisd.bds.storage.INode;
import
ch.systemsx.cisd.common.exceptions.UserFailureException
;
/**
*
*
Storage utility methods.
*
* @author Franz-Josef Elmer
*/
public
class
Utilities
{
/**
* Returns a subdirectory from the specified directory.
*
* @param directory Parent directory of the requested directory.
* @param name Name of the requested directory.
* @throws UserFailureException if requested directory not found.
*/
public
static
IDirectory
getSubDirectory
(
IDirectory
directory
,
String
name
)
{
INode
node
=
directory
.
getNode
(
name
);
...
...
@@ -38,11 +45,21 @@ public class Utilities
return
(
IDirectory
)
node
;
}
/**
* Convenient short cut for <code>{@link #getString(IDirectory, String)}.trim()</code>.
*/
public
static
String
getTrimmedString
(
IDirectory
directory
,
String
name
)
{
return
getString
(
directory
,
name
).
trim
();
}
/**
* Returns the string content of a file from the specified directory.
*
* @param directory Directory of the requested file.
* @param name Name of the file.
* @throws UserFailureException if the requested file does not exist.
*/
public
static
String
getString
(
IDirectory
directory
,
String
name
)
{
INode
node
=
directory
.
getNode
(
name
);
...
...
@@ -58,4 +75,8 @@ public class Utilities
return
file
.
getStringContent
();
}
private
Utilities
()
{
}
}
This diff is collapsed.
Click to expand it.
bds/source/java/ch/systemsx/cisd/bds/Version.java
+
3
−
0
View file @
91f24a2b
...
...
@@ -30,6 +30,9 @@ public final class Version
private
static
final
String
MAJOR
=
"major"
;
private
static
final
String
MINOR
=
"minor"
;
/**
* Loads the version from the specified directory.
*/
public
static
Version
loadFrom
(
IDirectory
directory
)
{
IDirectory
versionFolder
=
Utilities
.
getSubDirectory
(
directory
,
VERSION
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment