Class Orcidv3AuthorityValue


public class Orcidv3AuthorityValue extends PersonAuthorityValue
An AuthorityValue encapsulating information retrieved from ORCID
Author:
Jonas Van Goolen (jonas at atmire dot com)
  • Field Details

    • ORCID_ID_SYNTAX

      public static final String 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

      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:
      newInstance in class PersonAuthorityValue
      Parameters:
      info - string info
      Returns:
      AuthorityValue
    • setValue

      public void setValue(String value)
      Overrides:
      setValue in class PersonAuthorityValue
    • 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
    • getOtherMetadata

      public Map<String,List<String>> getOtherMetadata()
    • getSolrInputDocument

      public org.apache.solr.common.SolrInputDocument getSolrInputDocument()
      Generate a solr record from this instance
      Overrides:
      getSolrInputDocument in class PersonAuthorityValue
      Returns:
      SolrInputDocument
    • choiceSelectMap

      public Map<String,String> choiceSelectMap()
      Information that can be used the choice ui
      Overrides:
      choiceSelectMap in class PersonAuthorityValue
      Returns:
      map
    • getAuthorityType

      public String getAuthorityType()
      Description copied from class: AuthorityValue
      Get the type of authority which created this value.
      Overrides:
      getAuthorityType in class PersonAuthorityValue
      Returns:
      type name.
    • 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:
      generateString in class PersonAuthorityValue
      Returns:
      see AuthorityValueService.GENERATE
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • 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