Package org.dspace.authority.orcid
Class Orcidv3AuthorityValue
java.lang.Object
org.dspace.authority.AuthorityValue
org.dspace.authority.PersonAuthorityValue
org.dspace.authority.orcid.Orcidv3AuthorityValue
An
AuthorityValue encapsulating information retrieved from ORCID- Author:
- Jonas Van Goolen (jonas at atmire dot com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe syntax that the ORCID id needs to conform to -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of Orcidv3AuthorityValue with only uninitialized fields.Orcidv3AuthorityValue(org.apache.solr.common.SolrDocument document) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOtherMetadata(String label, String data) Add additional metadata to the otherMetadata mapInformation 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 biobooleanProvides 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).Get the type of authority which created this value.org.apache.solr.common.SolrInputDocumentGenerate a solr record from this instanceinthashCode()booleanThe 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 notnewInstance(String info) Makes an instance of the AuthorityValue with the given information.voidsetOrcid_id(String orcid_id) voidvoidsetValues(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 objectMethods inherited from class org.dspace.authority.PersonAuthorityValue
addEmail, addNameVariant, getEmails, getFirstName, getInstitution, getLastName, getName, getNameVariants, setFirstName, setInstitution, setLastName, setName, toStringMethods inherited from class org.dspace.authority.AuthorityValue
delete, getCreationDate, getField, getId, getLastModified, getValue, isDeleted, setCreationDate, setCreationDate, setDeleted, setField, setId, setLastModified, setLastModified, stringToDate, update, updateItem, updateLastModifiedDate
-
Field Details
-
ORCID_ID_SYNTAX
The syntax that the ORCID id needs to conform to- See Also:
-
-
Constructor Details
-
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 Details
-
getOrcid_id
-
setOrcid_id
-
create
Create an empty authority.- Returns:
- OrcidAuthorityValue
-
create
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
Makes an instance of the AuthorityValue with the given information.- Overrides:
newInstancein classPersonAuthorityValue- Parameters:
info- string info- Returns:
- AuthorityValue
-
setValue
- Overrides:
setValuein classPersonAuthorityValue
-
isNewMetadata
Check to see if the provided label / data pair is already present in the "otherMetadata" or not -
addOtherMetadata
Add additional metadata to the otherMetadata map -
getOtherMetadata
-
getSolrInputDocument
public org.apache.solr.common.SolrInputDocument getSolrInputDocument()Generate a solr record from this instance- Overrides:
getSolrInputDocumentin classPersonAuthorityValue- Returns:
- SolrInputDocument
-
choiceSelectMap
Information that can be used the choice ui- Overrides:
choiceSelectMapin classPersonAuthorityValue- Returns:
- map
-
getAuthorityType
Description copied from class:AuthorityValueGet the type of authority which created this value.- Overrides:
getAuthorityTypein classPersonAuthorityValue- Returns:
- type name.
-
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
-
equals
-
hashCode
public int hashCode() -
hasTheSameInformationAs
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
-