|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.odata4j.producer.PropertyPathHelper
public class PropertyPathHelper
Helps producers determine if a property is $selected and/or $expanded.
Note on recursive extensions: The idea here is that when one has an object graph that is a tree of like nodes (such as a class hierarchy), it should be possible to specify a $expand that is applied recursively.
Two new custom options are proposed:
expandR and selectR
ABNF:
expandRQueryOp = "expandR=" recursiveExpandClause *("," recursiveExpandClause) recursiveExpandClause = entityNavProperty "/" expandDepth expandDepth = integer selectRQueryOp = "selectR=" recursiveSelectClause *("," recursiveSelectClause) recursiveSelectClause = rSelectItem *("," recursiveSelectClause) rSelectItem = selectedNavProperty "/" rPropItem rPropItem = "*" / selectedProperty
expandDepth drives the number of traversal iterations. An expandDepth of 0 is unlimited. During query processing, the max expandDepth of all recursivExpandClauses is computed and drives processing.
example: expandR=SubTypes/0,Properties/1
This says that at each position in the object graph traversal during query we will expand the SubTypes navigation property. At the first level we will also expand the Properties navigation property
selectR=SubTypes/Namespace,SubTypes/Type
This says that whenever we expand the SubTypes navigation property we will only include Namespace and Type properties.
Field Summary | |
---|---|
protected List<PropertyPath> |
expandPaths
|
protected List<RecursivePropertyPath> |
expandRPaths
|
static String |
OptionExpandR
|
static String |
OptionSelectR
|
protected List<PropertyPath> |
selectPaths
|
protected List<PropertyPath> |
selectRPaths
|
Constructor Summary | |
---|---|
PropertyPathHelper()
|
|
PropertyPathHelper(List<EntitySimpleProperty> select,
List<EntitySimpleProperty> expand)
|
|
PropertyPathHelper(List<EntitySimpleProperty> select,
List<EntitySimpleProperty> expand,
String selectR,
String expandR)
|
|
PropertyPathHelper(QueryInfo qi)
|
|
PropertyPathHelper(String select,
String expand)
|
|
PropertyPathHelper(String select,
String expand,
String selectR,
String expandR)
|
Method Summary | |
---|---|
int |
getCurrentDepth()
|
PropertyPath |
getCurrentNavPath()
|
boolean |
isExpanded(String navPropName)
|
protected boolean |
isExpandedExplicit(String navPropName)
determines if the given navigation property is expanded on the current navigation path |
protected boolean |
isExpandedRecursive(String navPropName)
|
boolean |
isRecursive()
|
boolean |
isSelected(String propName)
Determines if the given property is selected on the current navigation path. |
protected boolean |
isSelectionLimited()
Returns true if the $select contains any limiting items on the current navPath. |
protected boolean |
isSelectionLimitedRecursive()
|
void |
navigate(String propName)
|
void |
popPath()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected List<PropertyPath> expandPaths
protected List<RecursivePropertyPath> expandRPaths
public static final String OptionExpandR
public static final String OptionSelectR
protected List<PropertyPath> selectPaths
protected List<PropertyPath> selectRPaths
Constructor Detail |
---|
public PropertyPathHelper()
public PropertyPathHelper(List<EntitySimpleProperty> select, List<EntitySimpleProperty> expand)
public PropertyPathHelper(List<EntitySimpleProperty> select, List<EntitySimpleProperty> expand, String selectR, String expandR)
public PropertyPathHelper(QueryInfo qi)
public PropertyPathHelper(String select, String expand)
public PropertyPathHelper(String select, String expand, String selectR, String expandR)
Method Detail |
---|
public int getCurrentDepth()
public PropertyPath getCurrentNavPath()
public boolean isExpanded(String navPropName)
protected boolean isExpandedExplicit(String navPropName)
protected boolean isExpandedRecursive(String navPropName)
public boolean isRecursive()
public boolean isSelected(String propName)
propName
- name of a regular property or a navigation property
protected boolean isSelectionLimited()
protected boolean isSelectionLimitedRecursive()
public void navigate(String propName)
public void popPath()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |