Package org.dspace.authority.orcid
Class Orcidv3AuthorityValue
- java.lang.Object
-
- org.dspace.authority.AuthorityValue
-
- org.dspace.authority.PersonAuthorityValue
-
- org.dspace.authority.orcid.Orcidv3AuthorityValue
-
public class Orcidv3AuthorityValue extends PersonAuthorityValue
AnAuthorityValueencapsulating information retrieved from ORCID- Author:
- Jonas Van Goolen (jonas at atmire dot com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringORCID_ID_SYNTAXThe syntax that the ORCID id needs to conform to
-
Constructor Summary
Constructors Constructor Description Orcidv3AuthorityValue()Creates an instance of Orcidv3AuthorityValue with only uninitialized fields.Orcidv3AuthorityValue(org.apache.solr.common.SolrDocument document)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOtherMetadata(String label, String data)Add additional metadata to the otherMetadata mapMap<String,String>choiceSelectMap()Information that can be used the choice uistatic Orcidv3AuthorityValuecreate()Create an empty authority.static Orcidv3AuthorityValuecreate(org.orcid.jaxb.model.v3.release.record.Person person)Create an authority based on a given orcid biobooleanequals(Object o)StringgenerateString()Provides a string that will allow this AuthorityType to be recognized and provides information to create a new instance to be created using public Orcidv3AuthorityValue newInstance(String info).StringgetAuthorityType()StringgetOrcid_id()Map<String,List<String>>getOtherMetadata()org.apache.solr.common.SolrInputDocumentgetSolrInputDocument()Generate a solr record from this instanceinthashCode()booleanhasTheSameInformationAs(Object o)The regular equals() only checks if both AuthorityValues describe the same authority.booleanisNewMetadata(String label, String data)Check to see if the provided label / data pair is already present in the "otherMetadata" or notAuthorityValuenewInstance(String info)Makes an instance of the AuthorityValue with the given information.voidsetOrcid_id(String orcid_id)voidsetValue(String value)voidsetValues(org.apache.solr.common.SolrDocument document)Initialize this instance based on a solr recordprotected voidsetValues(org.orcid.jaxb.model.v3.release.record.Person person)Initialize this instance based on a Person object-
Methods inherited from class org.dspace.authority.PersonAuthorityValue
addEmail, addNameVariant, getEmails, getFirstName, getInstitution, getLastName, getName, getNameVariants, setFirstName, setInstitution, setLastName, setName, toString
-
Methods inherited from class org.dspace.authority.AuthorityValue
delete, getCreationDate, getDateFormatters, getField, getId, getLastModified, getValue, isDeleted, setCreationDate, setCreationDate, setDeleted, setField, setId, setLastModified, setLastModified, stringToDate, update, updateItem, updateLastModifiedDate
-
-
-
-
Field Detail
-
ORCID_ID_SYNTAX
public static final String ORCID_ID_SYNTAX
The syntax that the ORCID id needs to conform to- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Orcidv3AuthorityValue
public Orcidv3AuthorityValue()
Creates an instance of Orcidv3AuthorityValue with only uninitialized fields. This is meant to be filled in with values from an existing record. To create a brand new Orcidv3AuthorityValue, use create()
-
Orcidv3AuthorityValue
public Orcidv3AuthorityValue(org.apache.solr.common.SolrDocument document)
-
-
Method Detail
-
getOrcid_id
public String getOrcid_id()
-
setOrcid_id
public void setOrcid_id(String orcid_id)
-
create
public static Orcidv3AuthorityValue create()
Create an empty authority.- Returns:
- OrcidAuthorityValue
-
create
public static Orcidv3AuthorityValue create(org.orcid.jaxb.model.v3.release.record.Person person)
Create an authority based on a given orcid bio- Returns:
- OrcidAuthorityValue
-
setValues
protected void setValues(org.orcid.jaxb.model.v3.release.record.Person person)
Initialize this instance based on a Person object- Parameters:
person- Person
-
newInstance
public AuthorityValue newInstance(String info)
Makes an instance of the AuthorityValue with the given information.- Overrides:
newInstancein classPersonAuthorityValue- Parameters:
info- string info- Returns:
- AuthorityValue
-
setValue
public void setValue(String value)
- Overrides:
setValuein classPersonAuthorityValue
-
isNewMetadata
public boolean isNewMetadata(String label, String data)
Check to see if the provided label / data pair is already present in the "otherMetadata" or not
-
addOtherMetadata
public void addOtherMetadata(String label, String data)
Add additional metadata to the otherMetadata map
-
getSolrInputDocument
public org.apache.solr.common.SolrInputDocument getSolrInputDocument()
Generate a solr record from this instance- Overrides:
getSolrInputDocumentin classPersonAuthorityValue- Returns:
- SolrInputDocument
-
choiceSelectMap
public Map<String,String> choiceSelectMap()
Information that can be used the choice ui- Overrides:
choiceSelectMapin classPersonAuthorityValue- Returns:
- map
-
getAuthorityType
public String getAuthorityType()
- Overrides:
getAuthorityTypein classPersonAuthorityValue
-
generateString
public String generateString()
Provides a string that will allow this AuthorityType to be recognized and provides information to create a new instance to be created using public Orcidv3AuthorityValue newInstance(String info).- Overrides:
generateStringin classPersonAuthorityValue- Returns:
- see
AuthorityValueService.GENERATE
-
hasTheSameInformationAs
public boolean hasTheSameInformationAs(Object o)
The regular equals() only checks if both AuthorityValues describe the same authority. This method checks if the AuthorityValues have different information E.g. it is used to decide when lastModified should be updated.- Overrides:
hasTheSameInformationAsin classPersonAuthorityValue- Parameters:
o- object- Returns:
- true or false
-
setValues
public void setValues(org.apache.solr.common.SolrDocument document)
Description copied from class:AuthorityValueInitialize this instance based on a solr record- Overrides:
setValuesin classPersonAuthorityValue- Parameters:
document- SolrDocument
-
-