public class ResultSet extends Object
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 and Description |
|---|
ResultSet(CreationParams params)
Creates a new
ResultSet |
ResultSet(String filename)
Creates a new
ResultSet |
ResultSet(String[] properties,
boolean dataFlow)
Creates a new
ResultSet |
ResultSet(String properties,
boolean dataFlow)
Creates a new
ResultSet |
ResultSet(String filename,
int noDecrypt)
Creates a new
ResultSet |
ResultSet(String filename,
PrivateKey privkey)
Creates a new
ResultSet |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addResults(String[] results)
Adds teh provided results to the underlying buffer
|
boolean |
addText(String[] results)
Adds teh provided text records in the underlying buffer
|
void |
addWSEPR(String epr)
Adds a WS-EPR serialization to the head properties container
|
void |
clear()
Clears underlying structures
|
String |
cloneRS()
Clones the implied
ResultSet |
void |
disableAccessLeasing() |
void |
disableTimeLeasing() |
void |
endAuthoring()
Stops the authoring of the current part and makes it available
|
String |
executeQueryOnDocument(String xPath)
Evaluates the provided xPath expression against the head part document and returns the output
as a serialized string.
|
String |
executeQueryOnHead(String xPath)
Evaluates the provided xPath expression against the head part document and returns the output
as a serialized string.
|
String[] |
executeQueryOnResults(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(Date extend)
Extend the time leasing
|
String |
filterRS(String xPath)
|
String |
filterRS(String xPath,
String[] properties)
|
int |
getAccessLeasing()
Get the access leasing
|
String |
getCurrentContentPartName()
Retrieves the name of the current payload part
|
String |
getCurrentContentPartPayload()
Retrieves the payload of the current content part
|
byte[] |
getEncKey()
Get the encryption key
|
String |
getFileContent(String filename)
Retrieves the content of the provided local file
|
boolean |
getFirstPart()
Sets the current part to be the first payload part
|
HeadMnemonic |
getHeadMnemonic()
Get security properties
|
String |
getHeadName()
Retrieves the name of the head part containing file
|
String |
getHostIP()
Retrieves the IP address of the host that the
ResultSet receides in |
String |
getHostName()
Retrieves the name of the host that the
ResultSet receides in |
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(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
|
String[] |
getProperties(String type)
Retrieves the properties of the provided type
|
String |
getResult(int index)
Retrieves the result that has the specified index in the current payload part
|
String[] |
getResults()
Retrieves all the results that are in the current payload part
|
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 |
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
|
String |
keepTop(int count,
short type)
|
String |
keepTop(String[] properties,
int count,
short type)
|
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(String properties)
removes any existing properties and sets the new ones
|
boolean |
removePreviousPart()
Sets the current part to be the previous part
|
String |
retrieveCustomProperties()
Retrieves a serialization of the head custom properties
|
boolean |
setForward(boolean f)
Set an RS to be forward
|
String[] |
splitClear()
Splits the current payload part in sized defined by the
RSConstants.partSize property |
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
|
String |
transformByXSLT(String xslt)
Performs an xslt transformation against the current payload part
|
String |
transformByXSLTAndPersist(String xslt)
Performs an xslt transformation against the current payload part
|
String |
transformByXSLTAndPersist(Templates xslt)
Performs an xslt transformation against the current payload part
|
String |
transformRS(String transformation)
|
String |
transformRS(String transformation,
String[] properties)
|
void |
wrapFile(String filename)
Wraps the provided file content
|
public ResultSet(CreationParams params) throws Exception
ResultSetparams - RS creation paramsException - An unrecoverable for the operation error occuredpublic ResultSet(String[] properties, boolean dataFlow) throws Exception
ResultSetpublic ResultSet(String properties, boolean dataFlow) throws Exception
ResultSetpublic ResultSet(String filename, PrivateKey privkey) throws Exception
ResultSetpublic void addWSEPR(String epr) throws Exception
epr - The WS-EPR to addException - An unrecoverable for the operation error occuredpublic String getHeadName() throws Exception
Exception - An unrecoverable for the operation error occuredpublic void clear()
throws Exception
Exception - An unrecoverable for the operation error occuredpublic ResultSetRef getRSRef()
ResultSet infopublic boolean addResults(String[] results) throws Exception
results - to addtrue if all the results were successfully added, false otherwiseException - An unrecoverable for the operation error occuredpublic boolean addText(String[] results) throws Exception
results - The records to addtrue if all the records were successfully written, false otherwiseException - An unrecoverable for the operation error occuredpublic RSConstants.CONTROLFLOW more(long time) throws Exception
ResultSet is no longer
used, or the timeout the user specified has been reachedtime - The timeout for the answerException - An unrecoverabvle for the operation error has occuredpublic void startNewPart()
throws Exception
Exception - An unrecoverable for the operation error occuredpublic void endAuthoring()
throws Exception
Exception - An unrecoverable for the operation error occuredpublic void overrideProperties(PropertyElementBase[] properties) throws Exception
properties - teh proeprties to setException - An unrecoverable for the operatiuon error occuredpublic void overrideProperties(String properties) throws Exception
properties - teh proeprties to setException - An unrecoverable for the operatiuon error occuredpublic void wrapFile(String filename) throws Exception
filename - Teh filename to wrapException - An unrecoverable for the operation error occuredpublic String[] getProperties(String type) throws Exception
type - The type of properties to retrieveException - An unrecoverable for the operation error occuredpublic boolean nextAvailable()
throws Exception
true if it is, false otherwiseException - An unrecoverable for the operation error occuredpublic boolean getNextPart(int waitMax)
throws 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 usedtrue if there is a next part and it has become the current one, false if there is no next partException - An unrecoverable for the operation error occured or the timer expiredpublic boolean getFirstPart()
throws Exception
true if the operation was successful,false otehrwiseException - An unrecoverable for the operation error occured or the timer expiredpublic boolean getPreviousPart()
throws Exception
true if the operation was successful,false otehrwiseException - An unrecoverable for the operation error occured or the timer expiredpublic boolean removePreviousPart()
throws Exception
true if the operation was successful,false otehrwiseException - An unrecoverable for the operation error occured or the timer expiredpublic boolean isFirst()
throws Exception
true if it is, false otherwiseException - An unrecoverable for the operation error occured or the timer expiredpublic boolean isLast()
throws Exception
true if it is, false otherwiseException - An unrecoverable for the operation error occured or the timer expiredpublic int getNumberOfResults(String type) throws Exception
ResultSettype - The type of the RS part whose records should be contedException - An unrecoverable for the operation error occuredpublic String getCurrentContentPartPayload() throws Exception
Exception - An unrecoverable for the operation error occuredpublic String getResult(int index) throws Exception
index - The index of the result to be retrievedException - An unrecoverable for the operation error occuredpublic String[] getResults() throws Exception
Exception - An unrecoverable for the operation error occuredpublic String[] getResults(int from, int to) throws Exception
from - the starting indexto - the ending indexException - An unrecoverable for the operation error occuredpublic String getHostIP() throws Exception
ResultSet receides inException - An unrecoverable for the operation error occuredpublic String getHostName() throws Exception
ResultSet receides inException - An unrecoverable for the operation error occuredpublic String[] splitEncoded() throws Exception
RSConstants.partSize property and encdes
them using Base64 encodingException - An unrecoverable for the operation error occuredpublic String[] splitClear() throws Exception
RSConstants.partSize propertyException - An unrecoverable for the operation error occuredpublic String getFileContent(String filename) throws Exception
filename - The file whose content must e retrievedException - An unrecoverable for the operation error occuredpublic String retrieveCustomProperties() throws Exception
Exception - An unrecoverable for the operation error occuredpublic String cloneRS() throws Exception
ResultSetException - An unrecoverable for the operation error occuredpublic String keepTop(int count, short type) throws Exception
ResultSet chain and creates a bew ResultSet
with the top kept. The new ResultSet has the same properties with the current onecount - The number of top elements to keeptype - The type of operation to perform. This can be one of KeepTopThreadGeneric.PERPART, KeepTopThreadGeneric.PERRECORDResultSetException - An unrecoverable for the operation error occuredpublic String keepTop(String[] properties, int count, short type) throws Exception
ResultSet chain and creates a bew ResultSet
with the top keptproperties - 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.PERRECORDResultSetException - An unrecoverable for the operation error occuredpublic String getCurrentContentPartName() throws Exception
Exception - An unrecoverable for the operation error occuredpublic String executeQueryOnHead(String xPath) throws Exception
xPath - The xPath to be evaluatedException - An unrecoverable for the operation error occuredpublic String executeQueryOnDocument(String xPath) throws Exception
xPath - The xPath to be evaluatedException - An unrecoverable for the operation error occuredpublic String[] executeQueryOnResults(String xPath) throws Exception
xPath - The xPath expression to be evaluated. it must start evaluation under the current nodeException - An unrecoverable for the operation error occuredpublic String filterRS(String xPath, String[] properties) throws 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 nodexPath - The xpath to apply to the referenced ResultSet results to create the new oneproperties - The properties the new ResultSet should haveResultSetException - An unrecoverable for the operation error occuredpublic String transformByXSLT(String xslt) throws Exception
xslt - The xslt to applyException - An unrecoverable for the operation error occuredpublic String transformByXSLTAndPersist(String xslt) throws Exception
xslt - The xslt to applyException - An unrecoverable for the operation error occuredpublic String transformByXSLTAndPersist(Templates xslt) throws Exception
xslt - The xslt to applyException - An unrecoverable for the operation error occuredpublic void disableAccessLeasing()
throws Exception
Exception - when access leasing cannot be disabledpublic void extendAccessLeasing(int extend)
throws Exception
extend - Extend for how muchException - when extending failedpublic int getAccessLeasing()
throws Exception
Exception - when retriving the access leasing failedpublic boolean isForward()
throws Exception
Exception - when information retrival failedpublic boolean setForward(boolean f)
throws Exception
f - true if to set forwardException - when seting forward failedpublic Date getTimeLeasing() throws Exception
Exception - when retriving the time leasing failedpublic boolean extendTimeLeasing(Date extend) throws Exception
extend - Extend for how longException - when extending failedpublic void disableTimeLeasing()
throws Exception
Exception - when time leasing cannot be disabledpublic Mnemonic getMnemonic()
public HeadMnemonic getHeadMnemonic()
Copyright © 2020. All Rights Reserved.