Package com.powsybl.commons.report
Class ReportNodeNoOp
java.lang.Object
com.powsybl.commons.report.ReportNodeNoOp
- All Implemented Interfaces:
ReportNode
A default no-op implementation
- Author:
- Florian Dupuy <florian.dupuy at rte-france.com>
-
Field Summary
Fields inherited from interface com.powsybl.commons.report.ReportNode
NO_OP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the children of current nodeGet the message of current node, replacing${key}
references in the message template with the corresponding values, either contained in current node or in one of its parents.Get the message key for current node.Get the message template for current node.Get the value corresponding to the given keyGet the values which belong to current node (does not include the inherited values)void
include
(ReportNode reportRoot) Add aReportNode
as a child of currentReportNode
.Create a new adder to create aReportNode
child.void
Print to given writer the current report node and its descendantsvoid
writeJson
(com.fasterxml.jackson.core.JsonGenerator generator) Serialize the current report nodeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.powsybl.commons.report.ReportNode
print
-
Constructor Details
-
ReportNodeNoOp
public ReportNodeNoOp()
-
-
Method Details
-
newReportNode
Description copied from interface:ReportNode
Create a new adder to create aReportNode
child.- Specified by:
newReportNode
in interfaceReportNode
- Returns:
- the created
ReportNodeAdder
-
include
Description copied from interface:ReportNode
Add aReportNode
as a child of currentReportNode
.- Specified by:
include
in interfaceReportNode
- Parameters:
reportRoot
- theReportNode
to add, it needs to be a rootReportNode
-
getMessageKey
Description copied from interface:ReportNode
Get the message key for current node. Note that each key needs to correspond to a unique message template. This allows to build up a dictionary of message templates indexed by their key.- Specified by:
getMessageKey
in interfaceReportNode
- Returns:
- the key
-
getMessageTemplate
Description copied from interface:ReportNode
Get the message template for current node.- Specified by:
getMessageTemplate
in interfaceReportNode
- Returns:
- the message template
-
getMessage
Description copied from interface:ReportNode
Get the message of current node, replacing${key}
references in the message template with the corresponding values, either contained in current node or in one of its parents.- Specified by:
getMessage
in interfaceReportNode
- Returns:
- the message
-
getValues
Description copied from interface:ReportNode
Get the values which belong to current node (does not include the inherited values)- Specified by:
getValues
in interfaceReportNode
- Returns:
- the values unmodifiable map
-
getValue
Description copied from interface:ReportNode
Get the value corresponding to the given key- Specified by:
getValue
in interfaceReportNode
- Parameters:
valueKey
- the key to request- Returns:
- the value
-
getChildren
Description copied from interface:ReportNode
Get the children of current node- Specified by:
getChildren
in interfaceReportNode
- Returns:
- the children nodes
-
writeJson
Description copied from interface:ReportNode
Serialize the current report node- Specified by:
writeJson
in interfaceReportNode
- Parameters:
generator
- the jsonGenerator to use for serialization- Throws:
IOException
-
print
Description copied from interface:ReportNode
Print to given writer the current report node and its descendants- Specified by:
print
in interfaceReportNode
- Parameters:
writer
- the writer to write to- Throws:
IOException
-