test_class.declarator: LOGGER = LoggerFactory.getLogger(FileVaultNameFinderTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(FileVaultNameFinderTest.class);
test_class.type: Logger
test_class.var_name: LOGGER
test_class.file: webster/src/test/java/net/adamcin/oakpal/webster/FileVaultNameFinderTest.java
test_class.identifier: FileVaultNameFinderTest
test_case.body: @Test
      public void test_file_oneNtRef() throws Exception {
          File p = new File("src/test/resources/filevault/oneNtRef");
          FileArchive archive = new FileArchive(p);
          FileVaultNameFinder finder = new FileVaultNameFinder();
          Set<QName> names = finder.search(archive);
  
          LOGGER.info("names: {}", names);
          assertEquals("name search should return a single reference", 1, names.size());
      }
test_case.class_method_signature: FileVaultNameFinderTest.test_file_oneNtRef()
test_case.full_signature: @Test public void test_file_oneNtRef()
test_case.identifier: test_file_oneNtRef
test_case.invocations: search info assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_file_oneNtRef()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(FileVaultNameFinder.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(FileVaultNameFinder.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: references = new LinkedHashSet<>()
focal_class.modifier: private final
focal_class.original_string: private final Set<QName> references = new LinkedHashSet<>();
focal_class.type: Set<QName>
focal_class.var_name: references
focal_class.declarator: definitions = new LinkedHashSet<>()
focal_class.modifier: private final
focal_class.original_string: private final Set<QName> definitions = new LinkedHashSet<>();
focal_class.type: Set<QName>
focal_class.var_name: definitions
focal_class.file: webster/src/main/java/net/adamcin/oakpal/webster/FileVaultNameFinder.java
focal_class.identifier: FileVaultNameFinder
focal_class.class_method_signature: FileVaultNameFinder.FileVaultNameFinder()
focal_class.full_signature: public  FileVaultNameFinder()
focal_class.identifier: FileVaultNameFinder
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  FileVaultNameFinder()
focal_class.class_method_signature: FileVaultNameFinder.loadBuiltins()
focal_class.full_signature:  void loadBuiltins()
focal_class.identifier: loadBuiltins
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void loadBuiltins()
focal_class.class_method_signature: FileVaultNameFinder.addReference(final QName qName)
focal_class.full_signature:  void addReference(final QName qName)
focal_class.identifier: addReference
focal_class.parameters: (final QName qName)
focal_class.return: void
focal_class.signature: void addReference(final QName qName)
focal_class.class_method_signature: FileVaultNameFinder.addDefinition(final QName qName)
focal_class.full_signature:  void addDefinition(final QName qName)
focal_class.identifier: addDefinition
focal_class.parameters: (final QName qName)
focal_class.return: void
focal_class.signature: void addDefinition(final QName qName)
focal_class.class_method_signature: FileVaultNameFinder.collectPrivilegeDefinition(final @NotNull NamespaceMapping mapping,
                                      final @NotNull PrivilegeDefinition def)
focal_class.full_signature:  void collectPrivilegeDefinition(final @NotNull NamespaceMapping mapping,
                                      final @NotNull PrivilegeDefinition def)
focal_class.identifier: collectPrivilegeDefinition
focal_class.parameters: (final @NotNull NamespaceMapping mapping,
                                      final @NotNull PrivilegeDefinition def)
focal_class.return: void
focal_class.signature: void collectPrivilegeDefinition(final @NotNull NamespaceMapping mapping,
                                      final @NotNull PrivilegeDefinition def)
focal_class.class_method_signature: FileVaultNameFinder.collectNodeTypeNames(final NamespaceMapping mapping, final QNodeTypeDefinition def)
focal_class.full_signature:  void collectNodeTypeNames(final NamespaceMapping mapping, final QNodeTypeDefinition def)
focal_class.identifier: collectNodeTypeNames
focal_class.parameters: (final NamespaceMapping mapping, final QNodeTypeDefinition def)
focal_class.return: void
focal_class.signature: void collectNodeTypeNames(final NamespaceMapping mapping, final QNodeTypeDefinition def)
focal_class.class_method_signature: FileVaultNameFinder.search(final Archive archive)
focal_class.full_signature: public Set<QName> search(final Archive archive)
focal_class.identifier: search
focal_class.modifiers: public
focal_class.parameters: (final Archive archive)
focal_class.return: Set<QName>
focal_class.signature: Set<QName> search(final Archive archive)
focal_class.class_method_signature: FileVaultNameFinder.search(final Archive archive, final Archive.Entry entry)
focal_class.full_signature:  void search(final Archive archive, final Archive.Entry entry)
focal_class.identifier: search
focal_class.parameters: (final Archive archive, final Archive.Entry entry)
focal_class.return: void
focal_class.signature: void search(final Archive archive, final Archive.Entry entry)
focal_class.class_method_signature: FileVaultNameFinder.handleDocView(final @NotNull VaultInputSource source)
focal_class.full_signature:  void handleDocView(final @NotNull VaultInputSource source)
focal_class.identifier: handleDocView
focal_class.parameters: (final @NotNull VaultInputSource source)
focal_class.return: void
focal_class.signature: void handleDocView(final @NotNull VaultInputSource source)
focal_method.body: public Set<QName> search(final Archive archive) throws Exception {
          archive.open(false);
          PrivilegeDefinitions defs = archive.getMetaInf().getPrivileges();
          if (defs != null && !defs.getDefinitions().isEmpty()) {
              NamespaceMapping mapping = defs.getNamespaceMapping();
              defs.getDefinitions().forEach(def -> collectPrivilegeDefinition(mapping, def));
          }
  
          Collection<NodeTypeSet> nodeTypeSets = archive.getMetaInf().getNodeTypes();
          for (NodeTypeSet nodeTypeSet : nodeTypeSets) {
              NamespaceMapping names = nodeTypeSet.getNamespaceMapping();
              nodeTypeSet.getNodeTypes().values().forEach(def -> collectNodeTypeNames(names, def));
          }
  
          Archive.Entry rootEntry = archive.getJcrRoot();
  
          if (rootEntry != null) {
              this.search(archive, rootEntry);
          }
  
          Set<QName> subtracted = new LinkedHashSet<>();
  
          references.stream()
                  .filter(((Predicate<QName>) definitions::contains).negate())
                  .forEachOrdered(subtracted::add);
  
          return subtracted;
      }
focal_method.class_method_signature: FileVaultNameFinder.search(final Archive archive)
focal_method.full_signature: public Set<QName> search(final Archive archive)
focal_method.identifier: search
focal_method.invocations: open getPrivileges getMetaInf isEmpty getDefinitions getNamespaceMapping forEach getDefinitions collectPrivilegeDefinition getNodeTypes getMetaInf getNamespaceMapping forEach values getNodeTypes collectNodeTypeNames getJcrRoot search forEachOrdered filter stream negate
focal_method.modifiers: public
focal_method.parameters: (final Archive archive)
focal_method.return: Set<QName>
focal_method.signature: Set<QName> search(final Archive archive)