return errors;
/*
* this collection will hold the lists of related topics
*/
final GenericInjectionPointDatabase relatedLists = new GenericInjectionPointDatabase();
/* wrap each related topic in a listitem tag */
if (topic.getOutgoingRelationships() != null && topic.getOutgoingRelationships().getItems() != null)
{
for (final TopicV1 relatedTopic : topic.getOutgoingRelationships().getItems())
{
/* make sure the topic is available to be linked to */
if (database != null && database.getTopic(relatedTopic.getId()) == null)
{
if ((docbookBuildingOptions != null && !docbookBuildingOptions.getIgnoreMissingCustomInjections()))
errors.add(relatedTopic.getId());
}
else
{
/*
* don't process those topics that were injected into custom
* injection points
*/
if (!customInjectionIds.contains(relatedTopic.getId()))
{
// loop through the topic type tags
for (final Pair<Integer, String> primaryTopicTypeTag : topicTypeTagIDs)
{
/*
* see if we have processed a related topic with one
* of the topic type tags this may never be true if
* not processing all related topics
*/
if (relatedTopic.isTaggedWith(primaryTopicTypeTag.getFirst()))
{
relatedLists.addInjectionTopic(primaryTopicTypeTag, relatedTopic);
break;
}
}
}