Package org.dspace.app.util
Class RelationshipUtils
- java.lang.Object
-
- org.dspace.app.util.RelationshipUtils
-
public class RelationshipUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RelationshipTypematchRelationshipType(List<RelationshipType> relTypes, String targetType, String originType, String originTypeName)Matches two Entity types to a Relationship Type from a set of Relationship Types.
-
-
-
Method Detail
-
matchRelationshipType
public static RelationshipType matchRelationshipType(List<RelationshipType> relTypes, String targetType, String originType, String originTypeName)
Matches two Entity types to a Relationship Type from a set of Relationship Types. Given a list of Relationship Types, this method will find a Relationship Type that is configured between the originType and the targetType, with the matching originTypeName. It will match a relationship between these two entities in either direction (eg leftward or rightward). Example: originType = Author, targetType = Publication, originTypeName = isAuthorOfPublication.- Parameters:
relTypes- set of Relationship Types in which to find a match.targetType- entity type of target (eg. Publication).originType- entity type of origin referer (eg. Author).originTypeName- the name of the relationship (eg. isAuthorOfPublication)- Returns:
- null or matched Relationship Type.
-
-