2021-04-23 12:15:36 +02:00
package eu.dnetlib.dhp.schema.dump.oaf ;
2021-11-18 09:16:59 +01:00
import com.fasterxml.jackson.annotation.JsonIgnore ;
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema ;
import org.apache.commons.lang3.StringUtils ;
2021-04-23 12:15:36 +02:00
import java.io.Serializable ;
import java.util.List ;
/ * *
* Represents the manifestations ( i . e . different versions ) of the result . For example : the pre - print and the published
* versions are two manifestations of the same research result . It has the following parameters : - license of type
* String to store the license applied to the instance . It corresponds to the value of the licence in the instance to be
* dumped - accessright of type eu . dnetlib . dhp . schema . dump . oaf . AccessRight to store the accessright of the instance . -
* type of type String to store the type of the instance as defined in the corresponding dnet vocabulary
* ( dnet : pubication_resource ) . It corresponds to the instancetype . classname of the instance to be mapped - url of type
* List < String > list of locations where the instance is accessible . It corresponds to url of the instance to be dumped -
* publicationdate of type String to store the publication date of the instance ; // dateofacceptance; - refereed of type
2021-05-20 11:05:52 +02:00
* String to store information abour the review status of the instance . Possible values are ' Unknown ' ,
2021-04-23 12:15:36 +02:00
* ' nonPeerReviewed ' , ' peerReviewed ' . It corresponds to refereed . classname of the instance to be dumped
2021-05-20 11:05:52 +02:00
* - articleprocessingcharge of type APC to store the article processing charges possibly associated to the instance
2021-08-05 12:04:10 +02:00
* - pid of type List < ControlledField > that is the list of pids associated to the result coming from authoritative sources for that pid
* - alternateIdentifier of type List < ControlledField > that is the list of pids associated to the result coming from NON authoritative
* sources for that pid
2021-11-16 10:30:06 +01:00
* - measure list < KeyValue > to represent the measure computed for this instance ( for example the Bip ! Finder ones ) . It corresponds to measures in the model
2021-04-23 12:15:36 +02:00
* /
public class Instance implements Serializable {
2021-11-18 09:16:59 +01:00
@JsonSchema ( description = " Measures computed for this instance, for example Bip!Finder ones " )
private List < Measure > measures ;
2021-11-15 16:26:32 +01:00
2021-11-18 09:16:59 +01:00
private List < ResultPid > pid ;
2021-08-05 12:04:10 +02:00
2021-11-18 09:16:59 +01:00
@JsonSchema ( description = " All the identifiers other than pids forged by an authorithy for the pid type (i.e. Crossref for DOIs " )
private List < AlternateIdentifier > alternateIdentifier ;
2021-08-05 12:04:10 +02:00
2021-04-23 12:15:36 +02:00
private String license ;
2021-11-18 09:16:59 +01:00
@JsonSchema ( description = " The accessRights for this materialization of the result " )
2021-04-23 12:15:36 +02:00
private AccessRight accessright ;
2021-11-18 09:16:59 +01:00
@JsonSchema ( description = " The specific sub-type of this instance (see https://api.openaire.eu/vocabularies/dnet:result_typologies following the links) " )
2021-04-23 12:15:36 +02:00
private String type ;
2021-11-18 09:16:59 +01:00
@JsonSchema ( description = " URLs to the instance. They may link to the actual full-text or to the landing page at the hosting source. " )
2021-04-23 12:15:36 +02:00
private List < String > url ;
2021-11-18 09:16:59 +01:00
@JsonSchema ( description = " The money spent to make this book or article available in Open Access. Source for this information is the OpenAPC initiative. " )
2021-05-20 11:05:52 +02:00
private APC articleprocessingcharge ;
2021-11-18 09:16:59 +01:00
@JsonSchema ( description = " Date of the research product " )
2021-04-23 12:15:36 +02:00
private String publicationdate ; // dateofacceptance;
2021-11-18 09:16:59 +01:00
@JsonSchema ( description = " If this instance has been peer-reviewed or not. Allowed values are peerReviewed, " +
" nonPeerReviewed, UNKNOWN (as defined in https://api.openaire.eu/vocabularies/dnet:review_levels) " )
2021-04-23 12:15:36 +02:00
private String refereed ; // peer-review status
2021-11-18 09:16:59 +01:00
2021-04-23 12:15:36 +02:00
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 getType ( ) {
return type ;
}
public void setType ( String type ) {
this . type = type ;
}
public List < String > getUrl ( ) {
return url ;
}
public void setUrl ( List < String > url ) {
this . url = url ;
}
public String getPublicationdate ( ) {
return publicationdate ;
}
public void setPublicationdate ( String publicationdate ) {
this . publicationdate = publicationdate ;
}
public String getRefereed ( ) {
return refereed ;
}
public void setRefereed ( String refereed ) {
this . refereed = refereed ;
}
2021-05-20 11:05:52 +02:00
public APC getArticleprocessingcharge ( ) {
return articleprocessingcharge ;
}
public void setArticleprocessingcharge ( APC articleprocessingcharge ) {
this . articleprocessingcharge = articleprocessingcharge ;
}
2021-08-05 12:04:10 +02:00
2021-11-18 09:16:59 +01:00
public List < ResultPid > getPid ( ) {
2021-08-05 12:04:10 +02:00
return pid ;
}
2021-11-18 09:16:59 +01:00
public void setPid ( List < ResultPid > pid ) {
2021-08-05 12:04:10 +02:00
this . pid = pid ;
}
2021-11-18 09:16:59 +01:00
public List < AlternateIdentifier > getAlternateIdentifier ( ) {
2021-08-05 12:04:10 +02:00
return alternateIdentifier ;
}
2021-11-18 09:16:59 +01:00
public void setAlternateIdentifier ( List < AlternateIdentifier > alternateIdentifier ) {
2021-08-05 12:04:10 +02:00
this . alternateIdentifier = alternateIdentifier ;
}
2021-11-15 16:26:32 +01:00
2021-11-18 09:16:59 +01:00
public List < Measure > getMeasures ( ) {
2021-11-15 16:26:32 +01:00
return measures ;
}
2021-11-18 09:16:59 +01:00
public void setMeasures ( List < Measure > measures ) {
2021-11-15 16:26:32 +01:00
this . measures = measures ;
}
2021-04-23 12:15:36 +02:00
}
2021-11-18 09:16:59 +01:00
class Measure implements Serializable {
@JsonSchema ( description = " The measure (i.e. popularity) " )
private String key ;
@JsonSchema ( description = " The value for that measure " )
private String value ;
public String getKey ( ) {
return key ;
}
public void setKey ( String key ) {
this . key = key ;
}
public String getValue ( ) {
return value ;
}
public void setValue ( String value ) {
this . value = value ;
}
public static Measure newInstance ( String key , String value ) {
Measure inst = new Measure ( ) ;
inst . key = key ;
inst . value = value ;
return inst ;
}
@JsonIgnore
public boolean isBlank ( ) {
return StringUtils . isBlank ( key ) & & StringUtils . isBlank ( value ) ;
}
}
class AlternateIdentifier implements Serializable {
@JsonSchema ( description = " The scheme of the identifier. It can be a persistent identifier (i.e. doi). If it is present in the alternate identifiers " +
" it means it has not been forged by an authority for that pid. For example we collect metadata from an institutional repository that provides " +
" as identifier for the result also the doi " )
private String scheme ;
@JsonSchema ( description = " The value expressed in the scheme " )
private String value ;
public String getScheme ( ) {
return scheme ;
}
public void setScheme ( String scheme ) {
this . scheme = scheme ;
}
public String getValue ( ) {
return value ;
}
public void setValue ( String value ) {
this . value = value ;
}
public static AlternateIdentifier newInstance ( String scheme , String value ) {
AlternateIdentifier cf = new AlternateIdentifier ( ) ;
cf . setScheme ( scheme ) ;
cf . setValue ( value ) ;
return cf ;
}
}