Class Orcidv3AuthorityValue


  • public class Orcidv3AuthorityValue
    extends PersonAuthorityValue
    An AuthorityValue encapsulating information retrieved from ORCID
    Author:
    Jonas Van Goolen (jonas at atmire dot com)
    • 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
      • 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:
        getSolrInputDocument in class PersonAuthorityValue
        Returns:
        SolrInputDocument
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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:
        hasTheSameInformationAs in class PersonAuthorityValue
        Parameters:
        o - object
        Returns:
        true or false
      • setValues

        public void setValues​(org.apache.solr.common.SolrDocument document)
        Description copied from class: AuthorityValue
        Initialize this instance based on a solr record
        Overrides:
        setValues in class PersonAuthorityValue
        Parameters:
        document - SolrDocument