Class JWeaverFileWriter

java.lang.Object
org.jweaver.crawler.internal.write.JWeaverFileWriter
All Implemented Interfaces:
JWeaverWriter

public final class JWeaverFileWriter extends Object implements JWeaverWriter
A concrete implementation of the JWeaverWriter interface for writing data to files.
  • Method Details

    • create

      public static JWeaverFileWriter create()
      Constructs a new JWeaverFileWriter instance.
      Returns:
      JWeaverFileWriter instance
    • processSuccess

      public void processSuccess(SuccessResultPage resultPage, ExportConfig config)
      Description copied from interface: JWeaverWriter
      Processes a successfully crawled page and writes the result using the provided export configuration.
      Specified by:
      processSuccess in interface JWeaverWriter
      Parameters:
      resultPage - The success result page containing information about the crawled page.
      config - The export configuration specifying how the result should be written.
    • processErrors

      public void processErrors(String baseUri, List<NodeError> nodeErrorList, ExportConfig exportConfiguration)
      Description copied from interface: JWeaverWriter
      Processes errors encountered during crawling and writes error information using the provided export configuration.
      Specified by:
      processErrors in interface JWeaverWriter
      Parameters:
      baseUri - The base URI of the page where the errors occurred.
      nodeErrorList - A list of NodeError objects containing information about the errors of failed crawled uris
      exportConfiguration - The export configuration
    • processConnectionMap

      public void processConnectionMap(String uri, List<Connection> connections, ExportConfig exportConfiguration)
      Description copied from interface: JWeaverWriter
      Processes connection map information generated during crawling and writes it using the provided export configuration.
      Specified by:
      processConnectionMap in interface JWeaverWriter
      Parameters:
      uri - The base URI of the page.
      connections - A list of Connection objects representing connections between pages.
      exportConfiguration - The export configuration