| Constructor and Description |
|---|
RSXMLHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Document |
addCustomProperty(Document dom,
PropertyElementBase prop)
Adds the provided property to the respective placeholder in the provided DOM representation of the
head part
|
static void |
createHead(String filename,
String next,
String[] properties,
boolean dataFlow)
Creates an XML representation of a
ResultSet
head part and persists it to storage |
static void |
createHead(String filename,
String next,
String[] properties,
boolean dataFlow,
int access,
boolean forward,
Date date,
String pkey,
String encryptedkey,
String allprops)
Creates an XML representation of a
ResultSet
head part and persists it to storage |
static void |
createHead(String filename,
String next,
String properties,
boolean dataFlow)
Creates an XML representation of a
ResultSet
head part and persists it to storage |
static String |
executeQueryOnDocument(Document dom,
String xPath)
Evaluates the provided xPath and returns a serialization of the results
|
static boolean |
executeQueryOnResults(String result,
String xPath)
Perofmors the provided xPath expression on the serialized xml string provided.
|
static Vector<Integer> |
executeQueryOnResultsFile(String filename,
String xPath)
evaluates the provided xPath expression against the content of the provided file and returns
the indexes of the results that the evaluation returned results
|
static int |
getAccess(Document dom)
Returns whether or not the RS is populated with results access
|
static boolean |
getDataFlow(Document dom)
Returns whether or not the RS is populated with results on demand
|
static Document |
getDocument(String filename)
Retrieves the DOM object parsing the content of the provided file
|
static String |
getEncKey(Document dom)
Get the encryption key
|
static Date |
getExpireDate(Document dom)
Returns whether or not the RS is populated with results forward
|
static boolean |
getForward(Document dom)
Returns whether or not the RS is populated with results forward
|
static String |
getLink(Document dom,
String which)
Retrieves the previous or nect link the provided document has
|
static Vector<String> |
getProperties(Document dom,
String type)
Retrives the properties with the specified type from the DOM object representing a head part
|
static String |
getPublicKey(Document dom)
Get the public key
|
static void |
persistDocument(Document dom,
String filename)
Persists the provided DOM object in a file wholse filename is provided
|
static String |
retrieveCustomProperties(Document dom)
Retrives the serialized version of the CustomPropertied that are contained in the Head part DOM object
|
static Document |
setExpireDate(Document dom,
Date date)
Returns if the RS is populated with results forward
|
static Document |
setForward(Document dom,
boolean forward)
Set forward only access to this RS
|
static void |
transform(String xslt,
String source,
String target)
Performs a xslt transformation to the input file and dumpt the out put to a new file
|
static void |
transform(Templates xslt,
String source,
String target)
Performs a xslt transformation to the input file and dumpt the out put to a new file
|
static Document |
updateAccessCounter(Document dom,
int newaccess)
Adds the provided property to the respective place holder in the provided DOM representation of the
head part
|
static void |
updateProperties(String headName,
String serializedProps)
Overrides existing custom properties and updates them
|
static void |
updateProperties(String headName,
String[] properties)
Overrides existing custom properties and updates them
|
public static void createHead(String filename, String next, String[] properties, boolean dataFlow) throws Exception
ResultSet
head part and persists it to storagefilename - The name of the file that must be created to store the created head partnext - The name of the file that will hold the next header in the chainproperties - The properties the head should havedataFlow - Whether or not the RS supports on demand production or resultsException - An unrecoverable for the operation error occuredpublic static void createHead(String filename, String next, String[] properties, boolean dataFlow, int access, boolean forward, Date date, String pkey, String encryptedkey, String allprops) throws Exception
ResultSet
head part and persists it to storagefilename - The name of the file that must be created to store the created head partnext - The name of the file that will hold the next header in the chainproperties - The properties the head should havedataFlow - Whether or not the RS supports on demand production or resultsaccess - access leasingforward - is forward only property enabled?date - time leasingpkey - private keyencryptedkey - encrypted keyallprops - all properties in a stringException - An unrecoverable for the operation error occurredpublic static void createHead(String filename, String next, String properties, boolean dataFlow) throws Exception
ResultSet
head part and persists it to storagefilename - The name of the file that must be created to store the created head partnext - The name of the file that will hold the next header in the chainproperties - The serialized properties the head should havedataFlow - Whether or not the RS supports on demand production or resultsException - An unrecoverable for the operation error occuredpublic static void updateProperties(String headName, String[] properties) throws Exception
headName - the name of the head fileproperties - the propertiesException - An unrecoverable for the operation error occuredpublic static void updateProperties(String headName, String serializedProps) throws Exception
headName - the name of the head fileserializedProps - the serialized propertiesException - An unrecoverable for the operation error occuredpublic static void persistDocument(Document dom, String filename) throws Exception
dom - The DOM object to persistfilename - The filename to place the serialization inException - An unrecoverable for the operation error occuredpublic static Document getDocument(String filename) throws Exception
filename - The file name to parseException - An unrecoverable for the operation error occuredpublic static Document addCustomProperty(Document dom, PropertyElementBase prop) throws Exception
dom - The DOM object representing the head partprop - The property to addException - An unrecoverable for the operation error occuredpublic static Document updateAccessCounter(Document dom, int newaccess) throws Exception
dom - The DOM object representing the head partnewaccess - The property to addException - An unrecoverable for the operation error occurredpublic static Vector<String> getProperties(Document dom, String type) throws Exception
dom - The DOM object containing the Head contenttype - The type of properties to retrieveException - An unrecoverable for the operation error occuredpublic static String getLink(Document dom, String which) throws Exception
dom - The document to retrieve the document fromwhich - RSConstants.nextLink or RSConstants.previousLinkException - The link value could not be retrievedpublic static boolean getDataFlow(Document dom) throws Exception
dom - The document to retrieve the document fromtrue if the results are proiduced on demand,false otherwiseException - The link value could not be retrievedpublic static int getAccess(Document dom) throws Exception
dom - The document to retrieve the document fromint access windowException - The link value could not be retrievedpublic static String retrieveCustomProperties(Document dom) throws Exception
dom - The DOM object containing the head partException - An unrecoverable for the operation error occuredpublic static String executeQueryOnDocument(Document dom, String xPath) throws Exception
dom - The document to usexPath - The xPath to be evaluatedException - An unrecoverable for the operation error occuredpublic static boolean executeQueryOnResults(String result, String xPath) throws Exception
result - The xml serialization to evaluate the expression againstxPath - The expression to be avaluatedtrue if the evaluation returned result, false otherwiseException - An unrecoverable for the operation error occuredpublic static Vector<Integer> executeQueryOnResultsFile(String filename, String xPath) throws Exception
filename - The file whose results must be iterated overxPath - The xpath expressionException - An unrecoverable for the operation error occuredpublic static void transform(String xslt, String source, String target) throws Exception
xslt - The XSLT transformation to applysource - The source file to transformtarget - The target file to place the outputException - An unrecoverable for the operation error has occuredpublic static void transform(Templates xslt, String source, String target) throws Exception
xslt - The XSLT transformation to applysource - The source file to transformtarget - The target file to place the outputException - An unrecoverable for the operation error has occuredpublic static boolean getForward(Document dom) throws Exception
dom - The document to retrieve the document fromboolean boolean windowException - The value could not be retrievedpublic static Document setForward(Document dom, boolean forward) throws Exception
dom - the dom of the headerforward - the flag to set for forwardException - Something went wrongpublic static Date getExpireDate(Document dom) throws Exception
dom - The document to retrieve the document fromboolean boolean windowException - The value could not be retrievedpublic static Document setExpireDate(Document dom, Date date) throws Exception
dom - The document to retrieve the document fromdate - the expire dateException - The value could not be retrievedpublic static String getEncKey(Document dom) throws Exception
dom - The document to retrieve the document fromException - An error occurredCopyright © 2014. All Rights Reserved.