Digital Entity Explorer
General Purpose
This service is used for repository digital entity searching.
Unlike the digitalEntityCall that can be used for single entity retrieving for a given PID, this service returns a list of digital entities for a given query.
Input Parameters
Parameters | Description |
---|---|
General | A general document |
Query | An x_queries document |
Returns | A DigitalEntityResult document with extended information about the related entities |
XQuery Examples
<?xml version="1.0" encoding="UTF-8"?> <xb:x_queries xmlns:xb="http://com/exlibris/digitool/repository/api/xmlbeans"> <x_query type="xql" set_name="SET1"> <x_select from_answer="0" to_answer="19"> <element>all</element> </x_select> <x_where> <x_condition> <type>contains</type> <element>subject</element> <value>liberty</value> </x_condition> </x_where> <x_sort> <by>pid</by> <x_order>desc</x_order> </x_sort> </x_query> </xb:x_queries>
Explanation
from_answer | the position of the first answer to be returned, starting from zero |
to_answer | the position of the last answer to be returned |
x_select/element | defines the part of the digital entity to be returned. Valid values are: pid, control, all |
x_condition/element | the value for this element can be any field indexed in * the DE index as configured in repository_indexing_schema.xml (ui_default_text value) |
value | defines the search term, see examples below for Boolean operator usage |
type | default is contains”, for date queries use -before / after |
by | defines the sorting field, one of the control attributes (see table 5.2.2) |
x_order | defines the sort order. Valid values are desc, asc |
Usage Examples
- Contains X within label and not Y within label
<x_condition> <type>contains</type> <element>label</element> <value>X not Y</value> </x_condition>
- Contains X within label or contains Y within label
<x_condition> <type>contains</type> <element>label</element> <value>X or Y</value> </x_condition>
The above would return results for
<label>auxiliary</label>
Contains X within label and contains Y within label (same label section)
<x_condition> <type>contains</type> <element>label</element> <value>X and Y</value> </x_condition>
The above would return results for an individual label index match:
<label>auxiliary</label>
The above would not, however, return results across multiple label indexes – i.e., would not find the following:
<label>box</label> <label>yellow</label>
But this one would –
- Contains X within label and contains Y within label (any label section)
<x_condition> <type>contains</type> <element>label</element> <value>X Y</value> </x_condition>
- Contains X within label and contains Y within subject
<x_condition> <type>contains</type> <element>label</element> <value>X</value> </x_condition> <x_condition> <type>contains</type> <element>subject</element> <value>Y</value> </x_condition>
Example of x_result Document
<?xml version="1.0" encoding="UTF-8"?> <xb:x_results> xmlns:xb="> <x_result set_name="SET1", num_result="10" total_num_result="12154"> <digital_entity>...</digital_entity> <digital_entity>...</digital_entity> ... <digital_entity>...</digital_entity> </x_result> <error></error> <error_description><error_description> </xb:x_results>
Explanation
num_result | number of entities in this document |
Total_num_result | the total number of results for this query |
Digital_entity | a full or partial digital entity according to the “element” node that was defined in the x_queries document |
For an exact match, use <type>equal</type> instead of ‘contains’ (note there no ‘s’ in the ‘equal’).