forked from D-Net/dnet-hadoop
builder pattern
This commit is contained in:
parent
7ba0f44d05
commit
ed290ca8d7
|
@ -40,9 +40,9 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
|
|
||||||
private List<Field<String>> odlanguages;
|
private List<Field<String>> odlanguages;
|
||||||
|
|
||||||
private List< Field<String>> odcontenttypes;
|
private List<Field<String>> odcontenttypes;
|
||||||
|
|
||||||
private List< Field<String>> accessinfopackage;
|
private List<Field<String>> accessinfopackage;
|
||||||
|
|
||||||
// re3data fields
|
// re3data fields
|
||||||
private Field<String> releasestartdate;
|
private Field<String> releasestartdate;
|
||||||
|
|
|
@ -12,16 +12,18 @@ public class Field<T> implements Serializable {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValue(T value) {
|
public Field<T> setValue(T value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataInfo getDataInfo() {
|
public DataInfo getDataInfo() {
|
||||||
return dataInfo;
|
return dataInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataInfo(DataInfo dataInfo) {
|
public Field<T> setDataInfo(DataInfo dataInfo) {
|
||||||
this.dataInfo = dataInfo;
|
this.dataInfo = dataInfo;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,68 +26,74 @@ public class Instance implements Serializable {
|
||||||
return license;
|
return license;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLicense(Field<String> license) {
|
public Instance setLicense(Field<String> license) {
|
||||||
this.license = license;
|
this.license = license;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Qualifier getAccessright() {
|
public Qualifier getAccessright() {
|
||||||
return accessright;
|
return accessright;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAccessright(Qualifier accessright) {
|
public Instance setAccessright(Qualifier accessright) {
|
||||||
this.accessright = accessright;
|
this.accessright = accessright;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Qualifier getInstancetype() {
|
public Qualifier getInstancetype() {
|
||||||
return instancetype;
|
return instancetype;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInstancetype(Qualifier instancetype) {
|
public Instance setInstancetype(Qualifier instancetype) {
|
||||||
this.instancetype = instancetype;
|
this.instancetype = instancetype;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public KeyValue getHostedby() {
|
public KeyValue getHostedby() {
|
||||||
return hostedby;
|
return hostedby;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHostedby(KeyValue hostedby) {
|
public Instance setHostedby(KeyValue hostedby) {
|
||||||
this.hostedby = hostedby;
|
this.hostedby = hostedby;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getUrl() {
|
public List<String> getUrl() {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUrl(List<String> url) {
|
public Instance setUrl(List<String> url) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDistributionlocation() {
|
public String getDistributionlocation() {
|
||||||
return distributionlocation;
|
return distributionlocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDistributionlocation(String distributionlocation) {
|
public Instance setDistributionlocation(String distributionlocation) {
|
||||||
this.distributionlocation = distributionlocation;
|
this.distributionlocation = distributionlocation;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public KeyValue getCollectedfrom() {
|
public KeyValue getCollectedfrom() {
|
||||||
return collectedfrom;
|
return collectedfrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCollectedfrom(KeyValue collectedfrom) {
|
public Instance setCollectedfrom(KeyValue collectedfrom) {
|
||||||
this.collectedfrom = collectedfrom;
|
this.collectedfrom = collectedfrom;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Field<String> getDateofacceptance() {
|
public Field<String> getDateofacceptance() {
|
||||||
return dateofacceptance;
|
return dateofacceptance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDateofacceptance(Field<String> dateofacceptance) {
|
public Instance setDateofacceptance(Field<String> dateofacceptance) {
|
||||||
this.dateofacceptance = dateofacceptance;
|
this.dateofacceptance = dateofacceptance;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String toComparableString(){
|
public String toComparableString(){
|
||||||
return String.format("%s::%s::%s::%s",
|
return String.format("%s::%s::%s::%s",
|
||||||
hostedby != null && hostedby.getKey()!= null ? hostedby.getKey().toLowerCase() : "",
|
hostedby != null && hostedby.getKey()!= null ? hostedby.getKey().toLowerCase() : "",
|
||||||
|
|
Loading…
Reference in New Issue