Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vospace-rest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VOSpace INAF
vospace-rest
Commits
958e9a3e
Commit
958e9a3e
authored
3 years ago
by
Sonia Zorba
Browse files
Options
Downloads
Patches
Plain Diff
Removed unused code
parent
2b002860
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/it/inaf/oats/vospace/persistence/NodeDAO.java
+0
-19
0 additions, 19 deletions
src/main/java/it/inaf/oats/vospace/persistence/NodeDAO.java
src/test/java/it/inaf/oats/vospace/persistence/NodeDAOTest.java
+16
-26
16 additions, 26 deletions
...st/java/it/inaf/oats/vospace/persistence/NodeDAOTest.java
with
16 additions
and
45 deletions
src/main/java/it/inaf/oats/vospace/persistence/NodeDAO.java
+
0
−
19
View file @
958e9a3e
...
@@ -140,25 +140,6 @@ public class NodeDAO {
...
@@ -140,25 +140,6 @@ public class NodeDAO {
return
Optional
.
of
(
node
);
return
Optional
.
of
(
node
);
}
}
public
List
<
String
>
listNodeChildren
(
String
path
)
{
String
sql
=
"SELECT n.name\n"
+
"FROM node n\n"
+
"WHERE n.path ~ ('*.' || id_from_vos_path(?) || '.*{1}')::lquery\n"
+
"ORDER BY n.path"
;
List
<
String
>
childrenNames
=
jdbcTemplate
.
query
(
conn
->
{
PreparedStatement
ps
=
conn
.
prepareStatement
(
sql
);
int
i
=
0
;
ps
.
setString
(++
i
,
path
);
return
ps
;
},
(
row
,
index
)
->
{
return
row
.
getString
(
"name"
);
});
return
childrenNames
;
}
public
Node
setNode
(
Node
newNode
)
{
public
Node
setNode
(
Node
newNode
)
{
return
setNode
(
newNode
,
false
);
return
setNode
(
newNode
,
false
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/test/java/it/inaf/oats/vospace/persistence/NodeDAOTest.java
+
16
−
26
View file @
958e9a3e
...
@@ -100,16 +100,6 @@ public class NodeDAOTest {
...
@@ -100,16 +100,6 @@ public class NodeDAOTest {
assertEquals
(
bTime
,
NodeProperties
.
getNodePropertyByURI
(
root
.
getNodes
().
get
(
0
),
NodeProperties
.
DATE_URI
));
assertEquals
(
bTime
,
NodeProperties
.
getNodePropertyByURI
(
root
.
getNodes
().
get
(
0
),
NodeProperties
.
DATE_URI
));
}
}
@Test
public
void
testListNodeChildren
()
{
assertTrue
(
dao
.
listNodeChildren
(
"/test4"
).
isEmpty
());
List
<
String
>
children
=
dao
.
listNodeChildren
(
"/test2"
);
assertFalse
(
children
.
isEmpty
());
assertTrue
(
children
.
size
()
==
2
);
assertTrue
(
children
.
containsAll
(
List
.
of
(
"f4"
,
"f5"
)));
}
@Test
@Test
public
void
testGetQuotaAndMD5
()
{
public
void
testGetQuotaAndMD5
()
{
...
...
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