Class XPathQueryAttributeParameter
java.lang.Object
eu.europa.esig.dss.xml.common.xpath.item.AbstractXPathQueryItem
eu.europa.esig.dss.xml.common.xpath.item.AbstractXPathQueryParameter
eu.europa.esig.dss.xml.common.xpath.item.XPathQueryAttributeParameter
- All Implemented Interfaces:
XPathQueryItem, XPathQueryParameter
- Direct Known Subclasses:
XPathQueryIdentifierParameter
Allows extraction of an element by the given attribute
-
Constructor Summary
ConstructorsConstructorDescriptionXPathQueryAttributeParameter(DSSAttribute attribute, String attributeValue) Constructor with an expected attribute value.XPathQueryAttributeParameter(DSSAttribute attribute, String attributeValue, boolean ignoreCase) Constructor with an expected attribute value with indication on whether case is to be ignored -
Method Summary
Modifier and TypeMethodDescriptionGets the corresponding DSSAttributeGets the expected attribute valueGets a string representation of the XPath expression chain itembooleanGets whether XPath query item is related to an Attribute node processingbooleanGets whether XPath query item is related to an Element node processingprotected booleanThis method executes the XPath query item requirement, and returns whether thenodesatisfies the ruleMethods inherited from class AbstractXPathQueryParameter
addParameter, getParameters, matchNodeModifier and TypeMethodDescriptionvoidaddParameter(XPathQueryParameter parameter) Adds a parameter to the given XPath query itemGets parameters related to the given XPathQueryItem, if anybooleanThis method verifies whether the givennodematches the XPathQueryItemMethods inherited from class AbstractXPathQueryItem
getLocalName, isEmpty, nextItem, setNextItem, toStringModifier and TypeMethodDescriptionprotected StringgetLocalName(Node node) Gets the local name of a Node, without prefix, if anybooleanisEmpty()Gets whether the XPath query item is emptynextItem()Gets the next XPath chain item, if anysetNextItem(XPathQueryItem nextItem) Sets the nexteu.europa.esig.dss.xml.common.definition.xpath.item.XPathChainItemas part of the XPath expressiontoString()
-
Constructor Details
-
XPathQueryAttributeParameter
Constructor with an expected attribute value. When this constructor is used, the string case comparison is enforced.- Parameters:
attribute-DSSAttributeattributeValue-String
-
XPathQueryAttributeParameter
public XPathQueryAttributeParameter(DSSAttribute attribute, String attributeValue, boolean ignoreCase) Constructor with an expected attribute value with indication on whether case is to be ignored- Parameters:
attribute-DSSAttributeattributeValue-StringignoreCase- whether case comparison of the attribute name is to be ignored
-
-
Method Details
-
getAttribute
-
getAttributeValue
-
process
Description copied from class:AbstractXPathQueryItemThis method executes the XPath query item requirement, and returns whether thenodesatisfies the rule- Specified by:
processin classAbstractXPathQueryItem- Parameters:
node-Nodeto verify- Returns:
- TRUE if the condition matches, FALSE otherwise
-
isElementRelated
public boolean isElementRelated()Description copied from interface:XPathQueryItemGets whether XPath query item is related to an Element node processing- Returns:
- TRUE if XPath query item is related to an Element node processing, FALSE otherwise
-
isAttributeRelated
public boolean isAttributeRelated()Description copied from interface:XPathQueryItemGets whether XPath query item is related to an Attribute node processing- Returns:
- TRUE if XPath query item is related to an Attribute node processing, FALSE otherwise
-
getQueryString
Description copied from interface:XPathQueryItemGets a string representation of the XPath expression chain item- Returns:
String
-