|
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.Selector
public class Selector
Class used to perform ObjectObj
, Link
and administrative object property selection
Nested Class Summary | |
---|---|
class |
Selector.HistorySelector
Define a Selector to filter history table items |
Field Summary | |
---|---|
boolean |
removeLineBreak
|
boolean |
rootElement
|
boolean |
XMLm
XML minus option: reduce xml information |
boolean |
XMLp
XML plus option: increase xml information |
Constructor Summary | |
---|---|
Selector()
|
|
Selector(java.lang.Class<?> objType)
Define new selector |
|
Selector(java.lang.Class<?> objType,
java.lang.String composedName)
Define new selector |
|
Selector(java.lang.Class<?> objType,
java.lang.String composedName,
java.lang.String userName)
Define new selector for User objects |
|
Selector(java.lang.String type,
java.lang.String ooql)
Define new selector from OOQL string |
Method Summary | |
---|---|
Selector |
addBasic(java.lang.String property)
Add basic property. |
Selector |
addBasic(java.lang.String property,
java.lang.String alias)
Add basic property with alias Used to extract simple object properties |
Selector |
addHistoryBasic(int event,
java.lang.String userName,
FieldRange dateRange)
Add history item filter. |
Selector |
addSelector(Selector selector)
Add complex property selector. |
Selector |
addSeparatorToken(java.lang.String token)
Add a separator token. |
java.util.Vector<java.lang.String> |
getAdminProperties(java.util.Vector<?> objectNames,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Apply this selector to extract properties for multiple objects |
java.lang.String |
getEncoding()
Get the charset encoding for XML output format |
java.util.Vector<java.lang.Object> |
getFilterArgs()
Get property computation Program arguments |
java.lang.String |
getOOQLTokens()
Show the selector tokens as OOQL syntax |
java.lang.String |
getOutputString(org.jdom.Element xml)
Convert the XML data to String Apply JSON transformation if required |
Selector |
getParentSelector()
Get the parent selector [INTERNAL USAGE] |
java.util.Vector<java.lang.String> |
getSeparatorTokens()
Get the separator tokens |
OBBase |
getTargetInstance()
Get the target object instance |
java.lang.Class<?> |
getTargetType()
Get the target type |
boolean |
isJSON()
Check if the property selection result is in JSON format |
boolean |
isXML()
Check if the property selection result is in XML format |
int |
length()
Return the number of elements at first selector level |
java.lang.String |
prepareFields(java.lang.Object object,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters,
int level)
Apply this selector to extract object properties |
java.lang.String |
prepareFields(java.util.Vector<?> objectNames,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters,
int level)
Apply this selector to extract properties for multiple objects |
org.jdom.Element |
prepareXMLFields(org.jdom.Element eBase,
java.lang.Object object,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Apply this selector to extract object properties in XML format |
org.jdom.Element |
prepareXMLFields(java.lang.String listName,
java.util.Vector<?> objectNames,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Apply this selector to extract properties for multiple objects in XML format |
Selector |
setEncoding(java.lang.String encoding)
Set the charset encoding for XML output format |
Selector |
setFilterArgs(java.util.Vector<java.lang.Object> args)
Set Program arguments used to extract properties obtained by Program execution |
Selector |
setJSON(boolean json)
Set the JSON output format |
Selector |
setParentSelector(Selector selector)
Set the parent selector [INTERNAL USAGE] |
Selector |
setSeparatorTokens(java.lang.String[] tokens)
Set the separator tokens |
Selector |
setTargetInstance(OBBase objInstance)
Set the target object instance |
Selector |
setTargetType(java.lang.Class<?> objType)
Set the target type |
Selector |
setView(java.lang.String viewName,
Framework framework)
Set the view for object/link property extraction |
Selector |
setXML(boolean xml)
Set the XML output format |
java.lang.String |
toOOQL()
Show the selector properties as OOQL syntax |
java.lang.String |
toString()
Show the selector properties as String |
boolean |
useView()
Check if the selector applies a view to the result |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean XMLm
public boolean XMLp
public boolean removeLineBreak
public boolean rootElement
Constructor Detail |
---|
public Selector()
public Selector(java.lang.String type, java.lang.String ooql) throws java.lang.Exception
type
- the OOQL object type ( objectspace,linktype,class,object,mail,link,..... )ooql
- the OOQL selector format
java.lang.Exception
public Selector(java.lang.Class<?> objType)
objType
- the target type ( Field.class, Class.class, Link.class, ObjectObj.class ..)public Selector(java.lang.Class<?> objType, java.lang.String composedName)
objType
- the target type ( Field.class, Class.class, Link.class, ObjectObj.class ..)composedName
- OOQL property identifier/name (should be empty for the root selector)public Selector(java.lang.Class<?> objType, java.lang.String composedName, java.lang.String userName)
objType
- the target type ( View.class, ObjectGroup.class, Query.class ..)composedName
- OOQL property identifier/name (should be empty for the root selector)userName
- the User
nameMethod Detail |
---|
public int length()
public Selector setTargetType(java.lang.Class<?> objType)
objType
- object class instancepublic java.lang.Class<?> getTargetType()
public Selector setTargetInstance(OBBase objInstance)
objInstance
- target object instancepublic OBBase getTargetInstance()
public Selector addBasic(java.lang.String property)
public Selector addBasic(java.lang.String property, java.lang.String alias)
property
- the property expressionalias
- the alias for this propertypublic Selector addSelector(Selector selector)
public Selector setView(java.lang.String viewName, Framework framework) throws OberonException
OberonException
public boolean useView()
public Selector addHistoryBasic(int event, java.lang.String userName, FieldRange dateRange)
event
- the history event flaguserName
- filter items by event responsible User
dateRange
- filter items by date rangepublic Selector setParentSelector(Selector selector)
public Selector getParentSelector()
public Selector addSeparatorToken(java.lang.String token)
public Selector setSeparatorTokens(java.lang.String[] tokens)
addSeparatorToken(String)
public java.util.Vector<java.lang.String> getSeparatorTokens()
addSeparatorToken(String)
public Selector setFilterArgs(java.util.Vector<java.lang.Object> args)
Program
arguments used to extract properties obtained by Program execution
public java.util.Vector<java.lang.Object> getFilterArgs()
Program
arguments
public Selector setXML(boolean xml)
xml
- if true the property selection result will be in XML formatpublic boolean isXML()
public Selector setJSON(boolean json)
json
- if true the property selection result will be in JSON formatpublic boolean isJSON()
public Selector setEncoding(java.lang.String encoding)
encoding
- set the encoding charset ( default UTF-8 , ISO-8859-1 , ...)public java.lang.String getEncoding()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toOOQL()
public java.lang.String getOOQLTokens()
public java.lang.String prepareFields(java.util.Vector<?> objectNames, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters, int level) throws OberonException
objectNames
- a Vector of object names or ObjectObj
/Link
IDsframework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)level
- the token separator initial level
OberonException
addSeparatorToken(String)
public java.lang.String prepareFields(java.lang.Object object, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters, int level) throws OberonException
object
- the object name or ObjectObj
/Link
ID or the object instanceframework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)level
- the token separator initial level
OberonException
addSeparatorToken(String)
public java.util.Vector<java.lang.String> getAdminProperties(java.util.Vector<?> objectNames, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
objectNames
- a Vector of object names or ObjectObj
/Link
IDsframework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
addSeparatorToken(String)
public org.jdom.Element prepareXMLFields(java.lang.String listName, java.util.Vector<?> objectNames, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
listName
- the root xml-tag nameobjectNames
- a Vector of object names or ObjectObj
/Link
IDsframework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
public org.jdom.Element prepareXMLFields(org.jdom.Element eBase, java.lang.Object object, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
object
- the object name or ObjectObj
/Link
ID or the object instanceframework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
public java.lang.String getOutputString(org.jdom.Element xml) throws OberonException
OberonException
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |