This commit is contained in:
Lucio Lelii 2018-10-15 17:44:56 +00:00
parent 04e5606822
commit 97253ba328
4 changed files with 8 additions and 7 deletions

View File

@ -3,13 +3,13 @@ package org.gcube.common.storagehub.model;
import java.util.HashMap;
import java.util.Map;
import org.gcube.common.storagehub.model.annotations.MapAttribute;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.gcube.common.storagehub.model.annotations.MapAttribute;
@Getter
@Setter
@NoArgsConstructor

View File

@ -10,5 +10,5 @@ import java.lang.annotation.Target;
public @interface Attribute {
String value();
boolean isReadOnly() default true;
boolean isReadOnly() default false;
}

View File

@ -32,6 +32,6 @@ public class GCubeItem extends Item{
boolean shared;
@NodeAttribute(NodeConstants.PROPERTY_NAME)
Metadata property;
Metadata property = new Metadata();
}

View File

@ -68,12 +68,13 @@ public class Item {
@NodeAttribute(value=ACCOUNTING_NAME, isReadOnly=true)
Accounting accounting;
@NodeAttribute(value=METADATA_NAME, isReadOnly=false)
Metadata propertyMap;
@NodeAttribute(value=METADATA_NAME)
Metadata propertyMap = new Metadata();
public String getOwner() {
if (owner!=null) return owner;
else return ownerNode.getUserName();
else if (ownerNode!=null) ownerNode.getUserName();
return null;
}
}