Package eu.clarin.sru.server.fcs.parser
Class Expression
- java.lang.Object
-
- eu.clarin.sru.server.fcs.parser.QueryNode
-
- eu.clarin.sru.server.fcs.parser.Expression
-
public class Expression extends QueryNode
A FCS-QL expression tree SIMPLE expression node.
-
-
Field Summary
-
Fields inherited from class eu.clarin.sru.server.fcs.parser.QueryNode
children, nodeType, OCCURS_UNBOUNDED, parent
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(QueryVisitor visitor)
String
getLayerIdentifier()
Get the layer identifier.String
getLayerQualifier()
Get the Layer Type Identifier qualifier.Operator
getOperator()
Get the operator.Set<RegexFlag>
getRegexFlags()
Get the regex flags set.String
getRegexValue()
Get the regex value.boolean
hasLayerIdentifier(String identifier)
Check if the expression used a given Layer Type Identifier.boolean
hasLayerQualifier(String qualifier)
Check if the expression used a given qualifier for the Layer Type Identifier.boolean
hasOperator(Operator operator)
Check if expression used a given operator.boolean
hasRegexFlag(RegexFlag flag)
Check if a regex flag is set.boolean
isLayerQualifierEmpty()
Check if the Layer Type Identifier qualifier is empty.boolean
isRegexFlagsEmpty()
Check if a regex flag set is empty.String
toString()
-
Methods inherited from class eu.clarin.sru.server.fcs.parser.QueryNode
getChild, getChild, getChildCount, getChildren, getFirstChild, getFirstChild, getLastChild, getNodeType, getParent, hasNodeType, setParent
-
-
-
-
Method Detail
-
getLayerIdentifier
public String getLayerIdentifier()
Get the layer identifier.- Returns:
- the layer identifier
-
hasLayerIdentifier
public boolean hasLayerIdentifier(String identifier)
Check if the expression used a given Layer Type Identifier.- Parameters:
identifier
- the Layer Type Identifier to check against- Returns:
true
if this identifier was used,false
otherwise
-
getLayerQualifier
public String getLayerQualifier()
Get the Layer Type Identifier qualifier.- Returns:
- the Layer Type Identifier qualifier or
null
if none was used in this expression
-
isLayerQualifierEmpty
public boolean isLayerQualifierEmpty()
Check if the Layer Type Identifier qualifier is empty.- Returns:
true
if no Layer Type Identifier qualifier was set,false
otherwise
-
hasLayerQualifier
public boolean hasLayerQualifier(String qualifier)
Check if the expression used a given qualifier for the Layer Type Identifier.- Parameters:
qualifier
- the qualifier to check against- Returns:
true
if this identifier was used,false
otherwise
-
getOperator
public Operator getOperator()
Get the operator.- Returns:
- the operator
-
hasOperator
public boolean hasOperator(Operator operator)
Check if expression used a given operator.- Parameters:
operator
- the operator to check- Returns:
true
if the given operator was used,false
otherwise
-
getRegexValue
public String getRegexValue()
Get the regex value.- Returns:
- the regex value
-
getRegexFlags
public Set<RegexFlag> getRegexFlags()
Get the regex flags set.- Returns:
- the regex flags set or
null
if no flags were used in this expression
-
isRegexFlagsEmpty
public boolean isRegexFlagsEmpty()
Check if a regex flag set is empty.- Returns:
true
if no regex flags where set,false
otherwise
-
hasRegexFlag
public boolean hasRegexFlag(RegexFlag flag)
Check if a regex flag is set.- Parameters:
flag
- the flag to be checked- Returns:
true
if the flag is set,false
otherwise
-
accept
public void accept(QueryVisitor visitor)
-
-