Interface IHCNode

    • Method Detail

      • getNodeState

        @Nonnull
        EHCNodeState getNodeState()
        Returns:
        The current node state and never null.
      • customizeNode

        void customizeNode​(@Nullable
                           IHCCustomizer aCustomizer,
                           @Nonnull
                           EHTMLVersion eHTMLVersion,
                           @Nonnull
                           IHCHasChildrenMutable<?,​? super IHCNode> aTargetNode)
        Customize the current node with the respective customizer.
        This method is called at last once per IHCNode.
        Parameters:
        aCustomizer - The customizer to use. May be null.
        eHTMLVersion - The HTML version to be used. May not be null.
        aTargetNode - The target node where additional nodes should be added. May not be null.
      • finalizeNodeState

        void finalizeNodeState​(@Nonnull
                               IHCConversionSettingsToNode aConversionSettings,
                               @Nonnull
                               IHCHasChildrenMutable<?,​? super IHCNode> aTargetNode)
        Finalize the node by applying any internal state that was not yet converted to a HC element.
        This method is called at last once per IHCNode.
        Parameters:
        aConversionSettings - The current conversion settings to be used. May not be null.
        aTargetNode - The target node where additional nodes should be added. May not be null.
      • consistencyCheck

        void consistencyCheck​(@Nonnull
                              IHCConversionSettingsToNode aConversionSettings)
        Perform consistency checks on this node.
        This method is called at last once per IHCNode.
        Parameters:
        aConversionSettings - The current conversion settings to be used. May not be null.
      • canConvertToMicroNode

        boolean canConvertToMicroNode​(@Nonnull
                                      IHCConversionSettingsToNode aConversionSettings)
        This method checks whether the node is suitable for conversion to an IMicroNode. If this node cannot be converted, no child node will be converted as well!
        Parameters:
        aConversionSettings - The conversion settings to be used
        Returns:
        true if the node can be converted to a node, false otherwise.
      • registerExternalResources

        void registerExternalResources​(@Nonnull
                                       IHCConversionSettingsToNode aConversionSettings,
                                       boolean bForceRegistration)
        Register external JS and CSS resources required for this node, but only if this HC node can be converted to a micro node as determined by canConvertToMicroNode(IHCConversionSettingsToNode). Using the bForceRegistration parameter, this can be forced.
        This method is called at last once per IHCNode.
        Parameters:
        aConversionSettings - Conversion settings to be used. Never null.
        bForceRegistration - true to force registration, false to register resources only if the node can be converted to a micro node.
      • convertToMicroNode

        @Nullable
        com.helger.xml.microdom.IMicroNode convertToMicroNode​(@Nonnull
                                                              IHCConversionSettingsToNode aConversionSettings)
        The main conversion to a micro node.
        Note: must be an IMicroNode since e.g. the text node returns an IMicroText.
        Parameters:
        aConversionSettings - The conversion settings to be used. May not be null.
        Returns:
        The fully created HTML node
      • getPlainText

        @Nonnull
        String getPlainText()
        Returns:
        The plain text representation of this text. May not be null.