git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/storagehub-model@167322 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
397add5f3e
commit
aff8ca2030
|
@ -5,6 +5,10 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
|
||||
|
||||
@JsonAutoDetect(fieldVisibility=Visibility.ANY, getterVisibility=Visibility.NONE, isGetterVisibility=Visibility.NONE, setterVisibility=Visibility.NONE)
|
||||
public class Path {
|
||||
|
||||
protected List<String> paths = null;
|
||||
|
@ -21,6 +25,7 @@ public class Path {
|
|||
else return "/"+paths.stream().collect(Collectors.joining("/"))+"/";
|
||||
}
|
||||
|
||||
|
||||
public String getLastDirName(){
|
||||
return paths.get(paths.size()-1);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@ public class Before implements Expression<Boolean> {
|
|||
private SearchableField<Calendar> searchableField;
|
||||
private Calendar value;
|
||||
|
||||
protected Before() {}
|
||||
|
||||
public Before(SearchableField<Calendar> searchableField, Calendar value) {
|
||||
super();
|
||||
this.searchableField = searchableField;
|
||||
|
|
|
@ -14,7 +14,9 @@ public class And implements Expression<Boolean>{
|
|||
protected And() {}
|
||||
|
||||
public And(Expression<Boolean> first , Expression<Boolean> second , Expression<Boolean> ... others ) {
|
||||
expressions = Arrays.asList(first, second);
|
||||
expressions = new ArrayList<>(2);
|
||||
expressions.add(first);
|
||||
expressions.add(second);
|
||||
if (others !=null && others.length>0)
|
||||
expressions.addAll(Arrays.asList(others));
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ public class ISDescendant implements Expression<Boolean>{
|
|||
|
||||
private Path path;
|
||||
|
||||
protected ISDescendant() {}
|
||||
|
||||
public ISDescendant(Path path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,8 @@ public class Or implements Expression<Boolean>{
|
|||
|
||||
List<Expression<Boolean>> expressions = new ArrayList<>();
|
||||
|
||||
protected Or() {}
|
||||
|
||||
public Or(Expression<Boolean> first , Expression<Boolean> second , Expression<Boolean> ... others ) {
|
||||
expressions = Arrays.asList(first, second);
|
||||
if (others !=null && others.length>0)
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package org.gcube.common.storagehub.model.items.nodes;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Calendar;
|
||||
|
||||
import org.gcube.common.storagehub.model.annotations.Attribute;
|
||||
import org.gcube.common.storagehub.model.annotations.AttributeRootNode;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import org.gcube.common.storagehub.model.annotations.AttributeRootNode;
|
||||
import org.gcube.common.storagehub.model.annotations.MapAttribute;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
|
@ -18,7 +17,15 @@ import org.gcube.common.storagehub.model.annotations.MapAttribute;
|
|||
@AttributeRootNode("nthl:accountingEntry")
|
||||
public class AccountEntry {
|
||||
|
||||
@MapAttribute
|
||||
Map<String, Object> account = new HashMap<String, Object>();;
|
||||
@Attribute("hl:user")
|
||||
String user;
|
||||
|
||||
@Attribute("hl:date")
|
||||
Calendar date;
|
||||
|
||||
@Attribute("hl:version")
|
||||
String version;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue