@@ -124,8 +124,10 @@ public ValidationResult validate(Workpiece workpiece, RulesetManagementInterface
124124 }
125125
126126 for (LogicalDivision logicalDivision : workpiece .getAllLogicalDivisions ()) {
127- results .addAll (checkMetadataRules (logicalDivision .toString (), logicalDivision .getType (),
128- getMetadata (logicalDivision ), ruleset , metadataLanguage , translations ));
127+ if (Objects .isNull (logicalDivision .getLink ())) {
128+ results .addAll (checkMetadataRules (logicalDivision .toString (), logicalDivision .getType (),
129+ getMetadata (logicalDivision ), ruleset , metadataLanguage , translations ));
130+ }
129131 }
130132
131133 for (PhysicalDivision physicalDivision : workpiece .getAllPhysicalDivisions ()) {
@@ -196,9 +198,12 @@ private static ValidationResult checkForStructuresWithoutMedia(Workpiece workpie
196198 Collection <String > messages = new HashSet <>();
197199
198200 Collection <String > structuresWithoutMedia = Workpiece .treeStream (workpiece .getLogicalStructure ())
199- .filter (struc -> Objects .nonNull (struc .getType ()) && struc .getViews ().isEmpty () && struc .getChildren ().isEmpty ())
200- .map (structure -> translations .get (MESSAGE_STRUCTURE_WITHOUT_MEDIA ) + ' ' + structure )
201- .collect (Collectors .toSet ());
201+ .filter (struc -> Objects .isNull (struc .getLink ())
202+ && Objects .nonNull (struc .getType ())
203+ && struc .getViews ().isEmpty ()
204+ && struc .getChildren ().isEmpty ())
205+ .map (structure -> translations .get (MESSAGE_STRUCTURE_WITHOUT_MEDIA ) + ' ' + structure )
206+ .collect (Collectors .toSet ());
202207 if (!structuresWithoutMedia .isEmpty ()) {
203208 messages .addAll (structuresWithoutMedia );
204209 warning = true ;
0 commit comments