Package ai.platon.pulsar.dom.nodes
Class NodesKt
-
- All Implemented Interfaces:
public final class NodesKt
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringA_LABELSpublic final static StringA_ML_LABELSpublic final static StringA_CAPTIONpublic final static StringML_LABELpublic final static StringV_OWNER_BODYpublic final static StringV_VIEW_PORTprivate final static PatternBOX_SYNTAX_PATTERN_1private final static PatternBOX_SYNTAX_PATTERNprivate final static <Error class: unknown class>STANDARD_ATTRIBUTESprivate final static <Error class: unknown class>VALUABLE_ATTRIBUTESprivate final static <Error class: unknown class>TEMPORARY_ATTRIBUTESprivate final static PatternBOX_CSS_PATTERN_1private final static PatternBOX_CSS_PATTERNprivate final static <Error class: unknown class>documentComparatorprivate final static <Error class: unknown class>descriptiveDocumentComparatorprivate final static <Error class: unknown class>nodeComparatorprivate final static <Error class: unknown class>nodePositionComparator
-
Method Summary
Modifier and Type Method Description final PatterngetBOX_SYNTAX_PATTERN_1()final PatterngetBOX_SYNTAX_PATTERN()final <Error class: unknown class>getSTANDARD_ATTRIBUTES()The standard html attributes final <Error class: unknown class>getVALUABLE_ATTRIBUTES()final <Error class: unknown class>getTEMPORARY_ATTRIBUTES()final PatterngetBOX_CSS_PATTERN_1()Cases:<ul> <li>div:in-box(200, 200, 300, 300)</li> <li>div:in-box(200, 200, 300, 300, 50)</li> <li>*:in-box(200, 200, 300, 300)</li> <li>*:in-box(200, 200, 300, 300, 50)</li> <li>div:in-box(200, 200, 300, 300),*:in-box(200, 200, 300, 300, 50)</li> </ul> final PatterngetBOX_CSS_PATTERN()final <Error class: unknown class>getDocumentComparator()final <Error class: unknown class>getDescriptiveDocumentComparator()final <Error class: unknown class>getNodeComparator()final <Error class: unknown class>getNodePositionComparator()final static StringgetStyle(Array<String> styles, String styleKey)final static StringconvertBox(String box)final static UnitforEachAncestor(Node $self, Function1<Element, Unit> action)Actions final static UnitforEachAncestorIf(Node $self, Function1<Element, Boolean> filter, Function1<Element, Unit> action)final static ElementfindFirstAncestor(Node $self, Function1<Element, Boolean> predicate)Find first ancestor matches the predication final static ElementfindFirstAncestor(Node $self, Function1<Element, Boolean> stop, Function1<Element, Boolean> predicate)Find first ancestor matches the predication final static UnitforEach(Node $self, Boolean includeRoot, Function1<Node, Unit> action)Apply an action to each descendant node. final static UnitforEachMatching(Node $self, Function1<Node, Boolean> predicate, Function1<Node, Unit> action)Apply an action to each descendant node. final static UnitforEachElement(Node $self, Boolean includeRoot, Function1<Element, Unit> action)Apply an action to each descendant node. final static UnitforEachElementMatching(Node $self, Function1<Element, Boolean> predicate, Function1<Element, Unit> action)Apply an action to each descendant node. final static Doubleaccumulate(Node $self, Integer featureKey, Boolean includeRoot)final static Doubleaccumulate(Node $self, Integer featureKey, Boolean includeRoot, Function1<Node, Boolean> filter)final static Pair<Double, Double>minmax(Node $self, Integer featureKey)final static NodeminBy(Node $self, Function1<Node, Integer> transform)final static NodemaxBy(Node $self, Function1<Node, Integer> transform)final static NodeminByDouble(Node $self, Function1<Node, Double> transform)final static NodemaxByDouble(Node $self, Function1<Node, Double> transform)final static Integercount(Node $self, Function1<Node, Boolean> predicate)final static IntegercountElements(Node $self, Function1<Element, Boolean> predicate)-
-
Method Detail
-
getBOX_SYNTAX_PATTERN_1
final Pattern getBOX_SYNTAX_PATTERN_1()
-
getBOX_SYNTAX_PATTERN
final Pattern getBOX_SYNTAX_PATTERN()
-
getSTANDARD_ATTRIBUTES
final <Error class: unknown class> getSTANDARD_ATTRIBUTES()
The standard html attributes
-
getVALUABLE_ATTRIBUTES
final <Error class: unknown class> getVALUABLE_ATTRIBUTES()
-
getTEMPORARY_ATTRIBUTES
final <Error class: unknown class> getTEMPORARY_ATTRIBUTES()
-
getBOX_CSS_PATTERN_1
final Pattern getBOX_CSS_PATTERN_1()
Cases:
<ul> <li>div:in-box(200, 200, 300, 300)</li> <li>div:in-box(200, 200, 300, 300, 50)</li> <li>*:in-box(200, 200, 300, 300)</li> <li>*:in-box(200, 200, 300, 300, 50)</li> <li>div:in-box(200, 200, 300, 300),*:in-box(200, 200, 300, 300, 50)</li> </ul>
-
getBOX_CSS_PATTERN
final Pattern getBOX_CSS_PATTERN()
-
getDocumentComparator
final <Error class: unknown class> getDocumentComparator()
-
getDescriptiveDocumentComparator
final <Error class: unknown class> getDescriptiveDocumentComparator()
-
getNodeComparator
final <Error class: unknown class> getNodeComparator()
-
getNodePositionComparator
final <Error class: unknown class> getNodePositionComparator()
-
convertBox
final static String convertBox(String box)
-
forEachAncestor
final static Unit forEachAncestor(Node $self, Function1<Element, Unit> action)
Actions
-
forEachAncestorIf
final static Unit forEachAncestorIf(Node $self, Function1<Element, Boolean> filter, Function1<Element, Unit> action)
-
findFirstAncestor
final static Element findFirstAncestor(Node $self, Function1<Element, Boolean> predicate)
Find first ancestor matches the predication
-
findFirstAncestor
final static Element findFirstAncestor(Node $self, Function1<Element, Boolean> stop, Function1<Element, Boolean> predicate)
Find first ancestor matches the predication
-
forEach
final static Unit forEach(Node $self, Boolean includeRoot, Function1<Node, Unit> action)
Apply an action to each descendant node.
-
forEachMatching
final static Unit forEachMatching(Node $self, Function1<Node, Boolean> predicate, Function1<Node, Unit> action)
Apply an action to each descendant node.
-
forEachElement
final static Unit forEachElement(Node $self, Boolean includeRoot, Function1<Element, Unit> action)
Apply an action to each descendant node.
TODO: consider remove includeRoot parameter
-
forEachElementMatching
final static Unit forEachElementMatching(Node $self, Function1<Element, Boolean> predicate, Function1<Element, Unit> action)
Apply an action to each descendant node.
-
accumulate
final static Double accumulate(Node $self, Integer featureKey, Boolean includeRoot)
-
accumulate
final static Double accumulate(Node $self, Integer featureKey, Boolean includeRoot, Function1<Node, Boolean> filter)
-
minByDouble
final static Node minByDouble(Node $self, Function1<Node, Double> transform)
-
maxByDouble
final static Node maxByDouble(Node $self, Function1<Node, Double> transform)
-
countElements
final static Integer countElements(Node $self, Function1<Element, Boolean> predicate)
-
-
-
-