Class AuthorityValue

  • Direct Known Subclasses:
    PersonAuthorityValue

    public class AuthorityValue
    extends Object
    Author:
    Antoine Snyers (antoine at atmire.com), Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)
    • Constructor Detail

      • AuthorityValue

        public AuthorityValue()
      • AuthorityValue

        public AuthorityValue​(org.apache.solr.common.SolrDocument document)
    • Method Detail

      • getId

        public String getId()
      • getField

        public String getField()
      • getValue

        public String getValue()
      • setId

        public void setId​(String id)
      • setField

        public void setField​(String field)
      • setValue

        public void setValue​(String value)
      • getCreationDate

        public Date getCreationDate()
      • setCreationDate

        public void setCreationDate​(Date creationDate)
      • setCreationDate

        public void setCreationDate​(String creationDate)
      • getLastModified

        public Date getLastModified()
      • setLastModified

        public void setLastModified​(String lastModified)
      • setLastModified

        public void setLastModified​(Date lastModified)
      • isDeleted

        public boolean isDeleted()
      • setDeleted

        public void setDeleted​(boolean deleted)
      • updateLastModifiedDate

        protected void updateLastModifiedDate()
      • update

        public void update()
      • delete

        public void delete()
      • getSolrInputDocument

        public org.apache.solr.common.SolrInputDocument getSolrInputDocument()
        Generate a solr record from this instance
        Returns:
        SolrInputDocument
      • setValues

        public void setValues​(org.apache.solr.common.SolrDocument document)
        Initialize this instance based on a solr record
        Parameters:
        document - SolrDocument
      • choiceSelectMap

        public Map<String,​String> choiceSelectMap()
        Information that can be used the choice ui
        Returns:
        map
      • getDateFormatters

        public List<org.joda.time.format.DateTimeFormatter> getDateFormatters()
      • stringToDate

        public Date stringToDate​(String date)
      • newInstance

        public AuthorityValue newInstance​(String info)
        Makes an instance of the AuthorityValue with the given information.
        Parameters:
        info - string info
        Returns:
        AuthorityValue
      • getAuthorityType

        public String getAuthorityType()
      • 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.
        Parameters:
        o - object
        Returns:
        true or false