Compare commits

..

10 Commits

29 changed files with 42 additions and 195 deletions

View File

@ -1,15 +1,13 @@
package eu.dnetlib.dhp.schema.oaf;
import java.util.Objects;
import java.util.Optional;
/**
* This class models the access rights of research products.
*/
public class AccessRight extends Qualifier {
private static final long serialVersionUID = -8945177777173510134L;
private OpenAccessRoute openAccessRoute;
public OpenAccessRoute getOpenAccessRoute() {

View File

@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;
public class Context implements Serializable {

View File

@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
public class DataInfo implements Serializable {

View File

@ -1,12 +1,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.lang3.StringUtils;
/**
* Describes a reference to the EOSC Interoperability Framework (IF) Guidelines

View File

@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;
public class ExternalReference implements Serializable {

View File

@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
public class ExtraInfo implements Serializable {

View File

@ -2,11 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class GeoLocation implements Serializable {

View File

@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
/**
* To store information about the classification for the project. The classification depends on the programme. For example

View File

@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
/**
* To store information about the ec programme for the project. It has the following parameters:

View File

@ -3,9 +3,6 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import java.util.Optional;
import com.google.common.base.Joiner;
public class Instance implements Serializable {

View File

@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
public class Journal implements Serializable {

View File

@ -2,13 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
import java.util.Optional;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.base.Joiner;
public class KeyValue implements Serializable {

View File

@ -4,8 +4,6 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import com.google.common.base.Objects;
/**
* Represent a measure, must be further described by a system available resource providing name and descriptions.
*/

View File

@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
public class OAIProvenance implements Serializable {

View File

@ -2,12 +2,7 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public abstract class Oaf implements Serializable {

View File

@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.*;
import java.util.stream.Collectors;
public abstract class OafEntity extends Oaf implements Serializable {

View File

@ -6,6 +6,10 @@ import java.util.List;
public class Organization extends OafEntity implements Serializable {
public enum OrganizationType {
Archive, Company, Education, Facility, Government, Healthcare, Nonprofit, Other, Unknown
}
private static final long serialVersionUID = -9048723860770504113L;
private Field<String> legalshortname;
@ -40,6 +44,8 @@ public class Organization extends OafEntity implements Serializable {
private Qualifier country;
private OrganizationType organizationType;
public Field<String> getLegalshortname() {
return legalshortname;
}
@ -169,4 +175,11 @@ public class Organization extends OafEntity implements Serializable {
this.country = country;
}
public OrganizationType getOrganizationType() {
return organizationType;
}
public void setOrganizationType(OrganizationType organizationType) {
this.organizationType = organizationType;
}
}

View File

@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
public class OriginDescription implements Serializable {

View File

@ -4,8 +4,6 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
public class Project extends OafEntity implements Serializable {
private static final long serialVersionUID = 5783959097903529424L;

View File

@ -2,12 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
import java.util.Optional;
import org.apache.commons.lang3.builder.EqualsBuilder;
import com.google.common.base.Joiner;
public class Qualifier implements Serializable {
private static final long serialVersionUID = 6632548656644563076L;

View File

@ -1,15 +1,10 @@
package eu.dnetlib.dhp.schema.oaf;
import static com.google.common.base.Preconditions.checkArgument;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import eu.dnetlib.dhp.schema.common.ModelSupport;
/**
* Relation models any edge between two nodes in the OpenAIRE graph. It has a source id and a target id pointing to
* graph node identifiers and it is further characterised by the semantic of the link through the fields relType,

View File

@ -2,12 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.lang3.StringUtils;
public class StructuredProperty implements Serializable {

View File

@ -10,34 +10,23 @@ public class AccessRight implements Serializable {
private static final long serialVersionUID = 7995566912611238604L;
private String code;
private String label;
private String value;
private OpenAccessRoute openAccessRoute;
public static AccessRight newInstance(String code, String label, OpenAccessRoute openAccessRoute) {
public static AccessRight newInstance(String value, OpenAccessRoute openAccessRoute) {
AccessRight accessRight = new AccessRight();
accessRight.setCode(code);
accessRight.setLabel(label);
accessRight.setValue(value);
accessRight.setOpenAccessRoute(openAccessRoute);
return accessRight;
}
public String getCode() {
return code;
public String getValue() {
return value;
}
public void setCode(String code) {
this.code = code;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
public void setValue(String value) {
this.value = value;
}
public OpenAccessRoute getOpenAccessRoute() {

View File

@ -1,36 +1,10 @@
package eu.dnetlib.dhp.schema.solr;
import java.io.Serializable;
import java.util.List;
public class Measure implements Serializable {
private static final long serialVersionUID = 57939927121851504L;
private String id;
private List<CodeLabel> unit;
public static Measure newInstance(String id, List<CodeLabel> unit) {
Measure m = new Measure();
m.setId(id);
m.setUnit(unit);
return m;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public List<CodeLabel> getUnit() {
return unit;
}
public void setUnit(List<CodeLabel> unit) {
this.unit = unit;
}
//TODO define me!
}

View File

@ -6,20 +6,25 @@ public class Pid implements Serializable {
private static final long serialVersionUID = -943684282582228545L;
private String type;
private String value;
private String typeCode;
private String typeLabel;
public static Pid newInstance(String value, String typeCode, String typeLabel) {
public static Pid newInstance(String type, String value) {
Pid p = new Pid();
p.setType(type);
p.setValue(value);
p.setTypeCode(typeCode);
p.setTypeLabel(typeLabel);
return p;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getValue() {
return value;
}
@ -27,20 +32,4 @@ public class Pid implements Serializable {
public void setValue(String value) {
this.value = value;
}
public String getTypeCode() {
return typeCode;
}
public void setTypeCode(String typeCode) {
this.typeCode = typeCode;
}
public String getTypeLabel() {
return typeLabel;
}
public void setTypeLabel(String typeLabel) {
this.typeLabel = typeLabel;
}
}

View File

@ -39,7 +39,6 @@ public class RelatedRecord implements Serializable {
private String acronym;
private CodeLabel contracttype;
private Funding funding;
private String validationDate;
public RelatedRecordHeader getHeader() {
return header;
@ -216,12 +215,4 @@ public class RelatedRecord implements Serializable {
public void setFunding(Funding funding) {
this.funding = funding;
}
public String getValidationDate() {
return validationDate;
}
public void setValidationDate(String validationDate) {
this.validationDate = validationDate;
}
}

View File

@ -14,18 +14,12 @@ public class RelatedRecordHeader implements Serializable {
private RecordType relatedRecordType;
private String relationProvenance;
private String trust;
public static RelatedRecordHeader newInstance(String relationType, String relationClass, String relatedIdentifier, RecordType relatedRecordType, String relationProvenance, String trust) {
public static RelatedRecordHeader newInstance(String relationType, String relationClass, String relatedIdentifier, RecordType relatedRecordType) {
RelatedRecordHeader header = new RelatedRecordHeader();
header.setRelationType(relationType);
header.setRelationClass(relationClass);
header.setRelatedIdentifier(relatedIdentifier);
header.setRelatedRecordType(relatedRecordType);
header.setRelationProvenance(relationProvenance);
header.setTrust(trust);
return header;
}
@ -60,20 +54,4 @@ public class RelatedRecordHeader implements Serializable {
public void setRelatedRecordType(RecordType relatedRecordType) {
this.relatedRecordType = relatedRecordType;
}
public String getRelationProvenance() {
return relationProvenance;
}
public void setRelationProvenance(String relationProvenance) {
this.relationProvenance = relationProvenance;
}
public String getTrust() {
return trust;
}
public void setTrust(String trust) {
this.trust = trust;
}
}

View File

@ -7,8 +7,6 @@ public class SolrRecordHeader implements Serializable {
private static final long serialVersionUID = -6052397109220149426L;
public enum Status { UNDER_CURATION }
/**
* The OpenAIRE identifiers for this record
*/
@ -21,20 +19,13 @@ public class SolrRecordHeader implements Serializable {
private RecordType recordType;
private Status status = null;
private Boolean deletedbyinference;
public static SolrRecordHeader newInstance(String id, List<String> originalId, RecordType recordType, Boolean deletedbyinference) {
return newInstance(id, originalId, recordType, null, deletedbyinference);
}
public static SolrRecordHeader newInstance(String id, List<String> originalId, RecordType recordType, Status status, Boolean deletedbyinference) {
SolrRecordHeader header = new SolrRecordHeader();
header.setId(id);
header.setOriginalId(originalId);
header.setRecordType(recordType);
header.setStatus(status);
header.setDeletedbyinference(deletedbyinference);
return header;
}
@ -67,14 +58,6 @@ public class SolrRecordHeader implements Serializable {
return deletedbyinference;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public void setDeletedbyinference(Boolean deletedbyinference) {
this.deletedbyinference = deletedbyinference;
}

View File

@ -8,15 +8,12 @@ public class Subject implements Serializable {
private String value;
private String typeCode;
private String type;
private String typeLabel;
public static Subject newInstance(String value, String typeCode, String typeLabel) {
public static Subject newInstance(String value, String type) {
Subject s = new Subject();
s.setValue(value);
s.setTypeCode(typeCode);
s.setTypeLabel(typeLabel);
s.setType(type);
return s;
}
@ -28,19 +25,11 @@ public class Subject implements Serializable {
this.value = value;
}
public String getTypeCode() {
return typeCode;
public String getType() {
return type;
}
public void setTypeCode(String typeCode) {
this.typeCode = typeCode;
}
public String getTypeLabel() {
return typeLabel;
}
public void setTypeLabel(String typeLabel) {
this.typeLabel = typeLabel;
public void setType(String type) {
this.type = type;
}
}