@Override public void visitRelationship(Relationship relationship) { this.contextStack.push(relationship); visitSubject(relationship); List<Fact> facts = relationship.getFacts(); if (facts != null) { for (Fact fact : facts) { if (fact != null) { fact.accept(this); } } } List<Field> fields = relationship.getFields(); if (fields != null) { for (Field field : fields) { if (field != null) { field.accept(this); } } } this.contextStack.pop(); }
errors.append("Error 7: A relationship failed to reference anyone inside the document. At least one person must be in the document.\n"); checkSources(errors, "Error 8: relationship", relationship.getSources(), relationship.getFacts(), relationship.getFields(), docMap); checkSources(errors, "Error 9: relationship (media)", relationship.getMedia(), null, null, docMap);