Package org.dspace.content
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.
-
-
Field Summary
-
Fields inherited from class org.dspace.content.MetadataValue
dSpaceObject
-
-
Constructor Summary
Constructors Constructor Description RelationshipMetadataValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Returntrueifotheris the same MetadataValue as this object,falseotherwiseintgetRelationshipId()Retrieves the Relationship ID from which the current RelationshipMetadataValue is derivedinthashCode()booleanisUseForPlace()This property determines whether this RelationshipMetadataValue should be used in place calculation or not.voidsetUseForPlace(boolean useForPlace)-
Methods inherited from class org.dspace.content.MetadataValue
getAuthority, getConfidence, getDSpaceObject, getID, getLanguage, getMetadataField, getMetadataFieldId, getPlace, getValue, setAuthority, setConfidence, setDSpaceObject, setLanguage, setMetadataField, setPlace, setValue
-
-
-
-
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:MetadataValueReturntrueifotheris the same MetadataValue as this object,falseotherwise- Overrides:
equalsin classMetadataValue- Parameters:
obj- object to compare to- Returns:
trueif object passed in represents the same MetadataValue as this object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classMetadataValue
-
getRelationshipId
public int getRelationshipId()
Retrieves the Relationship ID from which the current RelationshipMetadataValue is derived- Returns:
- the relationship ID
-
-