- java.lang.Object
-
- java.lang.Enum<Axis>
-
- gov.nist.secauto.metaschema.core.metapath.Axis
-
- All Implemented Interfaces:
IExpression
,Serializable
,Comparable<Axis>
public enum Axis extends Enum<Axis> implements IExpression
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANCESTOR
ANCESTOR_OR_SELF
CHILDREN
DESCENDANT
DESCENDANT_OR_SELF
PARENT
SELF
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ISequence<? extends INodeItem>
accept(DynamicContext dynamicContext, ISequence<?> outerFocus)
Provides a double dispatch callback for visitor handling.<RESULT,CONTEXT>
RESULTaccept(gov.nist.secauto.metaschema.core.metapath.IExpressionVisitor<RESULT,CONTEXT> visitor, CONTEXT context)
Provides a double dispatch callback for visitor handling.Stream<? extends INodeItem>
execute(INodeItem focus)
Execute the axis operation on the providedfocus
.Class<INodeItem>
getBaseResultType()
The minimum expected result type to be produced when evaluating the expression.List<? extends IExpression>
getChildren()
Retrieve the child expressions associated with this expression.int
getKeywordIndex()
The ANTLR keyword for this axis type.Class<INodeItem>
getStaticResultType()
The expected result type produced by evaluating the expression.static Axis
valueOf(String name)
Returns the enum constant of this type with the specified name.static Axis[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.IExpression
toASTString
-
-
-
-
Enum Constant Detail
-
ANCESTOR_OR_SELF
public static final Axis ANCESTOR_OR_SELF
-
DESCENDANT
public static final Axis DESCENDANT
-
DESCENDANT_OR_SELF
public static final Axis DESCENDANT_OR_SELF
-
-
Method Detail
-
values
public static Axis[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Axis c : Axis.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Axis valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getKeywordIndex
public int getKeywordIndex()
The ANTLR keyword for this axis type.- Returns:
- the keyword
-
execute
@NonNull public Stream<? extends INodeItem> execute(@NonNull INodeItem focus)
Execute the axis operation on the providedfocus
.- Parameters:
focus
- the node to operate on- Returns:
- the result of the axis operation
-
getChildren
public List<? extends IExpression> getChildren()
Description copied from interface:IExpression
Retrieve the child expressions associated with this expression.- Specified by:
getChildren
in interfaceIExpression
- Returns:
- a list of expressions, which may be empty
-
getBaseResultType
public Class<INodeItem> getBaseResultType()
Description copied from interface:IExpression
The minimum expected result type to be produced when evaluating the expression. The result may be a sub-class or sub-interface of this value.- Specified by:
getBaseResultType
in interfaceIExpression
- Returns:
- the base result type
-
getStaticResultType
public Class<INodeItem> getStaticResultType()
Description copied from interface:IExpression
The expected result type produced by evaluating the expression. The result must be the same or a sub-class or sub-interface of the value provided byIExpression.getBaseResultType()
.This method can be overloaded to provide static analysis of the expression to determine a more specific result type.
- Specified by:
getStaticResultType
in interfaceIExpression
- Returns:
- the result type
-
accept
public <RESULT,CONTEXT> RESULT accept(gov.nist.secauto.metaschema.core.metapath.IExpressionVisitor<RESULT,CONTEXT> visitor, CONTEXT context)
Description copied from interface:IExpression
Provides a double dispatch callback for visitor handling.- Specified by:
accept
in interfaceIExpression
- Type Parameters:
RESULT
- the type of the evaluation resultCONTEXT
- the type of the visitor context- Parameters:
visitor
- the visitor calling this methodcontext
- the visitor context- Returns:
- the result of evaluation
-
accept
public ISequence<? extends INodeItem> accept(DynamicContext dynamicContext, ISequence<?> outerFocus)
Description copied from interface:IExpression
Provides a double dispatch callback for visitor handling.- Specified by:
accept
in interfaceIExpression
- Parameters:
dynamicContext
- the dynamic evaluation contextouterFocus
- the outer focus of the expression- Returns:
- the result of evaluation
-
-