Package org.ametys.web.tags
Class TagExpression
- java.lang.Object
-
- org.ametys.web.tags.TagExpression
-
- All Implemented Interfaces:
Expression
public class TagExpression extends Object implements Expression
Constructs anExpression
corresponding to a tag comparison.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TagExpression.LogicalOperator
The logical operator to use in xpath query-
Nested classes/interfaces inherited from interface org.ametys.plugins.repository.query.expression.Expression
Expression.Operator
-
-
Field Summary
Fields Modifier and Type Field Description private TagExpression.LogicalOperator
_logicalOperator
private String
_metadataName
private Expression.Operator
_operator
private String[]
_values
-
Constructor Summary
Constructors Constructor Description TagExpression(Expression.Operator operator, String value)
Creates the expression.TagExpression(Expression.Operator operator, String[] values, TagExpression.LogicalOperator logicalOperator)
Creates the expression.TagExpression(Expression.Operator operator, String[] values, TagExpression.LogicalOperator logicalOperator, String metadataName)
Creates the expression.TagExpression(Expression.Operator operator, String value, String metadataName)
Creates the expression.
-
-
-
Field Detail
-
_operator
private Expression.Operator _operator
-
_logicalOperator
private TagExpression.LogicalOperator _logicalOperator
-
_metadataName
private String _metadataName
-
-
Constructor Detail
-
TagExpression
public TagExpression(Expression.Operator operator, String value)
Creates the expression.- Parameters:
operator
- the operator to make the comparison (only Operator.EQ and Operator.NE allowed)value
- the tag value
-
TagExpression
public TagExpression(Expression.Operator operator, String value, String metadataName)
Creates the expression.- Parameters:
operator
- the operator to make the comparison (only Operator.EQ and Operator.NE allowed)value
- the tag valuemetadataName
- the metadata holding the tags
-
TagExpression
public TagExpression(Expression.Operator operator, String[] values, TagExpression.LogicalOperator logicalOperator)
Creates the expression.- Parameters:
operator
- the operator to make the comparison (only Operator.EQ and Operator.NE allowed)values
- the tags value in a arraylogicalOperator
- the logical operator to use for given value
-
TagExpression
public TagExpression(Expression.Operator operator, String[] values, TagExpression.LogicalOperator logicalOperator, String metadataName)
Creates the expression.- Parameters:
operator
- the operator to make the comparison (only Operator.EQ and Operator.NE allowed)values
- the tags value in a arraylogicalOperator
- the logical operator to use for given valuemetadataName
- the metadata holding the tags
-
-
Method Detail
-
build
public String build()
Description copied from interface:Expression
Build the expression.- Specified by:
build
in interfaceExpression
- Returns:
- The XPath view of the expression.
-
-