Class RelationshipMetadataValue

java.lang.Object
org.dspace.content.MetadataValue
org.dspace.content.RelationshipMetadataValue
All Implemented Interfaces:
ReloadableEntity<Integer>

public class RelationshipMetadataValue extends MetadataValue
This class is used as a representation of MetadataValues for the MetadataValues that are derived from the Relationships that the item has. This includes the useForPlace property which we'll have to use to determine whether these Values should be counted for place calculation on both the native MetadataValues and the Relationship's place attributes.
  • Constructor Details

    • RelationshipMetadataValue

      public RelationshipMetadataValue()
  • Method Details

    • isUseForPlace

      public boolean isUseForPlace()
      This property determines whether this RelationshipMetadataValue should be used in place calculation or not. This is retrieved from Spring configuration when constructing RelationshipMetadataValues. This Spring configuration is located in the core-services.xml configuration file. Putting this property on true will imply that we're now mixing plain-text metadatavalues with the metadatavalues that are constructed through Relationships with regards to the place attribute. For example, currently the RelationshipMetadataValue dc.contributor.author that is constructed through a Relationship for a Publication will have its useForPlace set to true. This means that the place calculation will take both these RelationshipMetadataValues into account together with the normal plain text metadatavalues. On the other hand, the journal name, volume and issue number which are constructed through a Relationship from a Publication to a journal issue will have its useForPlace set to false. This would typically be set to false for any singular metadata, and for any relationship where no mixing with plain text variables is applicable
    • setUseForPlace

      public void setUseForPlace(boolean useForPlace)
    • equals

      public boolean equals(Object obj)
      Description copied from class: MetadataValue
      Return true if other is the same MetadataValue as this object, false otherwise
      Overrides:
      equals in class MetadataValue
      Parameters:
      obj - object to compare to
      Returns:
      true if object passed in represents the same MetadataValue as this object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class MetadataValue
    • getRelationshipId

      public int getRelationshipId()
      Retrieves the Relationship ID from which the current RelationshipMetadataValue is derived
      Returns:
      the relationship ID