Package org.dspace.content.virtual
Class Related
java.lang.Object
org.dspace.content.virtual.Related
- All Implemented Interfaces:
VirtualMetadataConfiguration
A bean implementing the
VirtualMetadataConfiguration interface to achieve the generation of
Virtual metadata by traversing the path of relation specified in the config for this bean
The Related bean will find the relationshiptype defined in the relationshipTypeString property on
the current item and it'll use the related item from that relationship to pass it along to the
virtualMetadataConfiguration property which in turn refers to another VirtualBean instance and it continues
the chain until it reaches either a Concatenate or Collected bean to retrieve the values. It will then return
that value through the chain again and it'll fill the values into the virtual metadata fields that are defined
in the map for the first Related bean.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPlace()Generic getter for the place property of this classbooleanGeneric getter for the populateWithNameVariant propertyGeneric getter for the relationshipTypeString property of this classbooleanGeneric getter for the useForPlace propertyThis method will find the correct Relationship from the given item to retrieve the other item from it and pass this along to the next VirtualBean that's stored in this class.Generic getter for the virtualMetadataConfiguration property of this classvoidGeneric setter for the place property of this classvoidsetPopulateWithNameVariant(boolean populateWithNameVariant) Generic setter for the populateWithNameVariant This property defines whether the value should be retrieved from the left/rightward on the Relationship (true) or through the configuration and usual way (false)voidsetRelationshipTypeString(String relationshipTypeString) Generic setter for the relationshipTypeString property of this classvoidsetUseForPlace(boolean useForPlace) Generic setter for the useForPlace propertyvoidsetVirtualMetadataConfiguration(VirtualMetadataConfiguration virtualMetadataConfiguration) Generic setter for the virtualMetadataConfiguration property of this class
-
Constructor Details
-
Related
public Related()
-
-
Method Details
-
getRelationshipTypeString
Generic getter for the relationshipTypeString property of this class- Returns:
- The relationshipTypeString property
-
setRelationshipTypeString
Generic setter for the relationshipTypeString property of this class- Parameters:
relationshipTypeString- The String to which the relationshipTypeString will be set to
-
getPlace
Generic getter for the place property of this class- Returns:
- The place property
-
setPlace
Generic setter for the place property of this class- Parameters:
place- The Integer to which the place property will be set to
-
getVirtualMetadataConfiguration
Generic getter for the virtualMetadataConfiguration property of this class- Returns:
- The virtualMetadataConfiguration property
-
setVirtualMetadataConfiguration
public void setVirtualMetadataConfiguration(VirtualMetadataConfiguration virtualMetadataConfiguration) Generic setter for the virtualMetadataConfiguration property of this class- Parameters:
virtualMetadataConfiguration- The VirtualBean to which the virtualMetadataConfiguration property will be set to
-
setUseForPlace
public void setUseForPlace(boolean useForPlace) Generic setter for the useForPlace property- Specified by:
setUseForPlacein interfaceVirtualMetadataConfiguration- Parameters:
useForPlace- The boolean value that the useForPlace property will be set to
-
getUseForPlace
public boolean getUseForPlace()Generic getter for the useForPlace property- Specified by:
getUseForPlacein interfaceVirtualMetadataConfiguration- Returns:
- The useForPlace to be used by this bean
-
setPopulateWithNameVariant
public void setPopulateWithNameVariant(boolean populateWithNameVariant) Description copied from interface:VirtualMetadataConfigurationGeneric setter for the populateWithNameVariant This property defines whether the value should be retrieved from the left/rightward on the Relationship (true) or through the configuration and usual way (false)- Specified by:
setPopulateWithNameVariantin interfaceVirtualMetadataConfiguration- Parameters:
populateWithNameVariant- The boolean value that the populateWithNameVariant property will be set to
-
getPopulateWithNameVariant
public boolean getPopulateWithNameVariant()Description copied from interface:VirtualMetadataConfigurationGeneric getter for the populateWithNameVariant property- Specified by:
getPopulateWithNameVariantin interfaceVirtualMetadataConfiguration- Returns:
- The populatewithNameVariant to be used by this bean
-
getValues
This method will find the correct Relationship from the given item to retrieve the other item from it and pass this along to the next VirtualBean that's stored in this class.- Specified by:
getValuesin interfaceVirtualMetadataConfiguration- Parameters:
context- The relevant DSpace contextitem- The item that will be used to find the related item through its relationships- Returns:
- The String value of the metadata fields concatenated with a separator as defined in the deepest Concatenated bean in the chain Will return an empty list if no relationships are found
- Throws:
SQLException- If something goes wrong
-