com.ibm.xdms.function
Interface DatastoreGet

All Superinterfaces:
Function

public interface DatastoreGet
extends Function

Datastore Implementation which uses DB2 Viper's pureXML Engine


Field Summary
 
Fields inherited from interface com.ibm.xdms.function.Function
COPYRIGHT
 
Method Summary
 java.lang.String buildNamespaceXQuery(com.ibm.xcap.DocumentSelector documentSelector, com.ibm.xcap.NodeSelector nodeSelector, java.lang.String table)
           
 java.lang.String buildNodeSelectorXQuery(com.ibm.xcap.DocumentSelector documentSelector, com.ibm.xcap.NodeSelector nodeSelector, com.ibm.xcap.NodeSelector.TerminalSelector terminalSelector, java.lang.String table)
           
 java.lang.String buildXPathXQuery(java.util.List<java.lang.String> documentSelectors, java.lang.String baseXPath, java.util.List<java.lang.String> additionalXPaths, java.util.Map<java.lang.String,java.lang.String> additionalNamespaces, java.lang.String returnXPath, java.lang.String table, ApplicationUsage appUsage)
           
 java.lang.String buildXPathXQuery(java.util.List<java.lang.String> documentSelectors, java.lang.String baseXPath, java.util.List<java.lang.String> additionalXPaths, java.lang.String table, ApplicationUsage appUsage)
           
 java.util.Map<java.lang.String,java.lang.String> get(java.util.List<java.lang.String> documentSelectors, java.lang.String baseXPath, java.util.List<java.lang.String> additionalXPaths, javax.sql.DataSource dataSource, java.lang.String table, ApplicationUsage appUsage)
          Retrieves a Map of xml fragments based on a list of document selectors and associated XPath statements
 java.util.Map<java.lang.String,java.lang.String> get(java.util.List<java.lang.String> documentSelectors, java.lang.String baseXPath, java.util.List<java.lang.String> additionalXPaths, java.util.Map<java.lang.String,java.lang.String> additionalNamespaces, java.lang.String returnXPath, javax.sql.DataSource dataSource, java.lang.String table, ApplicationUsage appUsage)
          Retrieves a Map of xml fragments based on a list of document selectors and associated XPath statements
 java.lang.String getDocumentNodeSelector(com.ibm.xcap.NodeSelector nodeSelector, com.ibm.xcap.DocumentSelector documentSelector, javax.sql.DataSource dataSource, java.lang.String table, java.sql.Connection con)
           
 java.lang.String getGlobalIndexNodeSelector(com.ibm.xcap.NodeSelector nodeSelector, com.ibm.xcap.DocumentSelector documentSelector, java.security.Principal principal, boolean isSuperAdminUser, boolean isAnonymousUser, javax.sql.DataSource dataSource, java.sql.Connection con, ApplicationUsage appUsage)
           
 java.util.Hashtable getGlobalIndexNodeSelector(com.ibm.xcap.NodeSelector nodeSelector, java.lang.String documentSelector, javax.sql.DataSource dataSource, java.sql.Connection con, ApplicationUsage appUsage)
           
 java.lang.String getGlobalIndexNodeSelector(com.ibm.xcap.NodeSelector nodeSelector, java.lang.String documentSelector, XcapServerRequest request, XcapServerResponse response, javax.sql.DataSource dataSource, java.sql.Connection con, ApplicationUsage appUsage)
           
 java.lang.String getNamespaces(java.lang.String documentSelector, com.ibm.xcap.NodeSelector nodeSelector, XcapServerRequest request, XcapServerResponse response, javax.sql.DataSource dataSource, java.lang.String table)
           
 java.lang.String getNodeSelector(java.lang.String documentSelector, com.ibm.xcap.NodeSelector nodeSelector, com.ibm.xcap.NodeSelector.TerminalSelector terminalSelector, XcapServerRequest request, XcapServerResponse response, javax.sql.DataSource dataSource, java.lang.String table, java.sql.Connection con)
           
 java.lang.String getWholeDocument(com.ibm.xcap.DocumentSelector documentSelector, javax.sql.DataSource dataSource, java.sql.Connection con)
          Gets whole document.
 java.lang.String getWholeDocument(java.lang.String documentSelector, XcapServerResponse response, javax.sql.DataSource dataSource, java.sql.Connection con)
          Gets whole document.
 java.lang.String getXmlDocumentsDirectory(java.lang.String auid, java.lang.String uri, javax.sql.DataSource dataSource, java.lang.String table, XcapCaps xcapCaps)
          Retreives the XML Documents Directory for the configured AUID
 java.lang.String getXmlDocumentsDirectory(java.lang.String auid, XcapServerRequest request, javax.sql.DataSource dataSource, java.lang.String table, XcapCaps xcapCaps)
          Retreives the XML Documents Directory for the configured AUID
 boolean init(ApplicationUsage appUsage)
          Initializes the function.
 
Methods inherited from interface com.ibm.xdms.function.Function
getApplicationUsage
 

Method Detail

init

boolean init(ApplicationUsage appUsage)
Description copied from interface: Function
Initializes the function.

Specified by:
init in interface Function
Parameters:
appUsage - The ApplicationUsage information.
Returns:
Returns true if the function successfully initialized.

getWholeDocument

java.lang.String getWholeDocument(com.ibm.xcap.DocumentSelector documentSelector,
                                  javax.sql.DataSource dataSource,
                                  java.sql.Connection con)
                                  throws XcapException
Gets whole document. If no document is found, sets response to 404, SC_NOT_FOUND. If document is found, sets reponse with document, ETag, lastModifiedDate, and reponse code of 200, SC_OK Not database specific!

Parameters:
documentSelector -
Returns:
Throws:
XcapException

getWholeDocument

java.lang.String getWholeDocument(java.lang.String documentSelector,
                                  XcapServerResponse response,
                                  javax.sql.DataSource dataSource,
                                  java.sql.Connection con)
                                  throws XcapException
Gets whole document. If no document is found, sets response to 404, SC_NOT_FOUND. If document is found, sets reponse with document, ETag, lastModifiedDate, and reponse code of 200, SC_OK Not database specific!

Parameters:
document -
eTag -
documentSelector -
response - XcapServerResponse, if it is not null, then this method will set the document, status code, and ETag
Throws:
XcapException

getGlobalIndexNodeSelector

java.lang.String getGlobalIndexNodeSelector(com.ibm.xcap.NodeSelector nodeSelector,
                                            java.lang.String documentSelector,
                                            XcapServerRequest request,
                                            XcapServerResponse response,
                                            javax.sql.DataSource dataSource,
                                            java.sql.Connection con,
                                            ApplicationUsage appUsage)
                                            throws LocalConstraintFailureException,
                                                   XcapException,
                                                   XdmsException,
                                                   java.net.MalformedURLException
Parameters:
nodeSelector -
documentSelector -
request -
response -
dataSource -
con -
appUsage -
Returns:
Throws:
LocalConstraintFailureException
XcapException
XdmsException
java.net.MalformedURLException

getGlobalIndexNodeSelector

java.lang.String getGlobalIndexNodeSelector(com.ibm.xcap.NodeSelector nodeSelector,
                                            com.ibm.xcap.DocumentSelector documentSelector,
                                            java.security.Principal principal,
                                            boolean isSuperAdminUser,
                                            boolean isAnonymousUser,
                                            javax.sql.DataSource dataSource,
                                            java.sql.Connection con,
                                            ApplicationUsage appUsage)
                                            throws LocalConstraintFailureException,
                                                   XcapException,
                                                   XdmsException,
                                                   java.net.MalformedURLException
Parameters:
nodeSelector -
documentSelector -
principal -
isSuperAdminUser -
isAnonymousUser -
dataSource -
con -
appUsage -
Returns:
Throws:
LocalConstraintFailureException
XcapException
XdmsException
java.net.MalformedURLException

getGlobalIndexNodeSelector

java.util.Hashtable getGlobalIndexNodeSelector(com.ibm.xcap.NodeSelector nodeSelector,
                                               java.lang.String documentSelector,
                                               javax.sql.DataSource dataSource,
                                               java.sql.Connection con,
                                               ApplicationUsage appUsage)
                                               throws LocalConstraintFailureException,
                                                      XcapException,
                                                      XdmsException,
                                                      java.net.MalformedURLException
Parameters:
nodeSelector -
documentSelector -
dataSource -
con -
appUsage -
Returns:
Throws:
LocalConstraintFailureException
XcapException
XdmsException
java.net.MalformedURLException

getDocumentNodeSelector

java.lang.String getDocumentNodeSelector(com.ibm.xcap.NodeSelector nodeSelector,
                                         com.ibm.xcap.DocumentSelector documentSelector,
                                         javax.sql.DataSource dataSource,
                                         java.lang.String table,
                                         java.sql.Connection con)
                                         throws XcapException
Parameters:
nodeSelector -
documentSelector -
dataSource -
table -
con -
Returns:
Throws:
XcapException

getXmlDocumentsDirectory

java.lang.String getXmlDocumentsDirectory(java.lang.String auid,
                                          XcapServerRequest request,
                                          javax.sql.DataSource dataSource,
                                          java.lang.String table,
                                          XcapCaps xcapCaps)
                                          throws XdmsException
Retreives the XML Documents Directory for the configured AUID

Parameters:
auid -
request - XcapServerRequest
dataSource -
table -
xcapCaps -
Throws:
XdmsException - Error retrieving the directory for the configured AUID

getXmlDocumentsDirectory

java.lang.String getXmlDocumentsDirectory(java.lang.String auid,
                                          java.lang.String uri,
                                          javax.sql.DataSource dataSource,
                                          java.lang.String table,
                                          XcapCaps xcapCaps)
                                          throws XdmsException,
                                                 java.net.MalformedURLException
Retreives the XML Documents Directory for the configured AUID

Parameters:
auid -
uri -
dataSource -
table -
xcapCaps -
Throws:
XdmsException - Error retrieving the directory for the configured AUID
Malformed - URLException
java.net.MalformedURLException

getNamespaces

java.lang.String getNamespaces(java.lang.String documentSelector,
                               com.ibm.xcap.NodeSelector nodeSelector,
                               XcapServerRequest request,
                               XcapServerResponse response,
                               javax.sql.DataSource dataSource,
                               java.lang.String table)
                               throws XcapException
Parameters:
documentSelector -
nodeSelector -
request -
response -
dataSource -
table -
Returns:
Throws:
XcapException

getNodeSelector

java.lang.String getNodeSelector(java.lang.String documentSelector,
                                 com.ibm.xcap.NodeSelector nodeSelector,
                                 com.ibm.xcap.NodeSelector.TerminalSelector terminalSelector,
                                 XcapServerRequest request,
                                 XcapServerResponse response,
                                 javax.sql.DataSource dataSource,
                                 java.lang.String table,
                                 java.sql.Connection con)
                                 throws XcapException
Parameters:
documentSelector -
nodeSelector -
terminalSelector -
request -
response -
dataSource -
table -
Returns:
Throws:
XcapException

get

java.util.Map<java.lang.String,java.lang.String> get(java.util.List<java.lang.String> documentSelectors,
                                                     java.lang.String baseXPath,
                                                     java.util.List<java.lang.String> additionalXPaths,
                                                     javax.sql.DataSource dataSource,
                                                     java.lang.String table,
                                                     ApplicationUsage appUsage)
                                                     throws XcapException
Retrieves a Map of xml fragments based on a list of document selectors and associated XPath statements

Parameters:
documentSelectors - Document Selectors to look for
baseXPath - Base XPath statement to use in the document
additionalXPaths - XPath statements which will be applied on top of the baseXPath statement
dataSource -
table -
appUsage -
Returns:
Map keyed by documentSelectors which contains list of found XML fragments
Throws:
XcapException - Error interacting with the database

get

java.util.Map<java.lang.String,java.lang.String> get(java.util.List<java.lang.String> documentSelectors,
                                                     java.lang.String baseXPath,
                                                     java.util.List<java.lang.String> additionalXPaths,
                                                     java.util.Map<java.lang.String,java.lang.String> additionalNamespaces,
                                                     java.lang.String returnXPath,
                                                     javax.sql.DataSource dataSource,
                                                     java.lang.String table,
                                                     ApplicationUsage appUsage)
                                                     throws XcapException
Retrieves a Map of xml fragments based on a list of document selectors and associated XPath statements

Parameters:
documentSelectors - Document Selectors to look for
baseXPath - Base XPath statement to use in the document
additionalXPaths - XPath statements which will be applied on top of the baseXPath statement
additionalNamespaces - Map of additional namespace URLs, keyed by their prefixes
returnXPath - return XPath, this is appended to the baseXPath statement
dataSource -
table -
appUsage -
Returns:
Map keyed by documentSelectors which contains list of found XML fragments
Throws:
XcapException - Error interacting with the database

buildNamespaceXQuery

java.lang.String buildNamespaceXQuery(com.ibm.xcap.DocumentSelector documentSelector,
                                      com.ibm.xcap.NodeSelector nodeSelector,
                                      java.lang.String table)
                                      throws XcapException
Parameters:
documentSelector -
nodeSelector -
table -
Returns:
Throws:
XcapException

buildNodeSelectorXQuery

java.lang.String buildNodeSelectorXQuery(com.ibm.xcap.DocumentSelector documentSelector,
                                         com.ibm.xcap.NodeSelector nodeSelector,
                                         com.ibm.xcap.NodeSelector.TerminalSelector terminalSelector,
                                         java.lang.String table)
Parameters:
documentSelector -
nodeSelector -
terminalSelector -
table -
Returns:

buildXPathXQuery

java.lang.String buildXPathXQuery(java.util.List<java.lang.String> documentSelectors,
                                  java.lang.String baseXPath,
                                  java.util.List<java.lang.String> additionalXPaths,
                                  java.lang.String table,
                                  ApplicationUsage appUsage)
Parameters:
documentSelectors -
baseXPath -
additionalXPaths -
table -
appUsage -
Returns:

buildXPathXQuery

java.lang.String buildXPathXQuery(java.util.List<java.lang.String> documentSelectors,
                                  java.lang.String baseXPath,
                                  java.util.List<java.lang.String> additionalXPaths,
                                  java.util.Map<java.lang.String,java.lang.String> additionalNamespaces,
                                  java.lang.String returnXPath,
                                  java.lang.String table,
                                  ApplicationUsage appUsage)
Parameters:
documentSelectors -
baseXPath -
additionalXPaths -
additionalNamespaces -
returnXPath -
table -
appUsage -
Returns: