test_class.declarator: validator
test_class.modifier: private
test_class.original_string: private AdvancedFilterValidator validator;
test_class.type: AdvancedFilterValidator
test_class.var_name: validator
test_class.declarator: filterValidator1
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private FilterValidator filterValidator1;
test_class.type: FilterValidator
test_class.var_name: filterValidator1
test_class.declarator: filterValidator2
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private FilterValidator filterValidator2;
test_class.type: FilterValidator
test_class.var_name: filterValidator2
test_class.declarator: properties
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PackageProperties properties;
test_class.type: PackageProperties
test_class.var_name: properties
test_class.declarator: filter
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private WorkspaceFilter filter;
test_class.type: WorkspaceFilter
test_class.var_name: filter
test_class.declarator: dependenciesMetaInfo
test_class.modifier: private
test_class.original_string: private Collection<PackageInfo> dependenciesMetaInfo;
test_class.type: Collection<PackageInfo>
test_class.var_name: dependenciesMetaInfo
test_class.declarator: validRoots
test_class.modifier: private
test_class.original_string: private Collection<String> validRoots;
test_class.type: Collection<String>
test_class.var_name: validRoots
test_class.declarator: factory
test_class.modifier: private
test_class.original_string: private DocumentBuilderFactory factory;
test_class.type: DocumentBuilderFactory
test_class.var_name: factory
test_class.file: vault-validation/src/test/java/org/apache/jackrabbit/vault/validation/spi/impl/AdvancedFilterValidatorTest.java
test_class.identifier: AdvancedFilterValidatorTest
test_case.body: @Test
      public void testIsRegexValidForRootPath() {
          Assert.assertTrue(AdvancedFilterValidator.isRegexValidForRootPath("/apps/test", "/apps"));
          Assert.assertTrue(AdvancedFilterValidator.isRegexValidForRootPath(".*/somepath", "/apps"));
          Assert.assertTrue(AdvancedFilterValidator.isRegexValidForRootPath("^.*/somepath$", "/apps"));
          Assert.assertFalse(AdvancedFilterValidator.isRegexValidForRootPath("/[aps]{4}", "/apps/test"));
  
          Assert.assertFalse(AdvancedFilterValidator.isRegexValidForRootPath("/apps", "/apps/test"));
          Assert.assertFalse(AdvancedFilterValidator.isRegexValidForRootPath("/apps/test", "/apps2/test"));
          Assert.assertFalse(AdvancedFilterValidator.isRegexValidForRootPath("/[aps]{3}/somepath", "/apps"));
          Assert.assertTrue(AdvancedFilterValidator.isRegexValidForRootPath("/apps/test", "/apps/test"));
      }
test_case.class_method_signature: AdvancedFilterValidatorTest.testIsRegexValidForRootPath()
test_case.full_signature: @Test public void testIsRegexValidForRootPath()
test_case.identifier: testIsRegexValidForRootPath
test_case.invocations: assertTrue isRegexValidForRootPath assertTrue isRegexValidForRootPath assertTrue isRegexValidForRootPath assertFalse isRegexValidForRootPath assertFalse isRegexValidForRootPath assertFalse isRegexValidForRootPath assertFalse isRegexValidForRootPath assertTrue isRegexValidForRootPath
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIsRegexValidForRootPath()
focal_class.declarator: MESSAGE_ORPHANED_FILTER_ENTRIES = "Found orphaned filter entries: %s"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_ORPHANED_FILTER_ENTRIES = "Found orphaned filter entries: %s";
focal_class.type: String
focal_class.var_name: MESSAGE_ORPHANED_FILTER_ENTRIES
focal_class.declarator: MESSAGE_INVALID_PATTERN = "Invalid pattern given ('%s') which will never match for any descendants of the root path '%s'."
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_INVALID_PATTERN = "Invalid pattern given ('%s') which will never match for any descendants of the root path '%s'.";
focal_class.type: String
focal_class.var_name: MESSAGE_INVALID_PATTERN
focal_class.declarator: MESSAGE_ROOT_PATH_NOT_ABSOLUTE = "Root path must be absolute, but does not start with a '/': '%s'."
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_ROOT_PATH_NOT_ABSOLUTE = "Root path must be absolute, but does not start with a '/': '%s'.";
focal_class.type: String
focal_class.var_name: MESSAGE_ROOT_PATH_NOT_ABSOLUTE
focal_class.declarator: MESSAGE_INVALID_FILTER_XML = "Invalid filter.xml"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_INVALID_FILTER_XML = "Invalid filter.xml";
focal_class.type: String
focal_class.var_name: MESSAGE_INVALID_FILTER_XML
focal_class.declarator: MESSAGE_FILTER_ROOT_ANCESTOR_COVERED_BUT_EXCLUDED = "Filter root's ancestor '%s' is covered by dependency '%s' but excluded by its patterns."
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_FILTER_ROOT_ANCESTOR_COVERED_BUT_EXCLUDED = "Filter root's ancestor '%s' is covered by dependency '%s' but excluded by its patterns.";
focal_class.type: String
focal_class.var_name: MESSAGE_FILTER_ROOT_ANCESTOR_COVERED_BUT_EXCLUDED
focal_class.declarator: MESSAGE_FILTER_ROOT_ANCESTOR_UNCOVERED = "Filter root's ancestor '%s' is not covered by any of the specified dependencies nor a valid root."
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_FILTER_ROOT_ANCESTOR_UNCOVERED = "Filter root's ancestor '%s' is not covered by any of the specified dependencies nor a valid root.";
focal_class.type: String
focal_class.var_name: MESSAGE_FILTER_ROOT_ANCESTOR_UNCOVERED
focal_class.declarator: MESSAGE_NODE_NOT_CONTAINED = "Node '%s' is not contained in any of the filter rules"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_NODE_NOT_CONTAINED = "Node '%s' is not contained in any of the filter rules";
focal_class.type: String
focal_class.var_name: MESSAGE_NODE_NOT_CONTAINED
focal_class.declarator: MESSAGE_ANCESTOR_NODE_NOT_COVERED = "Ancestor node '%s' is not covered by any of the filter rules. Preferably depend on a package that provides this node or include it in the filter rules!"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_ANCESTOR_NODE_NOT_COVERED = "Ancestor node '%s' is not covered by any of the filter rules. Preferably depend on a package that provides this node or include it in the filter rules!";
focal_class.type: String
focal_class.var_name: MESSAGE_ANCESTOR_NODE_NOT_COVERED
focal_class.declarator: MESSAGE_ANCESTOR_NODE_NOT_COVERED_BUT_VALID_ROOT = "Ancestor node '%s' is not covered by any of the filter rules but that node is a given root (either by a dependency or by the known roots). Remove that node!"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_ANCESTOR_NODE_NOT_COVERED_BUT_VALID_ROOT = "Ancestor node '%s' is not covered by any of the filter rules but that node is a given root (either by a dependency or by the known roots). Remove that node!";
focal_class.type: String
focal_class.var_name: MESSAGE_ANCESTOR_NODE_NOT_COVERED_BUT_VALID_ROOT
focal_class.declarator: MESSAGE_NODE_BELOW_CLEANUP_FILTER = "Node '%s' is covered by a 'cleanup' filter rule. That filter type is only supposed to be used for removing nodes during import!"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_NODE_BELOW_CLEANUP_FILTER = "Node '%s' is covered by a 'cleanup' filter rule. That filter type is only supposed to be used for removing nodes during import!";
focal_class.type: String
focal_class.var_name: MESSAGE_NODE_BELOW_CLEANUP_FILTER
focal_class.declarator: FILTER_XML_PATH = Paths.get(Constants.VAULT_DIR, Constants.FILTER_XML)
focal_class.modifier: static final
focal_class.original_string: static final Path FILTER_XML_PATH = Paths.get(Constants.VAULT_DIR, Constants.FILTER_XML);
focal_class.type: Path
focal_class.var_name: FILTER_XML_PATH
focal_class.declarator: factory
focal_class.modifier: private final
focal_class.original_string: private final DocumentBuilderFactory factory;
focal_class.type: DocumentBuilderFactory
focal_class.var_name: factory
focal_class.declarator: isSubPackage
focal_class.modifier: private final
focal_class.original_string: private final boolean isSubPackage;
focal_class.type: boolean
focal_class.var_name: isSubPackage
focal_class.declarator: validRoots
focal_class.modifier: private final
focal_class.original_string: private final Collection<String> validRoots;
focal_class.type: Collection<String>
focal_class.var_name: validRoots
focal_class.declarator: defaultSeverity
focal_class.modifier: private final @NotNull
focal_class.original_string: private final @NotNull ValidationMessageSeverity defaultSeverity;
focal_class.type: ValidationMessageSeverity
focal_class.var_name: defaultSeverity
focal_class.declarator: severityForUncoveredAncestorNode
focal_class.modifier: private final @NotNull
focal_class.original_string: private final @NotNull ValidationMessageSeverity severityForUncoveredAncestorNode;
focal_class.type: ValidationMessageSeverity
focal_class.var_name: severityForUncoveredAncestorNode
focal_class.declarator: severityForUncoveredFilterRootAncestors
focal_class.modifier: private final @NotNull
focal_class.original_string: private final @NotNull ValidationMessageSeverity severityForUncoveredFilterRootAncestors;
focal_class.type: ValidationMessageSeverity
focal_class.var_name: severityForUncoveredFilterRootAncestors
focal_class.declarator: severityForOrphanedFilterEntries
focal_class.modifier: private final @NotNull
focal_class.original_string: private final @NotNull ValidationMessageSeverity severityForOrphanedFilterEntries;
focal_class.type: ValidationMessageSeverity
focal_class.var_name: severityForOrphanedFilterEntries
focal_class.declarator: dependenciesMetaInfo
focal_class.modifier: private final
focal_class.original_string: private final Collection<PackageInfo> dependenciesMetaInfo;
focal_class.type: Collection<PackageInfo>
focal_class.var_name: dependenciesMetaInfo
focal_class.declarator: filter
focal_class.modifier: private final
focal_class.original_string: private final WorkspaceFilter filter;
focal_class.type: WorkspaceFilter
focal_class.var_name: filter
focal_class.declarator: filterValidators
focal_class.modifier: private
focal_class.original_string: private Map<String, FilterValidator> filterValidators;
focal_class.type: Map<String, FilterValidator>
focal_class.var_name: filterValidators
focal_class.declarator: danglingNodePaths
focal_class.modifier: private final
focal_class.original_string: private final Collection<String> danglingNodePaths;
focal_class.type: Collection<String>
focal_class.var_name: danglingNodePaths
focal_class.declarator: orphanedFilterSets
focal_class.modifier: private final
focal_class.original_string: private final Map<PathFilterSet, List<Entry<PathFilter>>> orphanedFilterSets;
focal_class.type: Map<PathFilterSet, List<Entry<PathFilter>>>
focal_class.var_name: orphanedFilterSets
focal_class.file: vault-validation/src/main/java/org/apache/jackrabbit/vault/validation/spi/impl/AdvancedFilterValidator.java
focal_class.identifier: AdvancedFilterValidator
focal_class.interfaces: implements GenericMetaInfDataValidator, FilterValidator, DocumentViewXmlValidator, JcrPathValidator
focal_class.class_method_signature: AdvancedFilterValidator.AdvancedFilterValidator(@NotNull DocumentBuilderFactory factory, @NotNull ValidationMessageSeverity defaultSeverity, @NotNull ValidationMessageSeverity severityForUncoveredAncestorNodes, @NotNull ValidationMessageSeverity severityForUncoveredFilterRootAncestors, @NotNull ValidationMessageSeverity severityForOrphanedFilterEntries, boolean isSubPackage, @NotNull Collection<PackageInfo> dependenciesMetaInfo, @NotNull WorkspaceFilter filter, @NotNull Collection<String> validRoots)
focal_class.full_signature: public  AdvancedFilterValidator(@NotNull DocumentBuilderFactory factory, @NotNull ValidationMessageSeverity defaultSeverity, @NotNull ValidationMessageSeverity severityForUncoveredAncestorNodes, @NotNull ValidationMessageSeverity severityForUncoveredFilterRootAncestors, @NotNull ValidationMessageSeverity severityForOrphanedFilterEntries, boolean isSubPackage, @NotNull Collection<PackageInfo> dependenciesMetaInfo, @NotNull WorkspaceFilter filter, @NotNull Collection<String> validRoots)
focal_class.identifier: AdvancedFilterValidator
focal_class.modifiers: public
focal_class.parameters: (@NotNull DocumentBuilderFactory factory, @NotNull ValidationMessageSeverity defaultSeverity, @NotNull ValidationMessageSeverity severityForUncoveredAncestorNodes, @NotNull ValidationMessageSeverity severityForUncoveredFilterRootAncestors, @NotNull ValidationMessageSeverity severityForOrphanedFilterEntries, boolean isSubPackage, @NotNull Collection<PackageInfo> dependenciesMetaInfo, @NotNull WorkspaceFilter filter, @NotNull Collection<String> validRoots)
focal_class.signature:  AdvancedFilterValidator(@NotNull DocumentBuilderFactory factory, @NotNull ValidationMessageSeverity defaultSeverity, @NotNull ValidationMessageSeverity severityForUncoveredAncestorNodes, @NotNull ValidationMessageSeverity severityForUncoveredFilterRootAncestors, @NotNull ValidationMessageSeverity severityForOrphanedFilterEntries, boolean isSubPackage, @NotNull Collection<PackageInfo> dependenciesMetaInfo, @NotNull WorkspaceFilter filter, @NotNull Collection<String> validRoots)
focal_class.class_method_signature: AdvancedFilterValidator.setFilterValidators(Map<String, FilterValidator> filterValidators)
focal_class.full_signature: public void setFilterValidators(Map<String, FilterValidator> filterValidators)
focal_class.identifier: setFilterValidators
focal_class.modifiers: public
focal_class.parameters: (Map<String, FilterValidator> filterValidators)
focal_class.return: void
focal_class.signature: void setFilterValidators(Map<String, FilterValidator> filterValidators)
focal_class.class_method_signature: AdvancedFilterValidator.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: AdvancedFilterValidator.validate(@NotNull WorkspaceFilter filter)
focal_class.full_signature: @Override public Collection<ValidationMessage> validate(@NotNull WorkspaceFilter filter)
focal_class.identifier: validate
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull WorkspaceFilter filter)
focal_class.return: Collection<ValidationMessage>
focal_class.signature: Collection<ValidationMessage> validate(@NotNull WorkspaceFilter filter)
focal_class.class_method_signature: AdvancedFilterValidator.validatePathFilterSets(Collection<PathFilterSet> pathFilterSets, boolean checkRoots)
focal_class.full_signature: private Collection<ValidationMessage> validatePathFilterSets(Collection<PathFilterSet> pathFilterSets, boolean checkRoots)
focal_class.identifier: validatePathFilterSets
focal_class.modifiers: private
focal_class.parameters: (Collection<PathFilterSet> pathFilterSets, boolean checkRoots)
focal_class.return: Collection<ValidationMessage>
focal_class.signature: Collection<ValidationMessage> validatePathFilterSets(Collection<PathFilterSet> pathFilterSets, boolean checkRoots)
focal_class.class_method_signature: AdvancedFilterValidator.validateFileNodePath(@NotNull String nodePath)
focal_class.full_signature: private Collection<ValidationMessage> validateFileNodePath(@NotNull String nodePath)
focal_class.identifier: validateFileNodePath
focal_class.modifiers: private
focal_class.parameters: (@NotNull String nodePath)
focal_class.return: Collection<ValidationMessage>
focal_class.signature: Collection<ValidationMessage> validateFileNodePath(@NotNull String nodePath)
focal_class.class_method_signature: AdvancedFilterValidator.validateJcrPath(@NotNull NodeContext nodeContext,
              boolean isFolder)
focal_class.full_signature: @Override public @Nullable Collection<ValidationMessage> validateJcrPath(@NotNull NodeContext nodeContext,
              boolean isFolder)
focal_class.identifier: validateJcrPath
focal_class.modifiers: @Override public @Nullable
focal_class.parameters: (@NotNull NodeContext nodeContext,
              boolean isFolder)
focal_class.return: Collection<ValidationMessage>
focal_class.signature: Collection<ValidationMessage> validateJcrPath(@NotNull NodeContext nodeContext,
              boolean isFolder)
focal_class.class_method_signature: AdvancedFilterValidator.validate(@NotNull DocViewNode node, @NotNull NodeContext nodeContext,
              boolean isRoot)
focal_class.full_signature: @Override public @Nullable Collection<ValidationMessage> validate(@NotNull DocViewNode node, @NotNull NodeContext nodeContext,
              boolean isRoot)
focal_class.identifier: validate
focal_class.modifiers: @Override public @Nullable
focal_class.parameters: (@NotNull DocViewNode node, @NotNull NodeContext nodeContext,
              boolean isRoot)
focal_class.return: Collection<ValidationMessage>
focal_class.signature: Collection<ValidationMessage> validate(@NotNull DocViewNode node, @NotNull NodeContext nodeContext,
              boolean isRoot)
focal_class.class_method_signature: AdvancedFilterValidator.isRegexValidForRootPath(String regex, String rootPath)
focal_class.full_signature: static boolean isRegexValidForRootPath(String regex, String rootPath)
focal_class.identifier: isRegexValidForRootPath
focal_class.modifiers: static
focal_class.parameters: (String regex, String rootPath)
focal_class.return: boolean
focal_class.signature: boolean isRegexValidForRootPath(String regex, String rootPath)
focal_class.class_method_signature: AdvancedFilterValidator.validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath, @NotNull Path basePath)
focal_class.full_signature: @Override public Collection<ValidationMessage> validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath, @NotNull Path basePath)
focal_class.identifier: validateMetaInfData
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull InputStream input, @NotNull Path filePath, @NotNull Path basePath)
focal_class.return: Collection<ValidationMessage>
focal_class.signature: Collection<ValidationMessage> validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath, @NotNull Path basePath)
focal_class.class_method_signature: AdvancedFilterValidator.shouldValidateMetaInfData(@NotNull Path filePath)
focal_class.full_signature: @Override public boolean shouldValidateMetaInfData(@NotNull Path filePath)
focal_class.identifier: shouldValidateMetaInfData
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Path filePath)
focal_class.return: boolean
focal_class.signature: boolean shouldValidateMetaInfData(@NotNull Path filePath)
focal_class.class_method_signature: AdvancedFilterValidator.removeFromOrphanedFilterEntries(@NotNull String nodePath)
focal_class.full_signature: private void removeFromOrphanedFilterEntries(@NotNull String nodePath)
focal_class.identifier: removeFromOrphanedFilterEntries
focal_class.modifiers: private
focal_class.parameters: (@NotNull String nodePath)
focal_class.return: void
focal_class.signature: void removeFromOrphanedFilterEntries(@NotNull String nodePath)
focal_class.class_method_signature: AdvancedFilterValidator.getDanglingAncestorNodePath(String nodePath, WorkspaceFilter filter)
focal_class.full_signature: @Nullable String getDanglingAncestorNodePath(String nodePath, WorkspaceFilter filter)
focal_class.identifier: getDanglingAncestorNodePath
focal_class.modifiers: @Nullable
focal_class.parameters: (String nodePath, WorkspaceFilter filter)
focal_class.return: String
focal_class.signature: String getDanglingAncestorNodePath(String nodePath, WorkspaceFilter filter)
focal_method.body: static boolean isRegexValidForRootPath(String regex, String rootPath) {
          Pattern pattern = Pattern.compile(regex);
          Matcher matcher = pattern.matcher(rootPath);
          if (matcher.matches()) {
              return true;
          }
          return matcher.hitEnd();
      }
focal_method.class_method_signature: AdvancedFilterValidator.isRegexValidForRootPath(String regex, String rootPath)
focal_method.full_signature: static boolean isRegexValidForRootPath(String regex, String rootPath)
focal_method.identifier: isRegexValidForRootPath
focal_method.invocations: compile matcher matches hitEnd
focal_method.modifiers: static
focal_method.parameters: (String regex, String rootPath)
focal_method.return: boolean
focal_method.signature: boolean isRegexValidForRootPath(String regex, String rootPath)