Class 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 Detail

      • RelationshipMetadataValue

        public RelationshipMetadataValue()
    • Method Detail

      • 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
      • getRelationshipId

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