Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vospacebackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sara Bertocco
vospacebackend
Commits
40dd5f4a
Commit
40dd5f4a
authored
8 years ago
by
Sara Bertocco
Browse files
Options
Downloads
Patches
Plain Diff
New working version after Victoria trip - new version more generic
parent
a0a8ae7b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/it/inaf/oats/vospacebackend/implementation/FileRecord.java
+95
-38
95 additions, 38 deletions
...t/inaf/oats/vospacebackend/implementation/FileRecord.java
with
95 additions
and
38 deletions
src/main/java/it/inaf/oats/vospacebackend/implementation/FileRecord.java
+
95
−
38
View file @
40dd5f4a
/**_____________________________________________________________________________
/**
* _____________________________________________________________________________
*
*
* OATS - INAF
* OATS - INAF
* Osservatorio Astronomico di Tireste - Istituto Nazionale di Astrofisica
* Osservatorio Astronomico di Tireste - Istituto Nazionale di Astrofisica
...
@@ -21,60 +22,116 @@
...
@@ -21,60 +22,116 @@
* along with this program; if not, write to the Free Software Foundation, Inc.,
* along with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* _____________________________________________________________________________
* _____________________________________________________________________________
**/
*
*/
package
it.inaf.oats.vospacebackend.implementation
;
package
it.inaf.oats.vospacebackend.implementation
;
import
java.util.HashMap
;
import
java.util.HashMap
;
public
class
FileRecord
{
public
class
FileRecord
{
private
static
final
String
stored_file_name
=
"stored_file_name"
;
//private static final String stored_file_name = "stored_file_name";
private
static
final
String
md5_checksum
=
"md5_checksum"
;
//private static final String md5_checksum = "md5_checksum";
private
static
final
String
relative_path
=
"relative_path"
;
//private static final String relative_path = "relative_path";
private
static
final
String
nodeID
=
"nodeID"
;
//private static final String nodeID = "nodeID";
//private static final String operationSuccessful = "ifSuccessful";
private
HashMap
content
=
new
HashMap
<
String
,
String
>();
private
String
stored_file_name_value
;
private
String
md5_checksum_value
;
private
String
relative_path_value
;
private
String
nodeID_value
;
private
boolean
operationSuccessful_value
;
public
FileRecord
()
{
public
FileRecord
()
{
content
.
put
(
stored_file_name
,
""
);
stored_file_name_value
=
""
;
content
.
put
(
md5_checksum
,
""
);
md5_checksum_value
=
""
;
content
.
put
(
relative_path
,
""
);
relative_path_value
=
""
;
content
.
put
(
nodeID
,
""
);
nodeID_value
=
""
;
operationSuccessful_value
=
false
;
}
public
void
setFileRecord
(
String
stored_f_name
,
String
md5Checksum
,
String
relativePath
,
String
nodeId
,
boolean
ifSuccessful
)
{
this
.
stored_file_name_value
=
stored_f_name
;
this
.
md5_checksum_value
=
md5Checksum
;
this
.
relative_path_value
=
relativePath
;
this
.
nodeID_value
=
nodeId
;
this
.
operationSuccessful_value
=
ifSuccessful
;
}
public
void
setStoredfileName
(
String
storedfName
)
{
this
.
stored_file_name_value
=
storedfName
;
}
public
String
getStoredfileName
()
{
return
this
.
stored_file_name_value
;
}
public
void
setMD5Checksum
(
String
md5checksum
)
{
this
.
md5_checksum_value
=
md5checksum
;
}
}
public
FileRecord
(
String
stored_f_name
,
String
md5Checksum
,
String
relativePath
)
{
public
String
getMD5Checksum
(
)
{
content
.
put
(
stored_file_name
,
stored_f_name
);
return
this
.
md5_checksum_value
;
content
.
put
(
md5_checksum
,
md5Checksum
);
content
.
put
(
relative_path
,
relativePath
);
}
}
public
FileRecord
(
String
stored_f_name
,
String
md5Checksum
,
String
relativePath
,
String
nodeIDStr
)
{
public
void
setRelativePath
(
String
relativePath
)
{
content
.
put
(
stored_file_name
,
stored_f_name
);
this
.
relative_path_value
=
relativePath
;
content
.
put
(
md5_checksum
,
md5Checksum
);
content
.
put
(
relative_path
,
relativePath
);
content
.
put
(
nodeID
,
nodeIDStr
);
}
}
public
HashMap
getFileRecord
()
{
public
String
getRelativePath
()
{
return
content
;
return
this
.
relative_path_value
;
}
}
public
void
set
FileRecord
(
String
stored_f_name
,
String
md5Checksum
,
String
relativePath
)
{
public
void
set
NodeId
(
String
nodeId
)
{
content
.
put
(
stored_file_name
,
stored_f_name
);
this
.
nodeID_value
=
nodeId
;
content
.
put
(
md5_checksum
,
md5Checksum
);
content
.
put
(
relative_path
,
relativePath
);
}
}
public
String
getNodeId
()
{
return
this
.
nodeID_value
;
}
}
public
boolean
getIfOperationSuccessful
()
{
return
this
.
operationSuccessful_value
;
}
public
void
setIfOperationSuccessful
(
boolean
ifSuccess
)
{
this
.
operationSuccessful_value
=
ifSuccess
;
}
public
String
toString
()
{
String
res
=
"FileRecord: \nstored_file_name = "
+
getStoredfileName
()
+
"\n"
+
"md5_checksum = "
+
getMD5Checksum
()
+
"\n"
+
"relative_path = "
+
getRelativePath
()
+
"\n"
+
"nodeID = "
+
getNodeId
()
+
"\n"
+
"operationSuccessful = "
+
getIfOperationSuccessful
()
+
"\n"
;
return
res
;
}
}
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