test_class.declarator: validator
test_class.modifier: private
test_class.original_string: private MergeLimitationsValidator validator;
test_class.type: MergeLimitationsValidator
test_class.var_name: validator
test_class.file: vault-validation/src/test/java/org/apache/jackrabbit/vault/validation/spi/impl/MergeLimitationsValidatorTest.java
test_class.identifier: MergeLimitationsValidatorTest
test_case.body: @Test
      public void testWithAggregateAtWrongLevel() {
          Map<String, DocViewProperty> props = new HashMap<>();
          props.put("prop1", new DocViewProperty("prop1", new String[] { "value1" } , false, PropertyType.STRING));
  
          DocViewNode node = new DocViewNode("somename", "somename", null, props, null, "nt:unstructured");
          Collection<ValidationMessage> messages = validator.validate(node, "/apps/test/deep", Paths.get(".content.xml"), false);
          ValidationExecutorTest.assertViolation(messages,
                  new ValidationMessage(ValidationMessageSeverity.ERROR, String.format(MergeLimitationsValidator.PACKAGE_NON_ROOT_NODE_MERGED, "/apps/test/deep")));
      }
test_case.class_method_signature: MergeLimitationsValidatorTest.testWithAggregateAtWrongLevel()
test_case.full_signature: @Test public void testWithAggregateAtWrongLevel()
test_case.identifier: testWithAggregateAtWrongLevel
test_case.invocations: put validate get assertViolation format
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testWithAggregateAtWrongLevel()
focal_class.declarator: PACKAGE_NON_ROOT_NODE_MERGED = "Non-empty Node '%s' is supposed to be imported with mode 'merge' but it is not the aggregator's root node. This is currently not supported by FileVault (https://issues.apache.org/jira/browse/JCRVLT-255)."
focal_class.modifier: protected static final
focal_class.original_string: protected static final String PACKAGE_NON_ROOT_NODE_MERGED = "Non-empty Node '%s' is supposed to be imported with mode 'merge' but it is not the aggregator's root node. This is currently not supported by FileVault (https://issues.apache.org/jira/browse/JCRVLT-255).";
focal_class.type: String
focal_class.var_name: PACKAGE_NON_ROOT_NODE_MERGED
focal_class.declarator: severity
focal_class.modifier: private final
focal_class.original_string: private final ValidationMessageSeverity severity;
focal_class.type: ValidationMessageSeverity
focal_class.var_name: severity
focal_class.declarator: rootNodePathsOfMergeRules
focal_class.modifier: private final
focal_class.original_string: private final Collection<String> rootNodePathsOfMergeRules;
focal_class.type: Collection<String>
focal_class.var_name: rootNodePathsOfMergeRules
focal_class.file: vault-validation/src/main/java/org/apache/jackrabbit/vault/validation/spi/impl/MergeLimitationsValidator.java
focal_class.identifier: MergeLimitationsValidator
focal_class.interfaces: implements DocumentViewXmlValidator
focal_class.class_method_signature: MergeLimitationsValidator.MergeLimitationsValidator(ValidationMessageSeverity severity, WorkspaceFilter filter)
focal_class.full_signature: public  MergeLimitationsValidator(ValidationMessageSeverity severity, WorkspaceFilter filter)
focal_class.identifier: MergeLimitationsValidator
focal_class.modifiers: public
focal_class.parameters: (ValidationMessageSeverity severity, WorkspaceFilter filter)
focal_class.signature:  MergeLimitationsValidator(ValidationMessageSeverity severity, WorkspaceFilter filter)
focal_class.class_method_signature: MergeLimitationsValidator.done()
focal_class.full_signature: @Override public Collection<ValidationMessage> done()
focal_class.identifier: done
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<ValidationMessage>
focal_class.signature: Collection<ValidationMessage> done()
focal_class.class_method_signature: MergeLimitationsValidator.validate(@NotNull DocViewNode node, @NotNull String nodePath, @NotNull Path filePath, boolean isRoot)
focal_class.full_signature: @Override public Collection<ValidationMessage> validate(@NotNull DocViewNode node, @NotNull String nodePath, @NotNull Path filePath, boolean isRoot)
focal_class.identifier: validate
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull DocViewNode node, @NotNull String nodePath, @NotNull Path filePath, boolean isRoot)
focal_class.return: Collection<ValidationMessage>
focal_class.signature: Collection<ValidationMessage> validate(@NotNull DocViewNode node, @NotNull String nodePath, @NotNull Path filePath, boolean isRoot)
focal_method.body: @Override
      public Collection<ValidationMessage> validate(@NotNull DocViewNode node, @NotNull String nodePath, @NotNull Path filePath, boolean isRoot) {
          // find out if one of the filter roots is pointing to any of the aggregator's non-root nodes
          if (!isRoot && !node.props.isEmpty() && rootNodePathsOfMergeRules.contains(nodePath)) {
              return Collections.singleton(new ValidationMessage(severity, String.format(PACKAGE_NON_ROOT_NODE_MERGED, nodePath)));
          }
          return null;
      }
focal_method.class_method_signature: MergeLimitationsValidator.validate(@NotNull DocViewNode node, @NotNull String nodePath, @NotNull Path filePath, boolean isRoot)
focal_method.full_signature: @Override public Collection<ValidationMessage> validate(@NotNull DocViewNode node, @NotNull String nodePath, @NotNull Path filePath, boolean isRoot)
focal_method.identifier: validate
focal_method.invocations: isEmpty contains singleton format
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull DocViewNode node, @NotNull String nodePath, @NotNull Path filePath, boolean isRoot)
focal_method.return: Collection<ValidationMessage>
focal_method.signature: Collection<ValidationMessage> validate(@NotNull DocViewNode node, @NotNull String nodePath, @NotNull Path filePath, boolean isRoot)