Class JWeaverFileWriter
java.lang.Object
org.jweaver.crawler.internal.write.JWeaverFileWriter
- All Implemented Interfaces:
JWeaverWriter
A concrete implementation of the
JWeaverWriter
interface for writing data to files.-
Method Summary
Modifier and TypeMethodDescriptionstatic JWeaverFileWriter
create()
Constructs a new JWeaverFileWriter instance.void
processConnectionMap
(String uri, List<Connection> connections, ExportConfig exportConfiguration) Processes connection map information generated during crawling and writes it using the provided export configuration.void
processErrors
(String baseUri, List<NodeError> nodeErrorList, ExportConfig exportConfiguration) Processes errors encountered during crawling and writes error information using the provided export configuration.void
processSuccess
(SuccessResultPage resultPage, ExportConfig config) Processes a successfully crawled page and writes the result using the provided export configuration.
-
Method Details
-
create
Constructs a new JWeaverFileWriter instance.- Returns:
- JWeaverFileWriter instance
-
processSuccess
Description copied from interface:JWeaverWriter
Processes a successfully crawled page and writes the result using the provided export configuration.- Specified by:
processSuccess
in interfaceJWeaverWriter
- 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 interfaceJWeaverWriter
- 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 urisexportConfiguration
- 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 interfaceJWeaverWriter
- Parameters:
uri
- The base URI of the page.connections
- A list of Connection objects representing connections between pages.exportConfiguration
- The export configuration
-