|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.ooql.sdk.Navigator
public class Navigator
Class used to perform ObjectObj
navigation throw their Links
Field Summary | |
---|---|
java.util.Hashtable<java.lang.String,java.lang.Object> |
hLnkExpr
|
java.util.Hashtable<java.lang.String,java.lang.Object> |
hObjExpr
|
static int |
LEVEL_ALL
Explode all levels |
static int |
NAVIGATE_BOTH
Navigate versus: Both |
static int |
NAVIGATE_FROM
Navigate versus: From |
static int |
NAVIGATE_TO
Navigate versus: To |
java.lang.String |
sLinkTypeFilterIds
|
Constructor Summary | |
---|---|
Navigator()
|
Method Summary | |
---|---|
void |
addClassPattern(java.lang.String pattern)
Add a ObjectObj 's Class filter pattern. |
void |
addLinkTypePattern(java.lang.String pattern)
Add a LinkType filter pattern. |
void |
addSeparatorToken(java.lang.String token)
Add a separator token for ObjectObj or Link properties |
java.util.Vector<java.lang.String> |
getClassPatterns()
Get the list of ObjectObj 's Class filter patterns |
int |
getLevel()
Get navigate-expansion level |
java.lang.String |
getLinkFilter()
Return the Link filter expression |
Selector |
getLinkSelector()
Get the Link selector |
java.util.Vector<java.lang.String> |
getLinkTypePatterns()
Get the list of LinkType filter patterns. |
java.lang.String |
getObjectFilter()
Return the ObjectObj filter expression |
Selector |
getObjectSelector()
Get the ObjectObj selector |
java.lang.String |
getOOQLTokens()
Show the selector tokens as OOQL syntax |
java.lang.String |
getOutputString(org.jdom.Element xml,
boolean rootElement)
Convert the XML data to String Apply JSON transformation if required |
java.lang.String |
getToken()
Get the property sepataror token |
int |
getVersus()
Get navigate-expansion versus |
static java.lang.String |
getVersusAsString(int versus)
Convert navigate-expansion versus to string |
static int |
getVersusFromString(java.lang.String versus)
Convert navigate-expansion versus from string |
boolean |
isJSON()
Check if the property navigate result is in JSON format |
boolean |
isLinkTypeSequence()
Check if the linktype pattern represents a sequence |
boolean |
isSkipHidden()
Check if hidden links are allowed |
boolean |
isXML()
Check if the navigate results must be in XML format |
void |
setJSON(boolean json)
Set the JSON output format |
void |
setLevel(int level)
Set navigate-expansion level |
void |
setLinkFilter(java.lang.String expression)
Set the Link filter expression |
void |
setLinkSelector(Selector selector)
Set the Link selector to retrieve the Link's properties |
void |
setLinkTypeSequence(boolean sequence)
Set the linktype patterns as a sequence instead of an OR-combination |
void |
setObjectFilter(java.lang.String expression)
Set the ObjectObj filter expression |
void |
setObjectSelector(Selector selector)
Set the ObjectObj selector to retrieve the linked ObjectObj's properties |
void |
setSkipHidden(boolean skip)
Set if hidden links must be skipped or not |
void |
setVersus(int versus)
Set navigate-expansion versus |
void |
setXML(boolean xml)
Set if the navigate results must be in XML format |
java.lang.String |
toOOQL()
Return the Navigator as OOQL syntax |
java.lang.String |
toString()
Return the Navigator as a single String |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NAVIGATE_FROM
public static final int NAVIGATE_TO
public static final int NAVIGATE_BOTH
public static final int LEVEL_ALL
public java.util.Hashtable<java.lang.String,java.lang.Object> hObjExpr
public java.util.Hashtable<java.lang.String,java.lang.Object> hLnkExpr
public java.lang.String sLinkTypeFilterIds
Constructor Detail |
---|
public Navigator()
Method Detail |
---|
public void setLevel(int level)
level
- the depth navigation level, default = 1public int getLevel()
public void setVersus(int versus)
versus
- the navigation versus, default = NAVIGATE_BOTH
public int getVersus()
public static java.lang.String getVersusAsString(int versus)
public static int getVersusFromString(java.lang.String versus)
public void addClassPattern(java.lang.String pattern)
ObjectObj
's Class filter pattern.
pattern
- a pattern to filter ObjectObj's Class
types ( can contain wildcards {*?} )public java.util.Vector<java.lang.String> getClassPatterns()
ObjectObj
's Class
filter patterns
public void addLinkTypePattern(java.lang.String pattern)
pattern
- a pattern to filter LinkType
s ( can contain wildcards {*?} )public java.util.Vector<java.lang.String> getLinkTypePatterns()
LinkType
filter patterns.
public void setSkipHidden(boolean skip)
skip
- if false includes also the hidden links in the navigate resultpublic boolean isSkipHidden()
public void setLinkTypeSequence(boolean sequence)
sequence
- if true, consider the linktype patterns as a sequence:
at each level will be applied a different filter strictly related to the linktype order.
If the linktype names in the sequence are less than current level number,
no filter will be applied for this level and next levels
For example:
navigator.addLinkTypePattern("LinkTyp?1");
navigator.addLinkTypePattern("Link*2");
navigator.addLinkTypePattern("*Type3");
the "LinkTyp?1" will be used to filter the 1st level, "Link*2" for 2nd level and "*Type3" for the 3rd level;
for the next levels (4,5,6,...) all linktypes will be acceptedpublic boolean isLinkTypeSequence()
public void setObjectSelector(Selector selector)
ObjectObj
selector to retrieve the linked ObjectObj's properties
public Selector getObjectSelector()
ObjectObj
selector
public void setLinkSelector(Selector selector)
Link
selector to retrieve the Link's properties
public Selector getLinkSelector()
Link
selector
public void setXML(boolean xml)
xml
- true to obtain the navigate result as xml formatpublic boolean isXML()
public void setJSON(boolean json)
json
- if true the property navigate result will be in JSON formatpublic boolean isJSON()
public void addSeparatorToken(java.lang.String token)
ObjectObj
or Link
properties
public java.lang.String getToken()
public java.lang.String getOOQLTokens()
public void setObjectFilter(java.lang.String expression)
ObjectObj
filter expression
expression
- the OOQL boolean expression used to filter ObjectObj during the navigation processpublic java.lang.String getObjectFilter()
ObjectObj
filter expression
public void setLinkFilter(java.lang.String expression)
Link
filter expression
expression
- the OOQL boolean expression used to filter Links during the navigation processpublic java.lang.String getLinkFilter()
Link
filter expression
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toOOQL()
public java.lang.String getOutputString(org.jdom.Element xml, boolean rootElement) throws OberonException
OberonException
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |