public List < TopicRelationship > getRelatedTopicRelationships ( ) { final ArrayList < TopicRelationship > relationships = new ArrayList < TopicRelationship > ( ) ; /* Check the topic to topic relationships for related relationships */ for ( final TopicRelationship relationship : topicRelationships ) { if ( relationship . getType ( ) == RelationshipType . REFER_TO ) { relationships . add ( relationship ) ; } } /* Check the topic to target relationships for related relationships */ for ( final TargetRelationship relationship : topicTargetRelationships ) { if ( relationship . getType ( ) == RelationshipType . REFER_TO ) { relationships . add ( new TopicRelationship ( relationship . getPrimaryRelationship ( ) , ( SpecTopic ) relationship . getSecondaryRelationship ( ) , relationship . getType ( ) ) ) ; } } return relationships ; }
Gets the list of Topic Relationships for this topic whose type is RELATED .