Package org.attoparser.select
Class MarkupSelectorItem
java.lang.Object
org.attoparser.select.MarkupSelectorItem
- All Implemented Interfaces:
IMarkupSelectorItem
- Since:
- 3.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
(package private) static final class
(package private) static interface
(package private) static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final MarkupSelectorItem.IAttributeCondition
(package private) static final String
private final boolean
(package private) static final String
(package private) static final String
(package private) static final String
private final boolean
(package private) static final String
private final boolean
(package private) static final String
private final boolean
(package private) static final String
private final boolean
(package private) static final String
(package private) static final String
private final MarkupSelectorItem.IndexCondition
(package private) static final String
(package private) static final String
private final boolean
(package private) static final String
private final boolean
private final String
private final int
(package private) static final String
private final boolean
(package private) static final String
private final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionMarkupSelectorItem
(boolean html, boolean anyLevel, boolean contentSelector, boolean textSelector, boolean commentSelector, boolean cdataSectionSelector, boolean docTypeClauseSelector, boolean xmlDeclarationSelector, boolean processingInstructionSelector, String selectorPath, MarkupSelectorItem.IndexCondition index, MarkupSelectorItem.IAttributeCondition attributeCondition) -
Method Summary
Modifier and TypeMethodDescriptionboolean
anyLevel()
private static boolean
computeRequiresAttributesInElement
(MarkupSelectorItem.IAttributeCondition attributeCondition) private static boolean
isEmptyOrWhitespace
(String target) private static boolean
matchesAttribute
(boolean html, SelectorElementBuffer elementBuffer, String attrName, MarkupSelectorItem.AttributeCondition.Operator attrOperator, String attrValue) private static boolean
matchesAttributeCondition
(boolean html, SelectorElementBuffer elementBuffer, MarkupSelectorItem.IAttributeCondition attributeCondition) private static boolean
matchesAttributeValue
(MarkupSelectorItem.AttributeCondition.Operator attrOperator, String attrValue, char[] elementAttrValueBuffer, int elementAttrValueOffset, int elementAttrValueLen) boolean
matchesCDATASection
(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) private static boolean
matchesClassAttributeValue
(MarkupSelectorItem.AttributeCondition.Operator attrOperator, String attrValue, char[] elementAttrValueBuffer, int elementAttrValueOffset, int elementAttrValueLen) boolean
matchesComment
(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) boolean
matchesDocTypeClause
(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) boolean
matchesElement
(int markupBlockIndex, SelectorElementBuffer elementBuffer, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) private static boolean
matchesIndex
(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter, MarkupSelectorItem.IndexCondition indexCondition) boolean
matchesProcessingInstruction
(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) boolean
matchesText
(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) boolean
matchesXmlDeclaration
(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) toString()
private static String
toStringAttributeCondition
(MarkupSelectorItem.IAttributeCondition attributeCondition, boolean outputParenthesis)
-
Field Details
-
CONTENT_SELECTOR
- See Also:
-
TEXT_SELECTOR
- See Also:
-
COMMENT_SELECTOR
- See Also:
-
CDATA_SECTION_SELECTOR
- See Also:
-
DOC_TYPE_CLAUSE_SELECTOR
- See Also:
-
XML_DECLARATION_SELECTOR
- See Also:
-
PROCESSING_INSTRUCTION_SELECTOR
- See Also:
-
ID_MODIFIER_SEPARATOR
- See Also:
-
CLASS_MODIFIER_SEPARATOR
- See Also:
-
REFERENCE_MODIFIER_SEPARATOR
- See Also:
-
ID_ATTRIBUTE_NAME
- See Also:
-
CLASS_ATTRIBUTE_NAME
- See Also:
-
ODD_SELECTOR
- See Also:
-
EVEN_SELECTOR
- See Also:
-
html
private final boolean html -
anyLevel
private final boolean anyLevel -
contentSelector
private final boolean contentSelector -
textSelector
private final boolean textSelector -
commentSelector
private final boolean commentSelector -
cdataSectionSelector
private final boolean cdataSectionSelector -
docTypeClauseSelector
private final boolean docTypeClauseSelector -
xmlDeclarationSelector
private final boolean xmlDeclarationSelector -
processingInstructionSelector
private final boolean processingInstructionSelector -
selectorPath
-
selectorPathLen
private final int selectorPathLen -
index
-
attributeCondition
-
requiresAttributesInElement
private final boolean requiresAttributesInElement
-
-
Constructor Details
-
MarkupSelectorItem
MarkupSelectorItem(boolean html, boolean anyLevel, boolean contentSelector, boolean textSelector, boolean commentSelector, boolean cdataSectionSelector, boolean docTypeClauseSelector, boolean xmlDeclarationSelector, boolean processingInstructionSelector, String selectorPath, MarkupSelectorItem.IndexCondition index, MarkupSelectorItem.IAttributeCondition attributeCondition)
-
-
Method Details
-
computeRequiresAttributesInElement
private static boolean computeRequiresAttributesInElement(MarkupSelectorItem.IAttributeCondition attributeCondition) -
toString
-
toStringAttributeCondition
private static String toStringAttributeCondition(MarkupSelectorItem.IAttributeCondition attributeCondition, boolean outputParenthesis) -
anyLevel
public boolean anyLevel()- Specified by:
anyLevel
in interfaceIMarkupSelectorItem
-
matchesText
public boolean matchesText(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesText
in interfaceIMarkupSelectorItem
-
matchesComment
public boolean matchesComment(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesComment
in interfaceIMarkupSelectorItem
-
matchesCDATASection
public boolean matchesCDATASection(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesCDATASection
in interfaceIMarkupSelectorItem
-
matchesDocTypeClause
public boolean matchesDocTypeClause(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesDocTypeClause
in interfaceIMarkupSelectorItem
-
matchesXmlDeclaration
public boolean matchesXmlDeclaration(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesXmlDeclaration
in interfaceIMarkupSelectorItem
-
matchesProcessingInstruction
public boolean matchesProcessingInstruction(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesProcessingInstruction
in interfaceIMarkupSelectorItem
-
matchesElement
public boolean matchesElement(int markupBlockIndex, SelectorElementBuffer elementBuffer, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesElement
in interfaceIMarkupSelectorItem
-
matchesAttributeCondition
private static boolean matchesAttributeCondition(boolean html, SelectorElementBuffer elementBuffer, MarkupSelectorItem.IAttributeCondition attributeCondition) -
matchesAttribute
private static boolean matchesAttribute(boolean html, SelectorElementBuffer elementBuffer, String attrName, MarkupSelectorItem.AttributeCondition.Operator attrOperator, String attrValue) -
matchesAttributeValue
private static boolean matchesAttributeValue(MarkupSelectorItem.AttributeCondition.Operator attrOperator, String attrValue, char[] elementAttrValueBuffer, int elementAttrValueOffset, int elementAttrValueLen) -
matchesClassAttributeValue
private static boolean matchesClassAttributeValue(MarkupSelectorItem.AttributeCondition.Operator attrOperator, String attrValue, char[] elementAttrValueBuffer, int elementAttrValueOffset, int elementAttrValueLen) -
matchesIndex
private static boolean matchesIndex(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter, MarkupSelectorItem.IndexCondition indexCondition) -
isEmptyOrWhitespace
-