Changes in ItemIdentifiers
This commit is contained in:
parent
74d1a1877d
commit
9e1e31285c
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||
public class COUNTER_Item_Component {
|
||||
|
||||
private String itemName;
|
||||
private List<COUNTER_Item_Identifier> itemIdentifiers = new ArrayList<>();
|
||||
private List<COUNTER_Item_Identifiers> itemIdentifiers = new ArrayList<>();
|
||||
private List<COUNTER_Item_Contributors> itemContributors = new ArrayList<>();
|
||||
private List<COUNTER_Item_Dates> itemDates = new ArrayList<>();
|
||||
private List<COUNTER_Item_Attributes> itemAttributes = new ArrayList<>();
|
||||
|
@ -39,7 +39,7 @@ public class COUNTER_Item_Component {
|
|||
}
|
||||
|
||||
|
||||
public void addIdentifier(COUNTER_Item_Identifier itemIdentifier) {
|
||||
public void addIdentifier(COUNTER_Item_Identifiers itemIdentifier) {
|
||||
itemIdentifiers.add(itemIdentifier);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
package eu.dnetlib.usagestats.sushilite.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Created by D.Pierrakos
|
||||
*/
|
||||
public class COUNTER_Item_Identifier {
|
||||
private String type;
|
||||
private String value;
|
||||
|
||||
public COUNTER_Item_Identifier() {
|
||||
}
|
||||
|
||||
public COUNTER_Item_Identifier(String type, String value) {
|
||||
this.type = type;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonProperty("Type")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@JsonProperty("Value")
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||
public class COUNTER_Item_Parent {
|
||||
|
||||
private String itemName;
|
||||
private List<COUNTER_Item_Identifier> itemIdentifiers = new ArrayList<>();
|
||||
private List<COUNTER_Item_Identifiers> itemIdentifiers = new ArrayList<>();
|
||||
private List<COUNTER_Item_Contributors> itemContributors = new ArrayList<>();
|
||||
private List<COUNTER_Item_Dates> itemDates = new ArrayList<>();
|
||||
private List<COUNTER_Item_Attributes> itemAttributes = new ArrayList<>();
|
||||
|
@ -38,7 +38,7 @@ public class COUNTER_Item_Parent {
|
|||
}
|
||||
|
||||
|
||||
public void addIdentifier(COUNTER_Item_Identifier itemIdentifier) {
|
||||
public void addIdentifier(COUNTER_Item_Identifiers itemIdentifier) {
|
||||
itemIdentifiers.add(itemIdentifier);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by tsampikos on 31/10/2016.
|
||||
* Created by D.Pierrakos
|
||||
*/
|
||||
public class COUNTER_Item_Performance {
|
||||
|
||||
|
@ -16,17 +16,17 @@ public class COUNTER_Item_Performance {
|
|||
public COUNTER_Item_Performance() {
|
||||
}
|
||||
|
||||
public COUNTER_Item_Performance(String start, String end, String ft_count,
|
||||
String abstr) {
|
||||
public COUNTER_Item_Performance(String start, String end, String downloads,
|
||||
String views) {
|
||||
period = new Period(start, end);
|
||||
if (ft_count != null && abstr != null) {
|
||||
instances.add(new Instance("Total_Items_Requests", ft_count));
|
||||
instances.add(new Instance("Total_Items_Investigations", abstr));
|
||||
if (downloads != null && views != null) {
|
||||
instances.add(new Instance("Total_Items_Requests", downloads));
|
||||
instances.add(new Instance("Total_Items_Investigations", views));
|
||||
}
|
||||
else if(ft_count != null && abstr == null )
|
||||
instances.add(new Instance("Total_Items_Requests", ft_count));
|
||||
else if(ft_count == null && abstr != null )
|
||||
instances.add(new Instance("Total_Items_Investigations",abstr));
|
||||
else if(downloads != null && views == null )
|
||||
instances.add(new Instance("Total_Items_Requests", downloads));
|
||||
else if(downloads == null && views != null )
|
||||
instances.add(new Instance("Total_Items_Investigations",views));
|
||||
}
|
||||
|
||||
@JsonProperty("Period")
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.List;
|
|||
public class COUNTER_Item_Usage {
|
||||
|
||||
private String item;
|
||||
private List<COUNTER_Item_Identifier> itemIdentifiers = new ArrayList<>();
|
||||
private List<COUNTER_Item_Identifiers> itemIdentifiers = new ArrayList<>();
|
||||
private List<COUNTER_Item_Contributors> itemContributors = new ArrayList<>();
|
||||
private List<COUNTER_Item_Dates> itemDates = new ArrayList<>();
|
||||
private List<COUNTER_Item_Attributes> itemAttributes = new ArrayList<>();
|
||||
|
@ -43,7 +43,7 @@ public class COUNTER_Item_Usage {
|
|||
this.yop = yop;
|
||||
this.accessType = acccesType;
|
||||
this.accessMethod = accessMethod;
|
||||
this.itemIdentifiers = null;
|
||||
//this.itemIdentifiers = itemIdentifiers;
|
||||
this.itemContributors = null;
|
||||
this.itemDates = null;
|
||||
this.itemAttributes = null;
|
||||
|
@ -61,7 +61,7 @@ public class COUNTER_Item_Usage {
|
|||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonProperty("Item_ID")
|
||||
public List<COUNTER_Item_Identifier> getItemIdentifiers() {
|
||||
public List<COUNTER_Item_Identifiers> getItemIdentifiers() {
|
||||
return itemIdentifiers;
|
||||
}
|
||||
|
||||
|
@ -137,10 +137,12 @@ public class COUNTER_Item_Usage {
|
|||
return itemPerformances;
|
||||
}
|
||||
|
||||
public void addIdentifier(COUNTER_Item_Identifier itemIdentifier) {
|
||||
public void addIdentifier(COUNTER_Item_Identifiers itemIdentifier) {
|
||||
itemIdentifiers.add(itemIdentifier);
|
||||
}
|
||||
|
||||
public void setIdentifier(List<COUNTER_Item_Identifiers> itemIdentifier) {
|
||||
this.itemIdentifiers=itemIdentifier;
|
||||
}
|
||||
public void addItemContributors(COUNTER_Item_Contributors itemContributor) {
|
||||
itemContributors.add(itemContributor);
|
||||
}
|
||||
|
@ -168,4 +170,6 @@ public class COUNTER_Item_Usage {
|
|||
public void addPerformance(COUNTER_Item_Performance itemPerformance) {
|
||||
itemPerformances.add(itemPerformance);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue