|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.searchservice.searchlibrary.resultset.ResultSet
public class ResultSet
The ResultSet element provides a container for placing produced records and for consuming them.
It organizes them in a chain of parts explicitly created by the producer. It provides incremental
population of the results through the chain of parts. The contents of the result set parts are immutable
once created
| Constructor Summary | |
|---|---|
ResultSet(CreationParams params)
Creates a new ResultSet |
|
ResultSet(java.lang.String filename)
Creates a new ResultSet |
|
ResultSet(java.lang.String[] properties,
boolean dataFlow)
Creates a new ResultSet |
|
ResultSet(java.lang.String properties,
boolean dataFlow)
Creates a new ResultSet |
|
ResultSet(java.lang.String filename,
int noDecrypt)
Creates a new ResultSet |
|
ResultSet(java.lang.String filename,
java.security.PrivateKey privkey)
Creates a new ResultSet |
|
| Method Summary | |
|---|---|
boolean |
addResults(java.lang.String[] results)
Adds teh provided results to the underlying buffer |
boolean |
addText(java.lang.String[] results)
Adds teh provided text records in the underlying buffer |
void |
addWSEPR(java.lang.String epr)
Adds a WS-EPR serialization to the head properties container |
void |
clear()
Clears underlying structures |
java.lang.String |
cloneRS()
Clones the implied ResultSet |
void |
disableAccessLeasing()
|
void |
disableTimeLeasing()
|
void |
endAuthoring()
Stops the authoring of the current part and makes it available |
java.lang.String |
executeQueryOnDocument(java.lang.String xPath)
Evaluates the provided xPath expression against the head part document and returns the output as a serialized string. |
java.lang.String |
executeQueryOnHead(java.lang.String xPath)
Evaluates the provided xPath expression against the head part document and returns the output as a serialized string. |
java.lang.String[] |
executeQueryOnResults(java.lang.String xPath)
Evaluates the provided expression against each of the results in the current payload part and if it produces output the entire result serialization is considered as output. |
void |
extendAccessLeasing(int extend)
Extend the access leasing |
boolean |
extendTimeLeasing(java.util.Date extend)
Extend the time leasing |
java.lang.String |
filterRS(java.lang.String xPath)
Performs a filtering operation based on an provided xPath on the referenced ResultSet returning
the name of the local file that holds the head part of the new ResultSet. |
java.lang.String |
filterRS(java.lang.String xPath,
java.lang.String[] properties)
Performs a filtering operation based on an provided xPath on the referenced ResultSet returning
the name of the local file that holds the head part of the new ResultSet. |
int |
getAccessLeasing()
Get the access leasing |
java.lang.String |
getCurrentContentPartName()
Retrieves the name of the current payload part |
java.lang.String |
getCurrentContentPartPayload()
Retrieves the payload of the current content part |
byte[] |
getEncKey()
Get the encryption key |
java.lang.String |
getFileContent(java.lang.String filename)
Retrieves the content of the provided local file |
boolean |
getFirstPart()
Sets the current part to be the first payload part |
org.gcube.common.searchservice.searchlibrary.resultset.security.HeadMnemonic |
getHeadMnemonic()
Get security properties |
java.lang.String |
getHeadName()
Retrieves the name of the head part containing file |
java.lang.String |
getHostIP()
Retrieves the IP address of the host that the ResultSet receides in |
java.lang.String |
getHostName()
Retrieves the name of the host that the ResultSet receides in |
org.gcube.common.searchservice.searchlibrary.resultset.security.Mnemonic |
getMnemonic()
Get security properties |
boolean |
getNextPart(int waitMax)
Sets the next part in the chain as the current one waiting at most the provided amount of time in milliseconds for it to become available |
int |
getNumberOfResults(java.lang.String type)
Retrieves the number of results stored in a payload part of the ResultSet |
boolean |
getPreviousPart()
Sets the current part to be the previous part |
java.lang.String[] |
getProperties(java.lang.String type)
Retrieves the properties of the provided type |
java.lang.String |
getResult(int index)
Retrieves the result that has the specified index in the current payload part |
java.lang.String[] |
getResults()
Retrieves all the results that are in the current payload part |
java.lang.String[] |
getResults(int from,
int to)
Retrieves all the results that are in the current payload part that have an index in the specified index span |
ResultSetRef |
getRSRef()
Retrieves the container of the ResultSet info |
java.util.Date |
getTimeLeasing()
Get the time leasing |
boolean |
isFirst()
Checks if the current part is the first payload part |
boolean |
isForward()
Is the RS forward reading only. |
boolean |
isLast()
Checks if the current part is the last payload part |
java.lang.String |
keepTop(int count,
short type)
Performs a keep top operation on the implied ResultSet chain and creates a bew ResultSet
with the top kept. |
java.lang.String |
keepTop(java.lang.String[] properties,
int count,
short type)
Performs a keep top operation on the implied ResultSet chain and creates a bew ResultSet
with the top kept |
RSConstants.CONTROLFLOW |
more(long time)
/** Checks whether or not more results should be produced. |
boolean |
nextAvailable()
Checks without blocking if the next part in this chain is available |
void |
overrideProperties(PropertyElementBase[] properties)
removes any existing properties and sets the new ones |
void |
overrideProperties(java.lang.String properties)
removes any existing properties and sets the new ones |
boolean |
removePreviousPart()
Sets the current part to be the previous part |
java.lang.String |
retrieveCustomProperties()
Retrieves a serialization of the head custom properties |
boolean |
setForward(boolean f)
Set an RS to be forward |
java.lang.String[] |
splitClear()
Splits the current payload part in sized defined by the RSConstants.partSize property |
java.lang.String[] |
splitEncoded()
Splits the current payload part in sized defined by the RSConstants.partSize property and encdes
them using Base64 encoding |
void |
startNewPart()
Starts a new part in the chain of parts, making the part that was currently authored available |
java.lang.String |
transformByXSLT(java.lang.String xslt)
Performs an xslt transformation against the current payload part |
java.lang.String |
transformByXSLTAndPersist(java.lang.String xslt)
Performs an xslt transformation against the current payload part |
java.lang.String |
transformByXSLTAndPersist(javax.xml.transform.Templates xslt)
Performs an xslt transformation against the current payload part |
java.lang.String |
transformRS(java.lang.String transformation)
Performs an xslt transfromation against the payload part of the implied ResultSet and creates
a new ResultSet with payload the output of each transformation. |
java.lang.String |
transformRS(java.lang.String transformation,
java.lang.String[] properties)
Performs an xslt transfromation against the payload part of the implied ResultSet and creates
a new ResultSet with payload the output of each transformation. |
void |
wrapFile(java.lang.String filename)
Wraps the provided file content |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResultSet(CreationParams params)
throws java.lang.Exception
ResultSet
params - RS creation params
java.lang.Exception - An unrecoverable for the operation error occured
public ResultSet(java.lang.String[] properties,
boolean dataFlow)
throws java.lang.Exception
ResultSet
properties - The properties this ResultSet should havedataFlow - wheteher or not this ResultSet should enable rcord production on demand
java.lang.Exception - An unrecoverable for the operation error occured
public ResultSet(java.lang.String properties,
boolean dataFlow)
throws java.lang.Exception
ResultSet
properties - The properties this ResultSet should havedataFlow - wheteher or not this ResultSet should enable rcord production on demand
java.lang.Exception - An unrecoverable for the operation error occured
public ResultSet(java.lang.String filename)
throws java.lang.Exception
ResultSet
filename - The file that holds the head of the existing ResultSet chain to point to
java.lang.Exception - An unrecoverable for the operation error occured
public ResultSet(java.lang.String filename,
int noDecrypt)
throws java.lang.Exception
ResultSet
filename - The file that holds the head of the existing ResultSet chain to point tonoDecrypt - Flag saying to do a decrypt
java.lang.Exception - An unrecoverable for the operation error occured
public ResultSet(java.lang.String filename,
java.security.PrivateKey privkey)
throws java.lang.Exception
ResultSet
filename - The file that holds the head of the existing ResultSet chain to point toprivkey - Private key to be used with the RS
java.lang.Exception - An unrecoverable for the operation error occurred| Method Detail |
|---|
public void addWSEPR(java.lang.String epr)
throws java.lang.Exception
epr - The WS-EPR to add
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String getHeadName()
throws java.lang.Exception
java.lang.Exception - An unrecoverable for the operation error occured
public void clear()
throws java.lang.Exception
java.lang.Exception - An unrecoverable for the operation error occuredpublic ResultSetRef getRSRef()
ResultSet info
public boolean addResults(java.lang.String[] results)
throws java.lang.Exception
results - to add
true if all the results were successfully added, false otherwise
java.lang.Exception - An unrecoverable for the operation error occured
public boolean addText(java.lang.String[] results)
throws java.lang.Exception
results - The records to add
true if all the records were successfully written, false otherwise
java.lang.Exception - An unrecoverable for the operation error occured
public RSConstants.CONTROLFLOW more(long time)
throws java.lang.Exception
ResultSet is no longer
used, or the timeout the user specified has been reached
time - The timeout for the answer
java.lang.Exception - An unrecoverabvle for the operation error has occured
public void startNewPart()
throws java.lang.Exception
java.lang.Exception - An unrecoverable for the operation error occured
public void endAuthoring()
throws java.lang.Exception
java.lang.Exception - An unrecoverable for the operation error occured
public void overrideProperties(PropertyElementBase[] properties)
throws java.lang.Exception
properties - teh proeprties to set
java.lang.Exception - An unrecoverable for the operatiuon error occured
public void overrideProperties(java.lang.String properties)
throws java.lang.Exception
properties - teh proeprties to set
java.lang.Exception - An unrecoverable for the operatiuon error occured
public void wrapFile(java.lang.String filename)
throws java.lang.Exception
filename - Teh filename to wrap
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String[] getProperties(java.lang.String type)
throws java.lang.Exception
type - The type of properties to retrieve
java.lang.Exception - An unrecoverable for the operation error occured
public boolean nextAvailable()
throws java.lang.Exception
true if it is, false otherwise
java.lang.Exception - An unrecoverable for the operation error occured
public boolean getNextPart(int waitMax)
throws java.lang.Exception
waitMax - T he amount of time to wait for the next part to become available. If this is negative,
a default amount of time defiened in RSConstants.sleepMax is used
true if there is a next part and it has become the current one, false if there is no next part
java.lang.Exception - An unrecoverable for the operation error occured or the timer expired
public boolean getFirstPart()
throws java.lang.Exception
true if the operation was successful,false otehrwise
java.lang.Exception - An unrecoverable for the operation error occured or the timer expired
public boolean getPreviousPart()
throws java.lang.Exception
true if the operation was successful,false otehrwise
java.lang.Exception - An unrecoverable for the operation error occured or the timer expired
public boolean removePreviousPart()
throws java.lang.Exception
true if the operation was successful,false otehrwise
java.lang.Exception - An unrecoverable for the operation error occured or the timer expired
public boolean isFirst()
throws java.lang.Exception
true if it is, false otherwise
java.lang.Exception - An unrecoverable for the operation error occured or the timer expired
public boolean isLast()
throws java.lang.Exception
true if it is, false otherwise
java.lang.Exception - An unrecoverable for the operation error occured or the timer expired
public int getNumberOfResults(java.lang.String type)
throws java.lang.Exception
ResultSet
type - The type of the RS part whose records should be conted
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String getCurrentContentPartPayload()
throws java.lang.Exception
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String getResult(int index)
throws java.lang.Exception
index - The index of the result to be retrieved
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String[] getResults()
throws java.lang.Exception
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String[] getResults(int from,
int to)
throws java.lang.Exception
from - the starting indexto - the ending index
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String getHostIP()
throws java.lang.Exception
ResultSet receides in
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String getHostName()
throws java.lang.Exception
ResultSet receides in
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String[] splitEncoded()
throws java.lang.Exception
RSConstants.partSize property and encdes
them using Base64 encoding
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String[] splitClear()
throws java.lang.Exception
RSConstants.partSize property
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String getFileContent(java.lang.String filename)
throws java.lang.Exception
filename - The file whose content must e retrieved
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String retrieveCustomProperties()
throws java.lang.Exception
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String cloneRS()
throws java.lang.Exception
ResultSet
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String keepTop(int count,
short type)
throws java.lang.Exception
ResultSet chain and creates a bew ResultSet
with the top kept. The new ResultSet has the same properties with the current one
count - The number of top elements to keeptype - The type of operation to perform. This can be one of KeepTopThreadGeneric.PERPART, KeepTopThreadGeneric.PERRECORD
ResultSet
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String keepTop(java.lang.String[] properties,
int count,
short type)
throws java.lang.Exception
ResultSet chain and creates a bew ResultSet
with the top kept
properties - The properties the new ResultSet must havecount - The number of top elements to keeptype - The type of operation to perform. This can be one of KeepTopThreadGeneric.PERPART, KeepTopThreadGeneric.PERRECORD
ResultSet
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String getCurrentContentPartName()
throws java.lang.Exception
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String executeQueryOnHead(java.lang.String xPath)
throws java.lang.Exception
xPath - The xPath to be evaluated
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String executeQueryOnDocument(java.lang.String xPath)
throws java.lang.Exception
xPath - The xPath to be evaluated
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String[] executeQueryOnResults(java.lang.String xPath)
throws java.lang.Exception
xPath - The xPath expression to be evaluated. it must start evaluation under the current node
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String filterRS(java.lang.String xPath)
throws java.lang.Exception
ResultSet returning
the name of the local file that holds the head part of the new ResultSet. The xPath is applied to each result
and should begin referencing the current node
xPath - The xpath to apply to the referenced ResultSet results to create the new one
ResultSet
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String filterRS(java.lang.String xPath,
java.lang.String[] properties)
throws java.lang.Exception
ResultSet returning
the name of the local file that holds the head part of the new ResultSet. The xPath is applied to each result
and should begin referencing the current node
xPath - The xpath to apply to the referenced ResultSet results to create the new oneproperties - The properties the new ResultSet should have
ResultSet
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String transformByXSLT(java.lang.String xslt)
throws java.lang.Exception
xslt - The xslt to apply
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String transformByXSLTAndPersist(java.lang.String xslt)
throws java.lang.Exception
xslt - The xslt to apply
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String transformByXSLTAndPersist(javax.xml.transform.Templates xslt)
throws java.lang.Exception
xslt - The xslt to apply
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String transformRS(java.lang.String transformation)
throws java.lang.Exception
ResultSet and creates
a new ResultSet with payload the output of each transformation. The new ResultSet
has as properties the properties of the current one
transformation - The tranformation to apply
ResultSet head part
java.lang.Exception - An unrecoverable for the operation error occured
public java.lang.String transformRS(java.lang.String transformation,
java.lang.String[] properties)
throws java.lang.Exception
ResultSet and creates
a new ResultSet with payload the output of each transformation. The new ResultSet
has as properties the properties of the current one
transformation - The tranformation to applyproperties - The properties the new ResultSet must have
ResultSet head part
java.lang.Exception - An unrecoverable for the operation error occured
public void disableAccessLeasing()
throws java.lang.Exception
java.lang.Exception - when access leasing cannot be disabled
public void extendAccessLeasing(int extend)
throws java.lang.Exception
extend - Extend for how much
java.lang.Exception - when extending failed
public int getAccessLeasing()
throws java.lang.Exception
java.lang.Exception - when retriving the access leasing failed
public boolean isForward()
throws java.lang.Exception
java.lang.Exception - when information retrival failed
public boolean setForward(boolean f)
throws java.lang.Exception
f - true if to set forward
java.lang.Exception - when seting forward failed
public java.util.Date getTimeLeasing()
throws java.lang.Exception
java.lang.Exception - when retriving the time leasing failed
public boolean extendTimeLeasing(java.util.Date extend)
throws java.lang.Exception
extend - Extend for how long
java.lang.Exception - when extending failed
public void disableTimeLeasing()
throws java.lang.Exception
java.lang.Exception - when time leasing cannot be disabledpublic org.gcube.common.searchservice.searchlibrary.resultset.security.Mnemonic getMnemonic()
public org.gcube.common.searchservice.searchlibrary.resultset.security.HeadMnemonic getHeadMnemonic()
public byte[] getEncKey()
throws java.lang.Exception
java.lang.Exception - An error occurred
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||