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 booleanprivate final MarkupSelectorItem.IAttributeCondition(package private) static final Stringprivate final boolean(package private) static final String(package private) static final String(package private) static final Stringprivate final boolean(package private) static final Stringprivate final boolean(package private) static final Stringprivate final boolean(package private) static final Stringprivate final boolean(package private) static final String(package private) static final Stringprivate final MarkupSelectorItem.IndexCondition(package private) static final String(package private) static final Stringprivate final boolean(package private) static final Stringprivate final booleanprivate final Stringprivate final int(package private) static final Stringprivate final boolean(package private) static final Stringprivate 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 TypeMethodDescriptionbooleananyLevel()private static booleancomputeRequiresAttributesInElement(MarkupSelectorItem.IAttributeCondition attributeCondition) private static booleanisEmptyOrWhitespace(String target) private static booleanmatchesAttribute(boolean html, SelectorElementBuffer elementBuffer, String attrName, MarkupSelectorItem.AttributeCondition.Operator attrOperator, String attrValue) private static booleanmatchesAttributeCondition(boolean html, SelectorElementBuffer elementBuffer, MarkupSelectorItem.IAttributeCondition attributeCondition) private static booleanmatchesAttributeValue(MarkupSelectorItem.AttributeCondition.Operator attrOperator, String attrValue, char[] elementAttrValueBuffer, int elementAttrValueOffset, int elementAttrValueLen) booleanmatchesCDATASection(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) private static booleanmatchesClassAttributeValue(MarkupSelectorItem.AttributeCondition.Operator attrOperator, String attrValue, char[] elementAttrValueBuffer, int elementAttrValueOffset, int elementAttrValueLen) booleanmatchesComment(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) booleanmatchesDocTypeClause(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) booleanmatchesElement(int markupBlockIndex, SelectorElementBuffer elementBuffer, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) private static booleanmatchesIndex(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter, MarkupSelectorItem.IndexCondition indexCondition) booleanmatchesProcessingInstruction(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) booleanmatchesText(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) booleanmatchesXmlDeclaration(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) toString()private static StringtoStringAttributeCondition(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:
anyLevelin interfaceIMarkupSelectorItem
-
matchesText
public boolean matchesText(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesTextin interfaceIMarkupSelectorItem
-
matchesComment
public boolean matchesComment(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesCommentin interfaceIMarkupSelectorItem
-
matchesCDATASection
public boolean matchesCDATASection(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesCDATASectionin interfaceIMarkupSelectorItem
-
matchesDocTypeClause
public boolean matchesDocTypeClause(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesDocTypeClausein interfaceIMarkupSelectorItem
-
matchesXmlDeclaration
public boolean matchesXmlDeclaration(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesXmlDeclarationin interfaceIMarkupSelectorItem
-
matchesProcessingInstruction
public boolean matchesProcessingInstruction(int markupBlockIndex, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesProcessingInstructionin interfaceIMarkupSelectorItem
-
matchesElement
public boolean matchesElement(int markupBlockIndex, SelectorElementBuffer elementBuffer, MarkupSelectorFilter.MarkupBlockMatchingCounter markupBlockMatchingCounter) - Specified by:
matchesElementin 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
-