public static boolean isUniqueAttributeId ( final BuildData buildData , final String id , final ITopicNode topicNode , final Map < SpecTopic , Set < String > > usedIdAttributes ) { // Make sure the id doesn't match the spec topic's unique link if ( topicNode instanceof SpecTopic && id . equals ( ( ( SpecTopic ) topicNode ) . getUniqueLinkId ( buildData . isUseFixedUrls ( ) ) ) ) { return false ; } // Make sure the id isn't used else where in another topic for ( final Entry < SpecTopic , Set < String > > entry : usedIdAttributes . entrySet ( ) ) { final SpecTopic topic2 = entry . getKey ( ) ; final Integer topicId2 = topic2 . getDBId ( ) ; if ( topicId2 . equals ( topicNode . getDBId ( ) ) ) { continue ; } final Set < String > ids2 = entry . getValue ( ) ; if ( ids2 . contains ( id ) ) { return false ; } } return true ; }
Checks to see if a supplied attribute id is unique within this book based upon the used id attributes that were calculated earlier .