Package com.streamconverter.controller
Class PmdAnalysisController
java.lang.Object
com.streamconverter.controller.AbstractStreamController
com.streamconverter.controller.PmdAnalysisController
- All Implemented Interfaces:
IStreamController
PMD解析レポート変換のためのController
StreamConverterアーキテクチャの Controller層 実装例として、 PMD XMLレポートを複数形式(Markdown, CSV, JSON)に変換する処理を 統一インターフェースで提供します。
アーキテクチャ例証:
- Controller層: 複雑な設定ルールの隠蔽
- StreamConverter層: パイプライン管理と並行処理
- Command層: 純粋な変換処理の実装
提供形式:
- Markdown: AI可読性重視の要約レポート
- CSV: スプレッドシート分析用詳細データ
- JSON: プログラム解析用構造化データ
使用例:
PmdAnalysisController controller = PmdAnalysisController.forMarkdownConversion(); try (FileInputStream xmlInput = new FileInputStream("pmd-report.xml"); FileOutputStream mdOutput = new FileOutputStream("analysis.md")) { List<CommandResult> results = controller.process(xmlInput, mdOutput); // 処理結果の確認... }
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionprotected CommandConfig[]
Configures the command pipeline for this controller.static PmdAnalysisController
CSV形式変換用のControllerを作成static PmdAnalysisController
JSON形式変換用のControllerを作成static PmdAnalysisController
Markdown形式変換用のControllerを作成Gets a description of the controller's current configuration.Gets the expected input data type that this controller can handle.Gets the output data type that this controller produces.Methods inherited from class com.streamconverter.controller.AbstractStreamController
getCommandConfigs, getStreamConverter, isConfigured, process, validateConfiguration
-
Method Details
-
forMarkdownConversion
Markdown形式変換用のControllerを作成- Returns:
- AI可読Markdown形式に変換するController
-
forCsvConversion
CSV形式変換用のControllerを作成- Returns:
- スプレッドシート分析用CSV形式に変換するController
-
forJsonConversion
JSON形式変換用のControllerを作成- Returns:
- 構造化JSON形式に変換するController
-
configureCommands
Description copied from class:AbstractStreamController
Configures the command pipeline for this controller.Subclasses must implement this method to define their specific processing pipeline. The returned CommandConfig array will be used to create the actual command objects using EnhancedCommandFactory.
Example implementation:
@Override protected CommandConfig[] configureCommands() { return new CommandConfig[] { new CommandConfig(CsvNavigateCommand.class, "data", "Extract data column"), new CommandConfig(CsvValidateCommand.class, "Validate output", requiredColumns) }; }
- Specified by:
configureCommands
in classAbstractStreamController
- Returns:
- array of command configurations defining the processing pipeline
-
getConfigurationDescription
Description copied from class:AbstractStreamController
Gets a description of the controller's current configuration.- Specified by:
getConfigurationDescription
in interfaceIStreamController
- Overrides:
getConfigurationDescription
in classAbstractStreamController
- Returns:
- configuration description
-
getInputDataType
Description copied from interface:IStreamController
Gets the expected input data type that this controller can handle.This information can be used by external systems to route data to appropriate controllers.
- Returns:
- the expected input data type (e.g., "CSV", "JSON", "XML", "BINARY")
-
getOutputDataType
Description copied from interface:IStreamController
Gets the output data type that this controller produces.This information helps external systems understand what type of data to expect from the processing.
- Returns:
- the output data type (e.g., "CSV", "JSON", "XML", "BINARY")
-