on 04-11-2016 4:15 PM
All.
I need to implement the CMIS Query method in my ABAP Connector repository for SAP Mobile Documents.
Does anybody know if there are any utility classes to help in handling the query string from the client ?
It could be in the form:
SELECT cmis:document.cmis:baseTypeId,cmis:document.cmis:objectTypeId,cmis:document.cmis:secondaryObjectTypeIds,<OtherCmisFields> FROM cmis:document WHERE cmis:objectId IN ('DOCID')
Thanks.
Søren Hansen
Hi Soren,
You can call CMIS parser method to parse input statement IV_STATEMENT.
For example, you call parser cl_cmis_simple_query_parser=>parse to parse the input query.
DATA ls_simple_parse_result TYPE cl_cmis_simple_query_parser=>parse_result.
DATA lv_where TYPE cmis_string.
ls_simple_parse_result = cl_cmis_simple_query_parser=>parse( iv_statement ).
lv_where = ls_simple_parse_result-where_clause.
lv_orderby = ls_simple_parse_result-sort_order.
Then call Regular expression to parse the string lv_where.
CONSTANTS lc_regex TYPE string VALUE '\bLIKE\s+(.*)$'.
DATA ls_regex_result TYPE match_result.
FIND ALL OCCURRENCES OF REGEX lc_regex IN lv_where RESULTS lt_regex_result.
....
From lt_regex_list, you can parse to fetch proper string to be searched.
You can then call the CDESK_SRV_EXECUTE_SEARCH function module to search that string and prepare the results for CMIS objects.
Hope this answers your question.
Best Regards,
Vinod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.