Package eu.europa.ted.efx.model
Class Context
- java.lang.Object
-
- eu.europa.ted.efx.model.Context
-
- Direct Known Subclasses:
Context.FieldContext,Context.NodeContext
public abstract class Context extends Object
Used to store an evaluation context. The context is stored both as an absolute and a relative path. The object also preserves the symbol that was used to create the context as well as the type of that symbol (field or node). This class is declared as abstract because it is only meant to be instantiated through its two subclassesContext.FieldContextandContext.NodeContext. This makes instantiation more readable and adds type safety at compile-time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classContext.FieldContextInstantiate this class to create a context from a field identifier.static classContext.NodeContextInstantiate this class to create a context from a node identifier.
-
Constructor Summary
Constructors Modifier Constructor Description protectedContext(String symbol, Expression.PathExpression absolutePath)protectedContext(String symbol, Expression.PathExpression absolutePath, Expression.PathExpression relativePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression.PathExpressionabsolutePath()The absolute path of the context is needed when we want to create a new context relative to this one.BooleanisFieldContext()BooleanisNodeContext()Expression.PathExpressionrelativePath()Returns the relative path of the context.Stringsymbol()Returns the [field or node] identifier that was used to create this context.
-
-
-
Constructor Detail
-
Context
protected Context(String symbol, Expression.PathExpression absolutePath, Expression.PathExpression relativePath)
-
Context
protected Context(String symbol, Expression.PathExpression absolutePath)
-
-
Method Detail
-
isFieldContext
public Boolean isFieldContext()
-
isNodeContext
public Boolean isNodeContext()
-
symbol
public String symbol()
Returns the [field or node] identifier that was used to create this context.
-
absolutePath
public Expression.PathExpression absolutePath()
The absolute path of the context is needed when we want to create a new context relative to this one.
-
relativePath
public Expression.PathExpression relativePath()
Returns the relative path of the context.
-
-