Class XmlNavigateCommand
java.lang.Object
com.streamconverter.command.AbstractStreamCommand
com.streamconverter.command.impl.xml.XmlNavigateCommand
- All Implemented Interfaces:
IStreamCommand
XML Navigate Command Class
This class implements command for targeted XML transformation using XPath. It identifies specific elements using XPath expressions and applies IRule transformations to those elements while preserving the overall XML structure.
-
Field Summary
Fields inherited from class com.streamconverter.command.AbstractStreamCommand
log -
Constructor Summary
ConstructorsConstructorDescriptionXmlNavigateCommand(TreePath treePath, IRule rule) Constructor for XML navigation with TreePath selector and transformation rule. -
Method Summary
Modifier and TypeMethodDescriptionstatic XmlNavigateCommandFactory method for creating an XML navigation command with TreePath and rule.protected voidexecuteInternal(InputStream inputStream, OutputStream outputStream) Abstract method to be implemented by subclasses for executing the command.protected Stringコマンドの詳細情報を取得します。Methods inherited from class com.streamconverter.command.AbstractStreamCommand
execute, execute
-
Constructor Details
-
XmlNavigateCommand
Constructor for XML navigation with TreePath selector and transformation rule.- Parameters:
treePath- the TreePath to select elementsrule- the transformation rule to apply to selected elements- Throws:
IllegalArgumentException- if treePath or rule is null
-
-
Method Details
-
create
Factory method for creating an XML navigation command with TreePath and rule.- Parameters:
treePath- the TreePath to select elementsrule- the transformation rule to apply to selected elements- Returns:
- an XmlNavigateCommand that transforms the specified TreePath elements with the given rule
- Throws:
IllegalArgumentException- if rule is null
-
getCommandDetails
Description copied from class:AbstractStreamCommandコマンドの詳細情報を取得します。サブクラスでオーバーライドして、コマンド固有の設定や状態を返すことができます。 この情報はデバッグログに出力され、問題の診断に役立ちます。
- Overrides:
getCommandDetailsin classAbstractStreamCommand- Returns:
- コマンドの詳細情報
-
executeInternal
protected void executeInternal(InputStream inputStream, OutputStream outputStream) throws IOException Description copied from class:AbstractStreamCommandAbstract method to be implemented by subclasses for executing the command.- Specified by:
executeInternalin classAbstractStreamCommand- Parameters:
inputStream- The input stream to read data from.outputStream- The output stream to write data to.- Throws:
IOException- If an I/O error occurs during the execution of the command.
-