diff --git a/README.md b/README.md index 94499a4..b18603b 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,11 @@ This project defines **object schemas** of the OpenAIRE main entities and the re Namely it defines the model for - the graph internal representation, defined under the package `eu.dnetlib.dhp.schema.oaf` -- the public graph dump representations, defined under the package `eu.dnetlib.dhp.schema.dump.oaf` - the scholexplorer content representation, defined under the package `eu.dnetlib.dhp.schema.sx` -- the contents acquired from the netadata aggregation subsystem, defined under the package `eu.dnetlib.dhp.schema.mdstore` +- the contents acquired from the metadata aggregation subsystem, defined under the package `eu.dnetlib.dhp.schema.mdstore` - the ORCID common schemas, defined under the package `eu.dnetlib.dhp.schema.orcid` +- the Solr common schemas used to represent the information returned to the Explore portal and the APIs, defined under +the package `eu.dnetlib.dhp.schema.solr` -Te serialization of such objects (data store files) are used to pass data between workflow nodes in the processing pipeline. +The serialization of such objects (data store files) are used to pass data between workflow nodes in the processing pipeline +and / or intended to be shared across components. diff --git a/pom.xml b/pom.xml index 4cdfb6d..02d05d5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 5.17.4-SNAPSHOT + 6.0.0-SNAPSHOT diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java index c680555..d2b4706 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java @@ -8,6 +8,7 @@ import java.util.Optional; */ public class AccessRight extends Qualifier { + private static final long serialVersionUID = -8945177777173510134L; private OpenAccessRoute openAccessRoute; public OpenAccessRoute getOpenAccessRoute() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Author.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Author.java index b2f757d..34e372f 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Author.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Author.java @@ -6,6 +6,7 @@ import java.util.*; public class Author implements Serializable { + private static final long serialVersionUID = 1625492739044457437L; private String fullname; private String name; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Context.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Context.java index 57912c4..d46c8d5 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Context.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Context.java @@ -5,6 +5,8 @@ import java.io.Serializable; import java.util.List; public class Context implements Serializable { + + private static final long serialVersionUID = -778899398223144398L; private String id; private List dataInfo; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Country.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Country.java index e25fdca..75fb1da 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Country.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Country.java @@ -5,6 +5,7 @@ import java.util.Objects; public class Country extends Qualifier { + private static final long serialVersionUID = 1587334433446567175L; private DataInfo dataInfo; public DataInfo getDataInfo() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/DataInfo.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/DataInfo.java index 9d572ee..6fe447f 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/DataInfo.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/DataInfo.java @@ -6,6 +6,8 @@ import java.util.Objects; public class DataInfo implements Serializable { + private static final long serialVersionUID = -277099962930866451L; + private Boolean invisible = false; private Boolean inferred; private Boolean deletedbyinference = false; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Dataset.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Dataset.java index b5587c6..9473b66 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Dataset.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Dataset.java @@ -8,6 +8,7 @@ import eu.dnetlib.dhp.schema.common.ModelConstants; public class Dataset extends Result implements Serializable { + private static final long serialVersionUID = 916526716184645549L; private Field storagedate; // candidate for removal diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java index 5067ada..c392b6c 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java @@ -6,9 +6,6 @@ import java.util.List; public class Datasource extends OafEntity implements Serializable { - /** - * - */ private static final long serialVersionUID = 1019089598408414496L; @Deprecated diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/EoscIfGuidelines.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/EoscIfGuidelines.java index 2e8a1b6..07aece3 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/EoscIfGuidelines.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/EoscIfGuidelines.java @@ -12,6 +12,7 @@ import org.apache.commons.lang3.StringUtils; */ public class EoscIfGuidelines implements Serializable { + private static final long serialVersionUID = -2166497471601245048L; /** * EOSC-IF local code. Later on it could be populated with a PID (e.g. DOI), but for the time being we stick to * a more loose definition. diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/ExternalReference.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/ExternalReference.java index 0689b44..c0f5dc6 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/ExternalReference.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/ExternalReference.java @@ -6,6 +6,8 @@ import java.util.List; import java.util.Objects; public class ExternalReference implements Serializable { + + private static final long serialVersionUID = -3711445600549155961L; // source private String sitename; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/ExtraInfo.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/ExtraInfo.java index 3682cc2..5c93447 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/ExtraInfo.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/ExtraInfo.java @@ -5,6 +5,8 @@ import java.io.Serializable; import java.util.Objects; public class ExtraInfo implements Serializable { + + private static final long serialVersionUID = 8689244676887698486L; private String name; private String typology; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java index 8358bc4..6fea24e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java @@ -6,6 +6,7 @@ import java.util.Objects; public class Field implements Serializable { + private static final long serialVersionUID = -4255501306375330131L; private T value; private DataInfo dataInfo; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/GeoLocation.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/GeoLocation.java index 7ed313a..35981e8 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/GeoLocation.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/GeoLocation.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; public class GeoLocation implements Serializable { + private static final long serialVersionUID = 8096534610208458404L; private String point; private String box; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java index 219bdc0..52f9b8e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java @@ -21,8 +21,9 @@ import java.util.Objects; * - private String level3 to store the information about the level3 of the classification * - private String classification to store the entire classification related to the programme */ - public class H2020Classification implements Serializable { + + private static final long serialVersionUID = 1062734689288369769L; private H2020Programme h2020Programme; private String level1; private String level2; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Programme.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Programme.java index 101d46d..0d9913c 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Programme.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Programme.java @@ -9,8 +9,9 @@ import java.util.Objects; * - private String code to store the code of the programme * - private String description to store the description of the programme */ - public class H2020Programme implements Serializable { + + private static final long serialVersionUID = -7851791644568592481L; private String code; private String description; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java index 095eae5..8c802f5 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java @@ -6,6 +6,7 @@ import java.util.List; public class Instance implements Serializable { + private static final long serialVersionUID = 3918544870298859300L; private Field license; private AccessRight accessright; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/InstanceTypeMapping.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/InstanceTypeMapping.java index ac8e6a2..f770e92 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/InstanceTypeMapping.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/InstanceTypeMapping.java @@ -7,6 +7,7 @@ import java.io.Serializable; */ public class InstanceTypeMapping implements Serializable { + private static final long serialVersionUID = -8209930054790495309L; /** * Original resource type, typically mapped from dc:type, datacite:resourceType. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Journal.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Journal.java index 7a375e2..8a086bf 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Journal.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Journal.java @@ -6,6 +6,8 @@ import java.util.Objects; public class Journal implements Serializable { + private static final long serialVersionUID = -8476321782780781681L; + private String name; private String issnPrinted; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/KeyValue.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/KeyValue.java index 4e2d601..a2fef7b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/KeyValue.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/KeyValue.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; public class KeyValue implements Serializable { + private static final long serialVersionUID = 1905267445569591240L; private String key; private String value; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java index 78a4c68..ca0073e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java @@ -11,6 +11,7 @@ import com.google.common.base.Objects; */ public class Measure implements Serializable { + private static final long serialVersionUID = 8383308453679722661L; /** * Unique measure identifier. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/OAIProvenance.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/OAIProvenance.java index 88d74af..52d4dcd 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/OAIProvenance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/OAIProvenance.java @@ -6,6 +6,8 @@ import java.util.Objects; public class OAIProvenance implements Serializable { + private static final long serialVersionUID = -767252660700352729L; + private OriginDescription originDescription; public OriginDescription getOriginDescription() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java index 0df5572..a845c33 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java @@ -11,6 +11,7 @@ import java.util.stream.Stream; public abstract class Oaf implements Serializable { + private static final long serialVersionUID = 94599232915572420L; /** * The list of datasource id/name pairs providing this relationship. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java index 00c5729..050840d 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java @@ -7,6 +7,8 @@ import java.util.stream.Collectors; public abstract class OafEntity extends Oaf implements Serializable { + private static final long serialVersionUID = -7793594664115821897L; + private String id; private List originalId; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/OpenAccessColor.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/OpenAccessColor.java index 3e4b250..cafa237 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/OpenAccessColor.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/OpenAccessColor.java @@ -1,11 +1,12 @@ package eu.dnetlib.dhp.schema.oaf; +import java.io.Serializable; + /** * The OpenAccess color meant to be used on the result level */ -public enum OpenAccessColor { - +public enum OpenAccessColor implements Serializable { gold, hybrid, bronze } diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Organization.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Organization.java index a5f9bce..5db20ce 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Organization.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Organization.java @@ -6,6 +6,8 @@ import java.util.List; public class Organization extends OafEntity implements Serializable { + private static final long serialVersionUID = -9048723860770504113L; + private Field legalshortname; private Field legalname; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/OriginDescription.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/OriginDescription.java index a275fc1..6876353 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/OriginDescription.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/OriginDescription.java @@ -6,6 +6,8 @@ import java.util.Objects; public class OriginDescription implements Serializable { + private static final long serialVersionUID = -7256156902727658863L; + private String harvestDate; private Boolean altered = true; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/OtherResearchProduct.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/OtherResearchProduct.java index b04934c..4dc23ef 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/OtherResearchProduct.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/OtherResearchProduct.java @@ -8,6 +8,8 @@ import eu.dnetlib.dhp.schema.common.ModelConstants; public class OtherResearchProduct extends Result implements Serializable { + private static final long serialVersionUID = -7611546868867175491L; + private List> contactperson; private List> contactgroup; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java index 0798212..68f1d70 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java @@ -8,6 +8,8 @@ import org.apache.commons.lang3.StringUtils; public class Project extends OafEntity implements Serializable { + private static final long serialVersionUID = 5783959097903529424L; + private Field websiteurl; private Field code; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Publication.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Publication.java index 3058c26..6126dad 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Publication.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Publication.java @@ -7,6 +7,8 @@ import eu.dnetlib.dhp.schema.common.ModelConstants; public class Publication extends Result implements Serializable { + private static final long serialVersionUID = 4155353046627214846L; + // publication specific private Journal journal; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Qualifier.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Qualifier.java index 87ecb55..895c55b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Qualifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Qualifier.java @@ -8,7 +8,7 @@ import org.apache.commons.lang3.StringUtils; import com.fasterxml.jackson.annotation.JsonIgnore; public class Qualifier implements Serializable { - + private static final long serialVersionUID = 6632548656644563076L; private String classid; private String classname; private String schemeid; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java index fc6c5e0..46a9325 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java @@ -18,6 +18,8 @@ import eu.dnetlib.dhp.schema.common.ModelSupport; */ public class Relation extends Oaf { + private static final long serialVersionUID = -7061565324218172207L; + /** * Main relationship classifier, values include 'resultResult', 'resultProject', 'resultOrganization', etc. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java index 02fac7b..7fc5af9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java @@ -23,6 +23,8 @@ import eu.dnetlib.dhp.schema.oaf.utils.CleaningFunctions; */ public class Result extends OafEntity implements Serializable { + private static final long serialVersionUID = 5597290552671699408L; + /** * ( article | book ) processing charges. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Software.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Software.java index d25b5c9..6435a1a 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Software.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Software.java @@ -8,6 +8,8 @@ import eu.dnetlib.dhp.schema.common.ModelConstants; public class Software extends Result implements Serializable { + private static final long serialVersionUID = -3096641763359312576L; + private List> documentationUrl; // candidate for removal diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/StructuredProperty.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/StructuredProperty.java index 8750950..20cf8f3 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/StructuredProperty.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/StructuredProperty.java @@ -10,6 +10,8 @@ import org.apache.commons.lang3.StringUtils; public class StructuredProperty implements Serializable { + private static final long serialVersionUID = -8490243153237377762L; + private String value; private Qualifier qualifier; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Subject.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Subject.java index b06ceb2..61e20b5 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Subject.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Subject.java @@ -3,4 +3,7 @@ package eu.dnetlib.dhp.schema.oaf; import java.io.Serializable; public class Subject extends StructuredProperty implements Serializable { + + private static final long serialVersionUID = 5072481219939207428L; + } diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/APC.java b/src/main/java/eu/dnetlib/dhp/schema/solr/APC.java new file mode 100644 index 0000000..a3c5cd0 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/APC.java @@ -0,0 +1,39 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * Used to refer to the Article Processing Charge information. It contains two parameters: - + * currency of type String to store the currency of the APC - amount of type String to stores the charged amount + */ +public class APC implements Serializable { + + private static final long serialVersionUID = 8324447899738993669L; + + private String currency; + + private String amount; + + public static APC newInstance(String currency, String amount) { + APC apc = new APC(); + apc.setCurrency(currency); + apc.setAmount(amount); + return apc; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/AccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/solr/AccessRight.java new file mode 100644 index 0000000..7981bc9 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/AccessRight.java @@ -0,0 +1,41 @@ + +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * This class models the access rights of research products. + */ +public class AccessRight implements Serializable { + + private static final long serialVersionUID = 7995566912611238604L; + + private String value; + + private OpenAccessRoute openAccessRoute; + + public static AccessRight newInstance(String value, OpenAccessRoute openAccessRoute) { + AccessRight accessRight = new AccessRight(); + accessRight.setValue(value); + accessRight.setOpenAccessRoute(openAccessRoute); + return accessRight; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public OpenAccessRoute getOpenAccessRoute() { + return openAccessRoute; + } + + public void setOpenAccessRoute(OpenAccessRoute openAccessRoute) { + this.openAccessRoute = openAccessRoute; + } + + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Author.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Author.java new file mode 100644 index 0000000..7d2f5df --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Author.java @@ -0,0 +1,72 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Author implements Serializable { + + private static final long serialVersionUID = 5482727671039062564L; + + private String fullname; + + private String name; + + private String surname; + + private Integer rank; + + /** + * The author's persistent identifiers + */ + private List pid; + + public static Author newInstance(String fullname, String name, String surname, int rank, List pid) { + Author a = new Author(); + a.setFullname(fullname); + a.setName(name); + a.setSurname(surname); + a.setRank(rank); + a.setPid(pid); + return a; + } + + public String getFullname() { + return fullname; + } + + public void setFullname(String fullname) { + this.fullname = fullname; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSurname() { + return surname; + } + + public void setSurname(String surname) { + this.surname = surname; + } + + public Integer getRank() { + return rank; + } + + public void setRank(Integer rank) { + this.rank = rank; + } + + public List getPid() { + return pid; + } + + public void setPid(List pid) { + this.pid = pid; + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/BestAccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/solr/BestAccessRight.java new file mode 100644 index 0000000..c1e466e --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/BestAccessRight.java @@ -0,0 +1,44 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * BestAccessRight. Used to represent the result best access rights. + */ +public class BestAccessRight implements Serializable { + + private static final long serialVersionUID = 689431927147731065L; + + /** + * AccessRight code + */ + private String code; // the classid in the Qualifier + + /** + * Label for the access mode + */ + private String label; // the classname in the Qualifier + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public static BestAccessRight newInstance(String code, String label) { + BestAccessRight ar = new BestAccessRight(); + ar.code = code; + ar.label = label; + return ar; + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Category.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Category.java new file mode 100644 index 0000000..96a2178 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Category.java @@ -0,0 +1,44 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +import com.google.common.collect.Lists; + +public class Category implements Serializable { + + private String id; + private String label; + private List concept = Lists.newArrayList(); + + public static Category newInstance(String id, String label) { + Category category = new Category(); + category.setId(id); + category.setLabel(label); + return category; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public List getConcept() { + return concept; + } + + public void setConcept(List concept) { + this.concept = concept; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/CodeLabel.java b/src/main/java/eu/dnetlib/dhp/schema/solr/CodeLabel.java new file mode 100644 index 0000000..a49e914 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/CodeLabel.java @@ -0,0 +1,35 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class CodeLabel implements Serializable { + + private static final long serialVersionUID = 8182033641583483845L; + + private String code; + + private String label; + + public static CodeLabel newInstance(String code, String label) { + CodeLabel cl = new CodeLabel(); + cl.setCode(code); + cl.setLabel(label); + return cl; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Concept.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Concept.java new file mode 100644 index 0000000..32f7e08 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Concept.java @@ -0,0 +1,34 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Concept implements Serializable { + + private static final long serialVersionUID = -2309379406128410374L; + + private String id; + private String label; + + public static Concept newInstance(String id, String label) { + Concept concept = new Concept(); + concept.setId(id); + concept.setLabel(label); + return concept; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Context.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Context.java new file mode 100644 index 0000000..dc60f3c --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Context.java @@ -0,0 +1,55 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +import com.google.common.collect.Lists; + +public class Context implements Serializable { + + private String id; + private String label; + private String type; + private List category = Lists.newArrayList(); + + public static Context newInstance(String id, String label, String type, List category) { + Context context = new Context(); + context.setId(id); + context.setLabel(label); + context.setType(type); + context.setCategory(category); + return context; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public List getCategory() { + return category; + } + + public void setCategory(List category) { + this.category = category; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Country.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Country.java new file mode 100644 index 0000000..fd3ba02 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Country.java @@ -0,0 +1,49 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * Represents the country associated to the generic entity. The value for this element correspond to: - code corresponds + * to the classid of eu.dnetlib.dhp.schema.oaf.Country - label corresponds to the classname of + * eu.dnetlib.dhp.schema.oaf.Country - provenance set only if the dataInfo associated to the Country of the result to be + * dumped is not null. In this case : - provenance corresponds to dataInfo.provenanceaction.classid (to be modified with + * datainfo.provenanceaction.classname) - trust corresponds to dataInfo.trust + */ +public class Country implements Serializable { + + private static final long serialVersionUID = 544249673120027949L; + + /** + * ISO 3166-1 alpha-2 country code (i.e. IT) + */ + private String code; // the classid in the Qualifier + + /** + * The label for that code (i.e. Italy) + */ + private String label; // the classname in the Qualifier + + public static Country newInstance(String code, String label) { + Country c = new Country(); + c.setCode(code); + c.setLabel(label); + return c; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Datasource.java new file mode 100644 index 0000000..6671138 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Datasource.java @@ -0,0 +1,538 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Datasource implements Serializable { + + private static final long serialVersionUID = -5817484869244344681L; + private CodeLabel datasourcetype; + + private CodeLabel datasourcetypeui; + + private CodeLabel eosctype; // Data Source | Service + + private CodeLabel eoscdatasourcetype; + + private CodeLabel openairecompatibility; + + private String officialname; + + private String englishname; + + private String websiteurl; + + private String logourl; + + private String contactemail; + + private String namespaceprefix; + + private String latitude; + + private String longitude; + + private String dateofvalidation; + + private String description; + + private List subjects; + + private String odnumberofitems; + + private String odnumberofitemsdate; + + private String odpolicies; + + private List odlanguages; + + private List languages; + + private List odcontenttypes; + + private List accessinfopackage; + + // re3data fields + private String releasestartdate; + + private String releaseenddate; + + private String missionstatementurl; + + private Boolean dataprovider; + + private Boolean serviceprovider; + + // {open, restricted or closed} + private String databaseaccesstype; + + // {open, restricted or closed} + private String datauploadtype; + + // {feeRequired, registration, other} + private String databaseaccessrestriction; + + // {feeRequired, registration, other} + private String datauploadrestriction; + + private Boolean versioning; + + private Boolean versioncontrol; + + private String citationguidelineurl; + + private String pidsystems; + + private String certificates; + + private List policies; + + private Journal journal; + + // New field for EOSC + private List researchentitytypes; + + // New field for EOSC + private List providedproducttypes; + + // New field for EOSC + private CodeLabel jurisdiction; + + // New field for EOSC + private Boolean thematic; + + // New field for EOSC + private List contentpolicies; + + private String submissionpolicyurl; + + private String preservationpolicyurl; + + private List researchproductaccesspolicies; + + private List researchproductmetadataaccesspolicies; + + private Boolean consenttermsofuse; + + private Boolean fulltextdownload; + + private String consenttermsofusedate; + + private String lastconsenttermsofusedate; + + public CodeLabel getDatasourcetype() { + return datasourcetype; + } + + public void setDatasourcetype(CodeLabel datasourcetype) { + this.datasourcetype = datasourcetype; + } + + public CodeLabel getDatasourcetypeui() { + return datasourcetypeui; + } + + public void setDatasourcetypeui(CodeLabel datasourcetypeui) { + this.datasourcetypeui = datasourcetypeui; + } + + public CodeLabel getEosctype() { + return eosctype; + } + + public void setEosctype(CodeLabel eosctype) { + this.eosctype = eosctype; + } + + public CodeLabel getEoscdatasourcetype() { + return eoscdatasourcetype; + } + + public void setEoscdatasourcetype(CodeLabel eoscdatasourcetype) { + this.eoscdatasourcetype = eoscdatasourcetype; + } + + public CodeLabel getOpenairecompatibility() { + return openairecompatibility; + } + + public void setOpenairecompatibility(CodeLabel openairecompatibility) { + this.openairecompatibility = openairecompatibility; + } + + public String getOfficialname() { + return officialname; + } + + public void setOfficialname(String officialname) { + this.officialname = officialname; + } + + public String getEnglishname() { + return englishname; + } + + public void setEnglishname(String englishname) { + this.englishname = englishname; + } + + public String getWebsiteurl() { + return websiteurl; + } + + public void setWebsiteurl(String websiteurl) { + this.websiteurl = websiteurl; + } + + public String getLogourl() { + return logourl; + } + + public void setLogourl(String logourl) { + this.logourl = logourl; + } + + public String getContactemail() { + return contactemail; + } + + public void setContactemail(String contactemail) { + this.contactemail = contactemail; + } + + public String getNamespaceprefix() { + return namespaceprefix; + } + + public void setNamespaceprefix(String namespaceprefix) { + this.namespaceprefix = namespaceprefix; + } + + public String getLatitude() { + return latitude; + } + + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + public String getLongitude() { + return longitude; + } + + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + public String getDateofvalidation() { + return dateofvalidation; + } + + public void setDateofvalidation(String dateofvalidation) { + this.dateofvalidation = dateofvalidation; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public List getSubjects() { + return subjects; + } + + public void setSubjects(List subjects) { + this.subjects = subjects; + } + + public String getOdnumberofitems() { + return odnumberofitems; + } + + public void setOdnumberofitems(String odnumberofitems) { + this.odnumberofitems = odnumberofitems; + } + + public String getOdnumberofitemsdate() { + return odnumberofitemsdate; + } + + public void setOdnumberofitemsdate(String odnumberofitemsdate) { + this.odnumberofitemsdate = odnumberofitemsdate; + } + + public String getOdpolicies() { + return odpolicies; + } + + public void setOdpolicies(String odpolicies) { + this.odpolicies = odpolicies; + } + + public List getOdlanguages() { + return odlanguages; + } + + public void setOdlanguages(List odlanguages) { + this.odlanguages = odlanguages; + } + + public List getLanguages() { + return languages; + } + + public void setLanguages(List languages) { + this.languages = languages; + } + + public List getOdcontenttypes() { + return odcontenttypes; + } + + public void setOdcontenttypes(List odcontenttypes) { + this.odcontenttypes = odcontenttypes; + } + + public List getAccessinfopackage() { + return accessinfopackage; + } + + public void setAccessinfopackage(List accessinfopackage) { + this.accessinfopackage = accessinfopackage; + } + + public String getReleasestartdate() { + return releasestartdate; + } + + public void setReleasestartdate(String releasestartdate) { + this.releasestartdate = releasestartdate; + } + + public String getReleaseenddate() { + return releaseenddate; + } + + public void setReleaseenddate(String releaseenddate) { + this.releaseenddate = releaseenddate; + } + + public String getMissionstatementurl() { + return missionstatementurl; + } + + public void setMissionstatementurl(String missionstatementurl) { + this.missionstatementurl = missionstatementurl; + } + + public Boolean getDataprovider() { + return dataprovider; + } + + public void setDataprovider(Boolean dataprovider) { + this.dataprovider = dataprovider; + } + + public Boolean getServiceprovider() { + return serviceprovider; + } + + public void setServiceprovider(Boolean serviceprovider) { + this.serviceprovider = serviceprovider; + } + + public String getDatabaseaccesstype() { + return databaseaccesstype; + } + + public void setDatabaseaccesstype(String databaseaccesstype) { + this.databaseaccesstype = databaseaccesstype; + } + + public String getDatauploadtype() { + return datauploadtype; + } + + public void setDatauploadtype(String datauploadtype) { + this.datauploadtype = datauploadtype; + } + + public String getDatabaseaccessrestriction() { + return databaseaccessrestriction; + } + + public void setDatabaseaccessrestriction(String databaseaccessrestriction) { + this.databaseaccessrestriction = databaseaccessrestriction; + } + + public String getDatauploadrestriction() { + return datauploadrestriction; + } + + public void setDatauploadrestriction(String datauploadrestriction) { + this.datauploadrestriction = datauploadrestriction; + } + + public Boolean getVersioning() { + return versioning; + } + + public void setVersioning(Boolean versioning) { + this.versioning = versioning; + } + + public Boolean getVersioncontrol() { + return versioncontrol; + } + + public void setVersioncontrol(Boolean versioncontrol) { + this.versioncontrol = versioncontrol; + } + + public String getCitationguidelineurl() { + return citationguidelineurl; + } + + public void setCitationguidelineurl(String citationguidelineurl) { + this.citationguidelineurl = citationguidelineurl; + } + + public String getPidsystems() { + return pidsystems; + } + + public void setPidsystems(String pidsystems) { + this.pidsystems = pidsystems; + } + + public String getCertificates() { + return certificates; + } + + public void setCertificates(String certificates) { + this.certificates = certificates; + } + + public List getPolicies() { + return policies; + } + + public void setPolicies(List policies) { + this.policies = policies; + } + + public Journal getJournal() { + return journal; + } + + public void setJournal(Journal journal) { + this.journal = journal; + } + + public List getResearchentitytypes() { + return researchentitytypes; + } + + public void setResearchentitytypes(List researchentitytypes) { + this.researchentitytypes = researchentitytypes; + } + + public List getProvidedproducttypes() { + return providedproducttypes; + } + + public void setProvidedproducttypes(List providedproducttypes) { + this.providedproducttypes = providedproducttypes; + } + + public CodeLabel getJurisdiction() { + return jurisdiction; + } + + public void setJurisdiction(CodeLabel jurisdiction) { + this.jurisdiction = jurisdiction; + } + + public Boolean getThematic() { + return thematic; + } + + public void setThematic(Boolean thematic) { + this.thematic = thematic; + } + + public List getContentpolicies() { + return contentpolicies; + } + + public void setContentpolicies(List contentpolicies) { + this.contentpolicies = contentpolicies; + } + + public String getSubmissionpolicyurl() { + return submissionpolicyurl; + } + + public void setSubmissionpolicyurl(String submissionpolicyurl) { + this.submissionpolicyurl = submissionpolicyurl; + } + + public String getPreservationpolicyurl() { + return preservationpolicyurl; + } + + public void setPreservationpolicyurl(String preservationpolicyurl) { + this.preservationpolicyurl = preservationpolicyurl; + } + + public List getResearchproductaccesspolicies() { + return researchproductaccesspolicies; + } + + public void setResearchproductaccesspolicies(List researchproductaccesspolicies) { + this.researchproductaccesspolicies = researchproductaccesspolicies; + } + + public List getResearchproductmetadataaccesspolicies() { + return researchproductmetadataaccesspolicies; + } + + public void setResearchproductmetadataaccesspolicies(List researchproductmetadataaccesspolicies) { + this.researchproductmetadataaccesspolicies = researchproductmetadataaccesspolicies; + } + + public Boolean getConsenttermsofuse() { + return consenttermsofuse; + } + + public void setConsenttermsofuse(Boolean consenttermsofuse) { + this.consenttermsofuse = consenttermsofuse; + } + + public Boolean getFulltextdownload() { + return fulltextdownload; + } + + public void setFulltextdownload(Boolean fulltextdownload) { + this.fulltextdownload = fulltextdownload; + } + + public String getConsenttermsofusedate() { + return consenttermsofusedate; + } + + public void setConsenttermsofusedate(String consenttermsofusedate) { + this.consenttermsofusedate = consenttermsofusedate; + } + + public String getLastconsenttermsofusedate() { + return lastconsenttermsofusedate; + } + + public void setLastconsenttermsofusedate(String lastconsenttermsofusedate) { + this.lastconsenttermsofusedate = lastconsenttermsofusedate; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/EoscIfGuidelines.java b/src/main/java/eu/dnetlib/dhp/schema/solr/EoscIfGuidelines.java new file mode 100644 index 0000000..3f2ac0a --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/EoscIfGuidelines.java @@ -0,0 +1,79 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +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 + */ +public class EoscIfGuidelines implements Serializable { + + private static final long serialVersionUID = -6460491699309783829L; + + /** + * EOSC-IF local code. Later on it could be populated with a PID (e.g. DOI), but for the time being we stick to + * a more loose definition. + */ + private String code; + + /** + * EOSC-IF label + */ + private String label; + + /** + * EOSC-IF url + */ + private String url; + + /** + * EOSC-IF semantic relation (e.g. compliesWith). Values shall be controlled by a dedicated vocabulary. + */ + private String semanticRelation; + + public static EoscIfGuidelines newInstance(String code, String label, String url, String semanticRelation) { + EoscIfGuidelines e = new EoscIfGuidelines(); + e.setCode(code); + e.setLabel(label); + e.setUrl(url); + e.setSemanticRelation(semanticRelation); + return e; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getSemanticRelation() { + return semanticRelation; + } + + public void setSemanticRelation(String semanticRelation) { + this.semanticRelation = semanticRelation; + } + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/ExtraInfo.java b/src/main/java/eu/dnetlib/dhp/schema/solr/ExtraInfo.java new file mode 100644 index 0000000..2e3ea83 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/ExtraInfo.java @@ -0,0 +1,10 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class ExtraInfo implements Serializable { + + private static final long serialVersionUID = -6627854860189757709L; + + //TODO define me! +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Funder.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Funder.java new file mode 100644 index 0000000..890da67 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Funder.java @@ -0,0 +1,66 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Funder implements Serializable { + + private static final long serialVersionUID = -8008317145200052214L; + + private String id; + private String shortname; + private String name; + private Country jurisdiction; + private List pid; + + public static Funder newInstance(String id, String shortname, String name, Country jurisdiction, List pid) { + Funder funder = new Funder(); + funder.setId(id); + funder.setShortname(shortname); + funder.setName(name); + funder.setJurisdiction(jurisdiction); + funder.setPid(pid); + return funder; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getShortname() { + return shortname; + } + + public void setShortname(String shortname) { + this.shortname = shortname; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public Country getJurisdiction() { + return jurisdiction; + } + + public void setJurisdiction(Country jurisdiction) { + this.jurisdiction = jurisdiction; + } + + public List getPid() { + return pid; + } + + public void setPid(List pid) { + this.pid = pid; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Funding.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Funding.java new file mode 100644 index 0000000..42df5c2 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Funding.java @@ -0,0 +1,62 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Funding implements Serializable { + + private static final long serialVersionUID = 1811734787904369695L; + + private Funder funder; + private FundingLevel level0; + private FundingLevel level1; + private FundingLevel level2; + + public static Funding newInstance(Funder funder, FundingLevel level0) { + return newInstance(funder, level0, null, null); + } + + public static Funding newInstance(Funder funder, FundingLevel level0, FundingLevel level1) { + return newInstance(funder, level0, level1, null); + } + + public static Funding newInstance(Funder funder, FundingLevel level0, FundingLevel level1, FundingLevel level2) { + Funding funding = new Funding(); + funding.setFunder(funder); + funding.setLevel0(level0); + funding.setLevel1(level1); + funding.setLevel2(level2); + return funding; + } + + public Funder getFunder() { + return funder; + } + + public void setFunder(Funder funder) { + this.funder = funder; + } + + public FundingLevel getLevel0() { + return level0; + } + + public void setLevel0(FundingLevel level0) { + this.level0 = level0; + } + + public FundingLevel getLevel1() { + return level1; + } + + public void setLevel1(FundingLevel level1) { + this.level1 = level1; + } + + public FundingLevel getLevel2() { + return level2; + } + + public void setLevel2(FundingLevel level2) { + this.level2 = level2; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/FundingLevel.java b/src/main/java/eu/dnetlib/dhp/schema/solr/FundingLevel.java new file mode 100644 index 0000000..93a56f3 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/FundingLevel.java @@ -0,0 +1,46 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class FundingLevel implements Serializable { + + private static final long serialVersionUID = 8270506546250477574L; + + private String id; + + private String description; + + private String name; + + public static FundingLevel newInstance(String id, String description, String name) { + FundingLevel level = new FundingLevel(); + level.setId(id); + level.setDescription(description); + level.setName(name); + return level; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Instance.java new file mode 100644 index 0000000..49c2263 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Instance.java @@ -0,0 +1,155 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Instance implements Serializable { + + private static final long serialVersionUID = 7440831757124257169L; + + private String license; + + private AccessRight accessright; + + private String instancetype; + + private Provenance hostedby; + + private List url; + + // other research products specifc + private String distributionlocation; + + private Provenance collectedfrom; + + private List pid; + + private List alternateIdentifier; + + private String dateofacceptance; + + // ( article | book ) processing charges. Defined here to cope with possible wrongly typed + // results + private APC processingcharges; + + private String refereed; // peer-review status + + private List measures; + + /** + * Direct fulltext URL. + */ + private String fulltext; + + public String getLicense() { + return license; + } + + public void setLicense(String license) { + this.license = license; + } + + public AccessRight getAccessright() { + return accessright; + } + + public void setAccessright(AccessRight accessright) { + this.accessright = accessright; + } + + public String getInstancetype() { + return instancetype; + } + + public void setInstancetype(String instancetype) { + this.instancetype = instancetype; + } + + public Provenance getHostedby() { + return hostedby; + } + + public void setHostedby(Provenance hostedby) { + this.hostedby = hostedby; + } + + public List getUrl() { + return url; + } + + public void setUrl(List url) { + this.url = url; + } + + public String getDistributionlocation() { + return distributionlocation; + } + + public void setDistributionlocation(String distributionlocation) { + this.distributionlocation = distributionlocation; + } + + public Provenance getCollectedfrom() { + return collectedfrom; + } + + public void setCollectedfrom(Provenance collectedfrom) { + this.collectedfrom = collectedfrom; + } + + public List getPid() { + return pid; + } + + public void setPid(List pid) { + this.pid = pid; + } + + public List getAlternateIdentifier() { + return alternateIdentifier; + } + + public void setAlternateIdentifier(List alternateIdentifier) { + this.alternateIdentifier = alternateIdentifier; + } + + public String getDateofacceptance() { + return dateofacceptance; + } + + public void setDateofacceptance(String dateofacceptance) { + this.dateofacceptance = dateofacceptance; + } + + public APC getProcessingcharges() { + return processingcharges; + } + + public void setProcessingcharges(APC processingcharges) { + this.processingcharges = processingcharges; + } + + public String getRefereed() { + return refereed; + } + + public void setRefereed(String refereed) { + this.refereed = refereed; + } + + public List getMeasures() { + return measures; + } + + public void setMeasures(List measures) { + this.measures = measures; + } + + public String getFulltext() { + return fulltext; + } + + public void setFulltext(String fulltext) { + this.fulltext = fulltext; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Journal.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Journal.java new file mode 100644 index 0000000..23c4487 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Journal.java @@ -0,0 +1,145 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Journal implements Serializable { + + private static final long serialVersionUID = -103050431178898773L; + + /** + * Name of the journal or conference + */ + private String name; + + /** + * The issn + */ + private String issnPrinted; + + /** + * The e-issn + */ + private String issnOnline; + + /** + * The kinking issn + */ + private String issnLinking; + + /** + * Start page + */ + private String sp; + + /** + * End page + */ + private String ep; + + /** + * Journal issue number + */ + private String iss; + + /** + * Volume + */ + private String vol; + + /** + * Edition of the journal or conference proceeding + */ + private String edition; + + private String conferenceplace; + + private String conferencedate; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getIssnPrinted() { + return issnPrinted; + } + + public void setIssnPrinted(String issnPrinted) { + this.issnPrinted = issnPrinted; + } + + public String getIssnOnline() { + return issnOnline; + } + + public void setIssnOnline(String issnOnline) { + this.issnOnline = issnOnline; + } + + public String getIssnLinking() { + return issnLinking; + } + + public void setIssnLinking(String issnLinking) { + this.issnLinking = issnLinking; + } + + public String getSp() { + return sp; + } + + public void setSp(String sp) { + this.sp = sp; + } + + public String getEp() { + return ep; + } + + public void setEp(String ep) { + this.ep = ep; + } + + public String getIss() { + return iss; + } + + public void setIss(String iss) { + this.iss = iss; + } + + public String getVol() { + return vol; + } + + public void setVol(String vol) { + this.vol = vol; + } + + public String getEdition() { + return edition; + } + + public void setEdition(String edition) { + this.edition = edition; + } + + public String getConferenceplace() { + return conferenceplace; + } + + public void setConferenceplace(String conferenceplace) { + this.conferenceplace = conferenceplace; + } + + public String getConferencedate() { + return conferencedate; + } + + public void setConferencedate(String conferencedate) { + this.conferencedate = conferencedate; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Language.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Language.java new file mode 100644 index 0000000..c6b84be --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Language.java @@ -0,0 +1,42 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Language implements Serializable { + + private static final long serialVersionUID = -8308628905005193974L; + + /** + * alpha-3/ISO 639-2 code of the language + */ + private String code; // the classid in the Qualifier + + /** + * Language label in English + */ + private String label; // the classname in the Qualifier + + public static Language newInstance(String code, String label) { + Language lang = new Language(); + lang.setCode(code); + lang.setLabel(label); + return lang; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Measure.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Measure.java new file mode 100644 index 0000000..5495ab2 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Measure.java @@ -0,0 +1,10 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Measure implements Serializable { + + private static final long serialVersionUID = 57939927121851504L; + + //TODO define me! +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessColor.java b/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessColor.java new file mode 100644 index 0000000..48407d8 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessColor.java @@ -0,0 +1,13 @@ + +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * The OpenAccess color meant to be used on the result level + */ +public enum OpenAccessColor implements Serializable { + + gold, hybrid, bronze + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessRoute.java b/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessRoute.java new file mode 100644 index 0000000..6d473ed --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessRoute.java @@ -0,0 +1,15 @@ + +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * This Enum models the OpenAccess status, currently including only the values from Unpaywall + * + * https://support.unpaywall.org/support/solutions/articles/44001777288-what-do-the-types-of-oa-status-green-gold-hybrid-and-bronze-mean- + */ +public enum OpenAccessRoute implements Serializable { + + gold, green, hybrid, bronze + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Organization.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Organization.java new file mode 100644 index 0000000..bf95575 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Organization.java @@ -0,0 +1,169 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Organization implements Serializable { + + private static final long serialVersionUID = -4287924905285274034L; + + private String legalshortname; + + private String legalname; + + private List alternativeNames; + + private String websiteurl; + + private String logourl; + + private String eclegalbody; + + private String eclegalperson; + + private String ecnonprofit; + + private String ecresearchorganization; + + private String echighereducation; + + private String ecinternationalorganizationeurinterests; + + private String ecinternationalorganization; + + private String ecenterprise; + + private String ecsmevalidated; + + private String ecnutscode; + + private CodeLabel country; + + public String getLegalshortname() { + return legalshortname; + } + + public void setLegalshortname(String legalshortname) { + this.legalshortname = legalshortname; + } + + public String getLegalname() { + return legalname; + } + + public void setLegalname(String legalname) { + this.legalname = legalname; + } + + public List getAlternativeNames() { + return alternativeNames; + } + + public void setAlternativeNames(List alternativeNames) { + this.alternativeNames = alternativeNames; + } + + public String getWebsiteurl() { + return websiteurl; + } + + public void setWebsiteurl(String websiteurl) { + this.websiteurl = websiteurl; + } + + public String getLogourl() { + return logourl; + } + + public void setLogourl(String logourl) { + this.logourl = logourl; + } + + public String getEclegalbody() { + return eclegalbody; + } + + public void setEclegalbody(String eclegalbody) { + this.eclegalbody = eclegalbody; + } + + public String getEclegalperson() { + return eclegalperson; + } + + public void setEclegalperson(String eclegalperson) { + this.eclegalperson = eclegalperson; + } + + public String getEcnonprofit() { + return ecnonprofit; + } + + public void setEcnonprofit(String ecnonprofit) { + this.ecnonprofit = ecnonprofit; + } + + public String getEcresearchorganization() { + return ecresearchorganization; + } + + public void setEcresearchorganization(String ecresearchorganization) { + this.ecresearchorganization = ecresearchorganization; + } + + public String getEchighereducation() { + return echighereducation; + } + + public void setEchighereducation(String echighereducation) { + this.echighereducation = echighereducation; + } + + public String getEcinternationalorganizationeurinterests() { + return ecinternationalorganizationeurinterests; + } + + public void setEcinternationalorganizationeurinterests(String ecinternationalorganizationeurinterests) { + this.ecinternationalorganizationeurinterests = ecinternationalorganizationeurinterests; + } + + public String getEcinternationalorganization() { + return ecinternationalorganization; + } + + public void setEcinternationalorganization(String ecinternationalorganization) { + this.ecinternationalorganization = ecinternationalorganization; + } + + public String getEcenterprise() { + return ecenterprise; + } + + public void setEcenterprise(String ecenterprise) { + this.ecenterprise = ecenterprise; + } + + public String getEcsmevalidated() { + return ecsmevalidated; + } + + public void setEcsmevalidated(String ecsmevalidated) { + this.ecsmevalidated = ecsmevalidated; + } + + public String getEcnutscode() { + return ecnutscode; + } + + public void setEcnutscode(String ecnutscode) { + this.ecnutscode = ecnutscode; + } + + public CodeLabel getCountry() { + return country; + } + + public void setCountry(CodeLabel country) { + this.country = country; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Pid.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Pid.java new file mode 100644 index 0000000..7c42c29 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Pid.java @@ -0,0 +1,35 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Pid implements Serializable { + + private static final long serialVersionUID = -943684282582228545L; + + private String type; + + private String value; + + public static Pid newInstance(String type, String value) { + Pid p = new Pid(); + p.setType(type); + p.setValue(value); + return p; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Project.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Project.java new file mode 100644 index 0000000..c41c4fa --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Project.java @@ -0,0 +1,173 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Project implements Serializable { + + private static final long serialVersionUID = -3712733565189222788L; + + private String websiteurl; + + private String code; + private String acronym; + private String title; + private String startdate; + private String enddate; + private String callidentifier; + private String keywords; + private String duration; + + private String ecarticle29_3; + + private List subjects; + + private CodeLabel contracttype; + + private String summary; + + private String currency; + + private Float totalcost; + + private Float fundedamount; + + private Funding funding; + + + public String getWebsiteurl() { + return websiteurl; + } + + public void setWebsiteurl(String websiteurl) { + this.websiteurl = websiteurl; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getAcronym() { + return acronym; + } + + public void setAcronym(String acronym) { + this.acronym = acronym; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getStartdate() { + return startdate; + } + + public void setStartdate(String startdate) { + this.startdate = startdate; + } + + public String getEnddate() { + return enddate; + } + + public void setEnddate(String enddate) { + this.enddate = enddate; + } + + public String getCallidentifier() { + return callidentifier; + } + + public void setCallidentifier(String callidentifier) { + this.callidentifier = callidentifier; + } + + public String getKeywords() { + return keywords; + } + + public void setKeywords(String keywords) { + this.keywords = keywords; + } + + public String getDuration() { + return duration; + } + + public void setDuration(String duration) { + this.duration = duration; + } + + public String getEcarticle29_3() { + return ecarticle29_3; + } + + public void setEcarticle29_3(String ecarticle29_3) { + this.ecarticle29_3 = ecarticle29_3; + } + + public List getSubjects() { + return subjects; + } + + public void setSubjects(List subjects) { + this.subjects = subjects; + } + + public CodeLabel getContracttype() { + return contracttype; + } + + public void setContracttype(CodeLabel contracttype) { + this.contracttype = contracttype; + } + + public String getSummary() { + return summary; + } + + public void setSummary(String summary) { + this.summary = summary; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public Float getTotalcost() { + return totalcost; + } + + public void setTotalcost(Float totalcost) { + this.totalcost = totalcost; + } + + public Float getFundedamount() { + return fundedamount; + } + + public void setFundedamount(Float fundedamount) { + this.fundedamount = fundedamount; + } + + public Funding getFunding() { + return funding; + } + + public void setFunding(Funding funding) { + this.funding = funding; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Provenance.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Provenance.java new file mode 100644 index 0000000..05c96c6 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Provenance.java @@ -0,0 +1,35 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Provenance implements Serializable { + + private static final long serialVersionUID = -474833313621479191L; + + private String dsId; + + private String dsName; + + public static Provenance newInstance(String dsId, String dsName) { + Provenance p = new Provenance(); + p.setDsId(dsId); + p.setDsName(dsName); + return p; + } + + public String getDsId() { + return dsId; + } + + public void setDsId(String dsId) { + this.dsId = dsId; + } + + public String getDsName() { + return dsName; + } + + public void setDsName(String dsName) { + this.dsName = dsName; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/RecordType.java b/src/main/java/eu/dnetlib/dhp/schema/solr/RecordType.java new file mode 100644 index 0000000..1f4b13e --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/RecordType.java @@ -0,0 +1,14 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public enum RecordType implements Serializable { + publication, + dataset, + otherresearchproduct, + software, + datasource, + organization, + project; + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecord.java b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecord.java new file mode 100644 index 0000000..1b20777 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecord.java @@ -0,0 +1,218 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class RelatedRecord implements Serializable { + + private static final long serialVersionUID = -7251015928787319389L; + + private RelatedRecordHeader header; + + // common fields + private String title; + private String websiteurl; // datasource, organizations, projects + + // results + private String dateofacceptance; + private String publisher; + private List pid; + private String codeRepositoryUrl; + private String resulttype; + private List collectedfrom; + private List instances; + + // datasource + private String officialname; + private CodeLabel datasourcetype; + private CodeLabel datasourcetypeui; + private CodeLabel openairecompatibility; + + // organization + private String legalname; + private String legalshortname; + private Country country; + + // project + private String projectTitle; + private String code; + private String acronym; + private CodeLabel contracttype; + private Funding funding; + + public RelatedRecordHeader getHeader() { + return header; + } + + public void setHeader(RelatedRecordHeader header) { + this.header = header; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getWebsiteurl() { + return websiteurl; + } + + public void setWebsiteurl(String websiteurl) { + this.websiteurl = websiteurl; + } + + public String getDateofacceptance() { + return dateofacceptance; + } + + public void setDateofacceptance(String dateofacceptance) { + this.dateofacceptance = dateofacceptance; + } + + public String getPublisher() { + return publisher; + } + + public void setPublisher(String publisher) { + this.publisher = publisher; + } + + public List getPid() { + return pid; + } + + public void setPid(List pid) { + this.pid = pid; + } + + public String getCodeRepositoryUrl() { + return codeRepositoryUrl; + } + + public void setCodeRepositoryUrl(String codeRepositoryUrl) { + this.codeRepositoryUrl = codeRepositoryUrl; + } + + public String getResulttype() { + return resulttype; + } + + public void setResulttype(String resulttype) { + this.resulttype = resulttype; + } + + public List getCollectedfrom() { + return collectedfrom; + } + + public void setCollectedfrom(List collectedfrom) { + this.collectedfrom = collectedfrom; + } + + public List getInstances() { + return instances; + } + + public void setInstances(List instances) { + this.instances = instances; + } + + public String getOfficialname() { + return officialname; + } + + public void setOfficialname(String officialname) { + this.officialname = officialname; + } + + public CodeLabel getDatasourcetype() { + return datasourcetype; + } + + public void setDatasourcetype(CodeLabel datasourcetype) { + this.datasourcetype = datasourcetype; + } + + public CodeLabel getDatasourcetypeui() { + return datasourcetypeui; + } + + public void setDatasourcetypeui(CodeLabel datasourcetypeui) { + this.datasourcetypeui = datasourcetypeui; + } + + public CodeLabel getOpenairecompatibility() { + return openairecompatibility; + } + + public void setOpenairecompatibility(CodeLabel openairecompatibility) { + this.openairecompatibility = openairecompatibility; + } + + public String getLegalname() { + return legalname; + } + + public void setLegalname(String legalname) { + this.legalname = legalname; + } + + public String getLegalshortname() { + return legalshortname; + } + + public void setLegalshortname(String legalshortname) { + this.legalshortname = legalshortname; + } + + public Country getCountry() { + return country; + } + + public void setCountry(Country country) { + this.country = country; + } + + public String getProjectTitle() { + return projectTitle; + } + + public void setProjectTitle(String projectTitle) { + this.projectTitle = projectTitle; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getAcronym() { + return acronym; + } + + public void setAcronym(String acronym) { + this.acronym = acronym; + } + + public CodeLabel getContracttype() { + return contracttype; + } + + public void setContracttype(CodeLabel contracttype) { + this.contracttype = contracttype; + } + + public Funding getFunding() { + return funding; + } + + public void setFunding(Funding funding) { + this.funding = funding; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecordHeader.java b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecordHeader.java new file mode 100644 index 0000000..db89b6c --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecordHeader.java @@ -0,0 +1,57 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class RelatedRecordHeader implements Serializable { + + private static final long serialVersionUID = -1491635071695452382L; + + private String relationType; + + private String relationClass; + + private String relatedIdentifier; + + private RecordType relatedRecordType; + + 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); + return header; + } + + public String getRelationType() { + return relationType; + } + + public void setRelationType(String relationType) { + this.relationType = relationType; + } + + public String getRelationClass() { + return relationClass; + } + + public void setRelationClass(String relationClass) { + this.relationClass = relationClass; + } + + public String getRelatedIdentifier() { + return relatedIdentifier; + } + + public void setRelatedIdentifier(String relatedIdentifier) { + this.relatedIdentifier = relatedIdentifier; + } + + public RecordType getRelatedRecordType() { + return relatedRecordType; + } + + public void setRelatedRecordType(RecordType relatedRecordType) { + this.relatedRecordType = relatedRecordType; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Result.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Result.java new file mode 100644 index 0000000..a8e481d --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Result.java @@ -0,0 +1,431 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Result implements Serializable { + + private static final long serialVersionUID = -9121038426985022737L; + + /** + * Type of the result: one of 'publication', 'dataset', 'software', 'other' (see also https://api.openaire.eu/vocabularies/dnet:result_typologies) + */ + private String resulttype; + + /** + * Authors of the result + */ + private List author; + + /** + * The Subject. + */ + private List subject; + + /** + * The result language + */ + private Language language; + + /** + * The list of countries associated to this result + */ + private List country; + + /** + * A name or title by which a scientific result is known. May be the title of a publication, of a dataset or the name of a piece of software. + */ + private String maintitle; + + /** + * Explanatory or alternative names by which a scientific result is known. + */ + private List otherTitles; + + private List description; + + /** + * Main date of the research product: typically the publication or issued date. In case of a research result with + * different versions with different dates, the date of the result is selected as the most frequent well-formatted date. + * If not available, then the most recent and complete date among those that are well-formatted. + * For statistics, the year is extracted and the result is counted only among the result of that year. + * Example: + * Pre-print date: 2019-02-03, + * Article date provided by repository: 2020-02, + * Article date provided by Crossref: 2020, + * OpenAIRE will set as date 2019-02-03, because it’s the most recent among the complete and well-formed dates. + * If then the repository updates the metadata and set a complete date (e.g. 2020-02-12), then this will be the new + * date for the result because it becomes the most recent most complete date. + * However, if OpenAIRE then collects the pre-print from another repository with date 2019-02-03, then this will be + * the “winning date” because it becomes the most frequent well-formatted date. + */ + private String publicationdate; // dateofacceptance + + /** + * The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource. + */ + private String publisher; + + /** + * Date when the embargo ends and this result turns Open Access + */ + private String embargoenddate; + + /** + * See definition of Dublin Core field dc:source + */ + private List source; + + private List format; + + /** + * Contributors for the result + */ + private List contributor; + + private List coverage; + + /** + * The openest of the access rights of this result. + */ + private BestAccessRight bestaccessright; + + /** + * The direct link to the full-text as collected from the data source + */ + private List fulltext; + + /** + * Journal has information about the conference or journal where the result has been presented or published + */ + private Journal journal; + + /** + * Only for results with type 'software': URL to the software documentation + */ + private List documentationUrl; // software + + /** + * Only for results with type 'software': the URL to the repository with the source code + */ + private String codeRepositoryUrl; // software + + /** + * Only for results with type 'software': the programming language + */ + private String programmingLanguage; // software + + /** + * Only for results with type 'software': Information on the person responsible for providing further information regarding the resource + */ + private List contactperson; // orp + + /** + * Only for results with type 'software': Information on the group responsible for providing further information regarding the resource + */ + private List contactgroup; // orp + + /** + * Only for results with type 'other': tool useful for the interpretation and/or re-used of the research product + */ + private List tool; // orp + + /** + * Only for results with type 'dataset': the declared size of the dataset + */ + private String size; // dataset + + /** + * Version of the result + */ + private String version; // dataset + + /** + * EOSC Interoperability Framework Guidelines + */ + private List eoscifguidelines; + + @JsonProperty("isGreen") + private Boolean isGreen; + + private OpenAccessColor openAccessColor; + + @JsonProperty("isInDiamondJournal") + private Boolean isInDiamondJournal; + + private Boolean publiclyFunded; + + private String transformativeAgreement; + + /** + * Each instance is one specific materialisation or version of the result. For example, you can have one result with + * three instance: one is the pre-print, one is the post-print, one is te published version + */ + private List instance; + + public String getResulttype() { + return resulttype; + } + + public void setResulttype(String resulttype) { + this.resulttype = resulttype; + } + + public List getAuthor() { + return author; + } + + public void setAuthor(List author) { + this.author = author; + } + + public List getSubject() { + return subject; + } + + public void setSubject(List subject) { + this.subject = subject; + } + + public Language getLanguage() { + return language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public List getCountry() { + return country; + } + + public void setCountry(List country) { + this.country = country; + } + + public String getMaintitle() { + return maintitle; + } + + public void setMaintitle(String maintitle) { + this.maintitle = maintitle; + } + + public List getOtherTitles() { + return otherTitles; + } + + public void setOtherTitles(List otherTitles) { + this.otherTitles = otherTitles; + } + + public List getDescription() { + return description; + } + + public void setDescription(List description) { + this.description = description; + } + + public String getPublicationdate() { + return publicationdate; + } + + public void setPublicationdate(String publicationdate) { + this.publicationdate = publicationdate; + } + + public String getPublisher() { + return publisher; + } + + public void setPublisher(String publisher) { + this.publisher = publisher; + } + + public String getEmbargoenddate() { + return embargoenddate; + } + + public void setEmbargoenddate(String embargoenddate) { + this.embargoenddate = embargoenddate; + } + + public List getSource() { + return source; + } + + public void setSource(List source) { + this.source = source; + } + + public List getFormat() { + return format; + } + + public void setFormat(List format) { + this.format = format; + } + + public List getContributor() { + return contributor; + } + + public void setContributor(List contributor) { + this.contributor = contributor; + } + + public List getCoverage() { + return coverage; + } + + public void setCoverage(List coverage) { + this.coverage = coverage; + } + + public BestAccessRight getBestaccessright() { + return bestaccessright; + } + + public void setBestaccessright(BestAccessRight bestaccessright) { + this.bestaccessright = bestaccessright; + } + + public List getFulltext() { + return fulltext; + } + + public void setFulltext(List fulltext) { + this.fulltext = fulltext; + } + + public Journal getJournal() { + return journal; + } + + public void setJournal(Journal journal) { + this.journal = journal; + } + + public List getDocumentationUrl() { + return documentationUrl; + } + + public void setDocumentationUrl(List documentationUrl) { + this.documentationUrl = documentationUrl; + } + + public String getCodeRepositoryUrl() { + return codeRepositoryUrl; + } + + public void setCodeRepositoryUrl(String codeRepositoryUrl) { + this.codeRepositoryUrl = codeRepositoryUrl; + } + + public String getProgrammingLanguage() { + return programmingLanguage; + } + + public void setProgrammingLanguage(String programmingLanguage) { + this.programmingLanguage = programmingLanguage; + } + + public List getContactperson() { + return contactperson; + } + + public void setContactperson(List contactperson) { + this.contactperson = contactperson; + } + + public List getContactgroup() { + return contactgroup; + } + + public void setContactgroup(List contactgroup) { + this.contactgroup = contactgroup; + } + + public List getTool() { + return tool; + } + + public void setTool(List tool) { + this.tool = tool; + } + + public String getSize() { + return size; + } + + public void setSize(String size) { + this.size = size; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public List getEoscifguidelines() { + return eoscifguidelines; + } + + public void setEoscifguidelines(List eoscifguidelines) { + this.eoscifguidelines = eoscifguidelines; + } + + public Boolean getGreen() { + return isGreen; + } + + public void setGreen(Boolean green) { + isGreen = green; + } + + public OpenAccessColor getOpenAccessColor() { + return openAccessColor; + } + + public void setOpenAccessColor(OpenAccessColor openAccessColor) { + this.openAccessColor = openAccessColor; + } + + public Boolean getInDiamondJournal() { + return isInDiamondJournal; + } + + public void setInDiamondJournal(Boolean inDiamondJournal) { + isInDiamondJournal = inDiamondJournal; + } + + public Boolean getPubliclyFunded() { + return publiclyFunded; + } + + public void setPubliclyFunded(Boolean publiclyFunded) { + this.publiclyFunded = publiclyFunded; + } + + public String getTransformativeAgreement() { + return transformativeAgreement; + } + + public void setTransformativeAgreement(String transformativeAgreement) { + this.transformativeAgreement = transformativeAgreement; + } + + public List getInstance() { + return instance; + } + + public void setInstance(List instance) { + this.instance = instance; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecord.java b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecord.java new file mode 100644 index 0000000..5879af9 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecord.java @@ -0,0 +1,122 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class SolrRecord implements Serializable { + + private static final long serialVersionUID = 2852901817696335899L; + + private SolrRecordHeader header; + + private List collectedfrom; + + /** + * List of persistent identifiers + */ + private List pid; + + private List context; + + private List measures; + + private List extraInfo; + + private Result result; + + private Datasource datasource; + + private Project project; + + private Organization organization; + + private List links; + + public SolrRecordHeader getHeader() { + return header; + } + + public void setHeader(SolrRecordHeader header) { + this.header = header; + } + + public List getCollectedfrom() { + return collectedfrom; + } + + public void setCollectedfrom(List collectedfrom) { + this.collectedfrom = collectedfrom; + } + + public List getPid() { + return pid; + } + + public void setPid(List pid) { + this.pid = pid; + } + + public List getContext() { + return context; + } + + public void setContext(List context) { + this.context = context; + } + + public List getMeasures() { + return measures; + } + + public void setMeasures(List measures) { + this.measures = measures; + } + + public List getExtraInfo() { + return extraInfo; + } + + public void setExtraInfo(List extraInfo) { + this.extraInfo = extraInfo; + } + + public Result getResult() { + return result; + } + + public void setResult(Result result) { + this.result = result; + } + + public Datasource getDatasource() { + return datasource; + } + + public void setDatasource(Datasource datasource) { + this.datasource = datasource; + } + + public Project getProject() { + return project; + } + + public void setProject(Project project) { + this.project = project; + } + + public Organization getOrganization() { + return organization; + } + + public void setOrganization(Organization organization) { + this.organization = organization; + } + + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecordHeader.java b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecordHeader.java new file mode 100644 index 0000000..04bde53 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecordHeader.java @@ -0,0 +1,64 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class SolrRecordHeader implements Serializable { + + private static final long serialVersionUID = -6052397109220149426L; + + /** + * The OpenAIRE identifiers for this record + */ + private String id; + + /** + * Identifiers of the record at the original sources + */ + private List originalId; + + private RecordType recordType; + + private Boolean deletedbyinference; + + public static SolrRecordHeader newInstance(String id, List originalId, RecordType recordType, Boolean deletedbyinference) { + SolrRecordHeader header = new SolrRecordHeader(); + header.setId(id); + header.setOriginalId(originalId); + header.setRecordType(recordType); + header.setDeletedbyinference(deletedbyinference); + return header; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public List getOriginalId() { + return originalId; + } + + public void setOriginalId(List originalId) { + this.originalId = originalId; + } + + public RecordType getRecordType() { + return recordType; + } + + public void setRecordType(RecordType recordType) { + this.recordType = recordType; + } + + public Boolean getDeletedbyinference() { + return deletedbyinference; + } + + public void setDeletedbyinference(Boolean deletedbyinference) { + this.deletedbyinference = deletedbyinference; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Subject.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Subject.java new file mode 100644 index 0000000..9f13c41 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Subject.java @@ -0,0 +1,35 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Subject implements Serializable { + + private static final long serialVersionUID = -7242293435544930481L; + + private String value; + + private String type; + + public static Subject newInstance(String value, String type) { + Subject s = new Subject(); + s.setValue(value); + s.setType(type); + return s; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } +}