Package com.helger.html.hc
Interface IHCNode
-
- All Superinterfaces:
com.helger.commons.hierarchy.IHasChildren<IHCNode>,com.helger.commons.hierarchy.IHasChildrenRecursive<IHCNode>,com.helger.commons.hierarchy.IHasChildrenSorted<IHCNode>,Serializable
- All Known Subinterfaces:
IHCA<IMPLTYPE>,IHCArea<IMPLTYPE>,IHCButton<IMPLTYPE>,IHCCanvas<IMPLTYPE>,IHCCell<IMPLTYPE>,IHCCol<IMPLTYPE>,IHCConditionalCommentNode,IHCControl<IMPLTYPE>,IHCDefinitionItem<IMPLTYPE>,IHCDiv<IMPLTYPE>,IHCElement<IMPLTYPE>,IHCElementWithChildren<IMPLTYPE>,IHCElementWithInternalChildren<IMPLTYPE,CHILDTYPE>,IHCFooter<IMPLTYPE>,IHCForm<IMPLTYPE>,IHCHasChildrenMutable<IMPLTYPE,CHILDTYPE>,IHCIFrame<IMPLTYPE>,IHCImg<IMPLTYPE>,IHCInput<IMPLTYPE>,IHCLabel<IMPLTYPE>,IHCLI<IMPLTYPE>,IHCList<IMPLTYPE,ITEMTYPE>,IHCMediaElement<IMPLTYPE>,IHCMediaElementChild<IMPLTYPE>,IHCMeter<IMPLTYPE>,IHCNav<IMPLTYPE>,IHCNodeList<IMPLTYPE>,IHCNodeWithChildren<IMPLTYPE>,IHCObject<IMPLTYPE>,IHCOL<IMPLTYPE>,IHCOLBase<IMPLTYPE,ITEMTYPE>,IHCPre<IMPLTYPE>,IHCProgress<IMPLTYPE>,IHCRubyChild<IMPLTYPE>,IHCScript<IMPLTYPE>,IHCScriptInline<IMPLTYPE>,IHCSelect<IMPLTYPE>,IHCSpan<IMPLTYPE>,IHCTable<IMPLTYPE>,IHCTablePart<IMPLTYPE>,IHCTextArea<IMPLTYPE>,IHCTextNode<IMPLTYPE>,IHCUL<IMPLTYPE>,IHCULBase<IMPLTYPE,ITEMTYPE>,IHCWrappingNode
- All Known Implementing Classes:
AbstractHCA,AbstractHCArea,AbstractHCBaseTable,AbstractHCBlockQuote,AbstractHCButton,AbstractHCCanvas,AbstractHCCell,AbstractHCCheckBox,AbstractHCCol,AbstractHCControl,AbstractHCDefinitionItem,AbstractHCDiv,AbstractHCElement,AbstractHCElementWithChildren,AbstractHCElementWithInternalChildren,AbstractHCFooter,AbstractHCForm,AbstractHCH1,AbstractHCH2,AbstractHCH3,AbstractHCH4,AbstractHCH5,AbstractHCH6,AbstractHCHasChildrenMutable,AbstractHCIFrame,AbstractHCImg,AbstractHCInput,AbstractHCLabel,AbstractHCLI,AbstractHCList,AbstractHCListLI,AbstractHCMediaElement,AbstractHCMediaElementChild,AbstractHCMeter,AbstractHCNav,AbstractHCNode,AbstractHCNodeList,AbstractHCObject,AbstractHCOL,AbstractHCOLBase,AbstractHCPre,AbstractHCProgress,AbstractHCRadioButton,AbstractHCRubyChild,AbstractHCScript,AbstractHCScriptInline,AbstractHCSelect,AbstractHCSpan,AbstractHCTable,AbstractHCTablePart,AbstractHCTextArea,AbstractHCTextNode,AbstractHCUL,AbstractHCULBase,AbstractHCWrappingNode,HCA,HCA_JS,HCA_MailTo,HCAbbr,HCAddress,HCArea,HCArticle,HCAside,HCAudio,HCB,HCBase,HCBDI,HCBDO,HCBlockQuote,HCBody,HCBR,HCButton,HCButton_Reset,HCButton_Submit,HCCanvas,HCCaption,HCCDATANode,HCCenter,HCCheckBox,HCCite,HCCode,HCCol,HCColGroup,HCCommand,HCCommentNode,HCConditionalCommentNode,HCData,HCDataList,HCDD,HCDel,HCDetails,HCDFN,HCDialog,HCDir,HCDiv,HCDL,HCDOMWrapper,HCDT,HCEdit,HCEditFile,HCEditPassword,HCEM,HCEmbed,HCEntityNode,HCFieldSet,HCFigCaption,HCFigure,HCFont,HCFooter,HCForm,HCFrame,HCFrameset,HCGenericElement,HCGenericElementWithChildren,HCH1,HCH2,HCH3,HCH4,HCH5,HCH6,HCHead,HCHeader,HCHGroup,HCHiddenField,HCHR,HCHtml,HCI,HCIFrame,HCImg,HCInput,HCIns,HCKBD,HCLabel,HCLegend,HCLI,HCLink,HCLinkButton,HCMain,HCMap,HCMark,HCMenu,HCMenuItem,HCMeta,HCMeter,HCNav,HCNoBR,HCNodeList,HCNoScript,HCObject,HCOL,HCOptGroup,HCOption,HCOutOfBandNode,HCOutput,HCP,HCParam,HCPicture,HCPre,HCProgress,HCQ,HCRadioButton,HCRow,HCRP,HCRT,HCRuby,HCS,HCSamp,HCScriptFile,HCScriptInline,HCScriptInlineOnDocumentReady,HCSection,HCSelect,HCSlot,HCSmall,HCSource,HCSpan,HCStrong,HCStyle,HCSub,HCSummary,HCSup,HCTable,HCTBody,HCTD,HCTextArea,HCTextNode,HCTFoot,HCTH,HCTHead,HCTime,HCTitle,HCTrack,HCU,HCUL,HCVar,HCVideo,HCWBR
public interface IHCNode extends com.helger.commons.hierarchy.IHasChildrenSorted<IHCNode>, com.helger.commons.hierarchy.IHasChildrenRecursive<IHCNode>, Serializable
Base interface for a main HC node.
TODO get rid of Serializable- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanConvertToMicroNode(IHCConversionSettingsToNode aConversionSettings)This method checks whether the node is suitable for conversion to anIMicroNode.voidconsistencyCheck(IHCConversionSettingsToNode aConversionSettings)Perform consistency checks on this node.
This method is called at last once perIHCNode.com.helger.xml.microdom.IMicroNodeconvertToMicroNode(IHCConversionSettingsToNode aConversionSettings)The main conversion to a micro node.
Note: must be an IMicroNode since e.g. the text node returns an IMicroText.voidcustomizeNode(IHCCustomizer aCustomizer, EHTMLVersion eHTMLVersion, IHCHasChildrenMutable<?,? super IHCNode> aTargetNode)Customize the current node with the respective customizer.
This method is called at last once perIHCNode.voidfinalizeNodeState(IHCConversionSettingsToNode aConversionSettings, 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 perIHCNode.EHCNodeStategetNodeState()StringgetPlainText()voidregisterExternalResources(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 bycanConvertToMicroNode(IHCConversionSettingsToNode).-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildren
forAllChildren, forAllChildren, forAllChildrenBreakable, forAllChildrenMapped, getChildCount, getChildren, hasChildren, hasNoChildren
-
-
-
-
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 perIHCNode.- Parameters:
aCustomizer- The customizer to use. May benull.eHTMLVersion- The HTML version to be used. May not benull.aTargetNode- The target node where additional nodes should be added. May not benull.
-
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 perIHCNode.- Parameters:
aConversionSettings- The current conversion settings to be used. May not benull.aTargetNode- The target node where additional nodes should be added. May not benull.
-
consistencyCheck
void consistencyCheck(@Nonnull IHCConversionSettingsToNode aConversionSettings)
Perform consistency checks on this node.
This method is called at last once perIHCNode.- Parameters:
aConversionSettings- The current conversion settings to be used. May not benull.
-
canConvertToMicroNode
boolean canConvertToMicroNode(@Nonnull IHCConversionSettingsToNode aConversionSettings)
This method checks whether the node is suitable for conversion to anIMicroNode. If this node cannot be converted, no child node will be converted as well!- Parameters:
aConversionSettings- The conversion settings to be used- Returns:
trueif the node can be converted to a node,falseotherwise.
-
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 bycanConvertToMicroNode(IHCConversionSettingsToNode). Using the bForceRegistration parameter, this can be forced.
This method is called at last once perIHCNode.- Parameters:
aConversionSettings- Conversion settings to be used. Nevernull.bForceRegistration-trueto force registration,falseto 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 benull.- Returns:
- The fully created HTML node
-
-