org.objectweb.medor.query.jorm.lib
Class NavigatorNodeFactory
java.lang.Object
org.objectweb.medor.query.jorm.lib.NavigatorNodeFactory
public class NavigatorNodeFactory
extends java.lang.Object
This class constructs a QueryTree from a NavigatorOperator, which represents
a path expression.
It is a factory for normal JoinProject query nodes, which implement the
semantics of the path traversal represented by the NavigatorOperator.
GENCLASS_ELEMENT_NAME
public static final String GENCLASS_ELEMENT_NAME
IS_EMPTY
public static final byte IS_EMPTY
Applies to navigation ending with a GenClassRef only.
Tests whether there are no GenClass elements for the GenClassRef.
- 4
IS_NOT_EMPTY
public static final byte IS_NOT_EMPTY
Applies to navigation ending with a GenClassRef only.
Tests whether there are GenClass elements for the GenClassRef.
- 8
NAVIGATION
public static final byte NAVIGATION
To navigate up to the last field.
- 1
NAVIGATION_INTO_LAST
public static final byte NAVIGATION_INTO_LAST
To navigate up to the element referenced by the last field.
For a GenClassRef, includes the GenClass element. For a ClassRef,
includes all fields of the referenced class object.
- 2
PNAME_FIELD_NAME
public static final String PNAME_FIELD_NAME
logger
public static Logger logger
navigate
public static QueryTreeField navigate(NavigatorOperator nav,
String aliasName,
byte operation)
throws MedorException
Creates a QueryTree corresponding to the path traversal represented by
the NavigatorOperator.
The end of the path expression can either be a single-valued field or
a reference to a GenClass. In the latter case, the elements
of the GenClass are projected together with their index attributes.
nav
- is the NavigatorOperator representing the path expression.
This operator starts with a FieldOperand pointing to a Field called here
FStart. All fields in the node hosting FStart are projected.aliasName
- is the root name of the Fields reached by the path
expression.operation
- indicates which operation to perform (NAVIGATION,
NAVIGATION_INTO_LAST, IS_EMPTY or IS_NOT_EMPTY)
- the QueryTreeField which matches the NavigatorOperator.
resetNameIndexes
public static void resetNameIndexes()