ref 11720: DataMiner - Update to StorageHUB
https://support.d4science.org/issues/11720 Updated to support StorageHub Metadata git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@174944 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
55164fcb26
commit
5958fddd50
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/data-miner-manager-1.9.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/data-miner-manager-1.9.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/data-miner-manager-1.9.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/data-miner-manager-1.9.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -34,5 +34,5 @@
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="output" path="target/data-miner-manager-1.9.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/data-miner-manager-1.9.1-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
<Changeset component="${groupId}.${artifactId}.1-9-1" date="2018-12-13">
|
||||||
|
<Change>Updated to support StorageHub properties [ticket #11720]
|
||||||
|
</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="${groupId}.${artifactId}.1-9-0" date="2018-10-01">
|
<Changeset component="${groupId}.${artifactId}.1-9-0" date="2018-10-01">
|
||||||
<Change>Updated download item to support StorageHub[ticket #11720]
|
<Change>Updated download item to support StorageHub[ticket #11720]
|
||||||
</Change>
|
</Change>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>data-miner-manager</artifactId>
|
<artifactId>data-miner-manager</artifactId>
|
||||||
<version>1.9.0-SNAPSHOT</version>
|
<version>1.9.1-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<name>data-miner-manager</name>
|
<name>data-miner-manager</name>
|
||||||
|
|
|
@ -48,9 +48,9 @@ public class StorageUtil {
|
||||||
try {
|
try {
|
||||||
StorageHubClient shc = new StorageHubClient();
|
StorageHubClient shc = new StorageHubClient();
|
||||||
Item item = shc.open(itemId).asItem().get();
|
Item item = shc.open(itemId).asItem().get();
|
||||||
Metadata metadata = item.getPropertyMap();
|
Metadata metadata = item.getMetadata();
|
||||||
Map<String, String> itemMap = new HashMap<String, String>();
|
Map<String, String> itemMap = new HashMap<String, String>();
|
||||||
Map<String, Object> metadataMap = metadata.getValues();
|
Map<String, Object> metadataMap = metadata.getMap();
|
||||||
for (String key : metadataMap.keySet()) {
|
for (String key : metadataMap.keySet()) {
|
||||||
String s = String.valueOf(metadataMap.get(key));
|
String s = String.valueOf(metadataMap.get(key));
|
||||||
itemMap.put(key, s);
|
itemMap.put(key, s);
|
||||||
|
|
Loading…
Reference in New Issue