Documentation
Search in DEPENDENCY
Searching the elements which have a dependency to a specific element :
<SEARCH>
<MEDIA>
<DEPENDENCY type="mediaContent">
<MEDIA ID="25"/>
</DEPENDENCY>
</MEDIA>
</SEARCH>
Nb: a dependency is not symetric (unless configured) : it's directed from the parent to the child. Thus this query will give you the parents of the Media with ID = 25.
If you want the children of the Media with ID=25, you will write it this way :
<SEARCH>
<MEDIA>
<DEPENDENCY type="mediaContent" mode="reverse">
<MEDIA ID="25"/>
</DEPENDENCY>
</MEDIA>
</SEARCH>
Searching the elements which have a dependency mediaContent or mediaNavigation to a Media which Mediatype is "Menu" :
<SEARCH>
<MEDIA>
<DEPENDENCY type="mediaContent,mediaNavigation">
<MEDIA>
<INFO>
<MEDIATYPE>Menu</MEDIATYPE>
</INFO>
</MEDIA>
</DEPENDENCY>
</MEDIA>
</SEARCH>
You can also write it :
<SEARCH>
<MEDIA>
<DEPENDENCY type="mediaContent">
<MEDIA mediatype="Menu"/>
</DEPENDENCY>
</MEDIA>
</SEARCH>
Searching the elements which have a dependency of a specific type
we don't want to express any criterions on the element linked, we simply want to know the contacts that do have a dependency of type contactWork.
<SEARCH>
<CONTACT>
<DEPENDENCY type="contactWork" operator="exist"/>
</CONTACT>
</SEARCH>
If you want the elements that do not have such a dependency, you will use the operator "none" in the same manner.
<SEARCH>
<CONTACT>
<DEPENDENCY type="contactWork" operator="none"/>
</CONTACT>
</SEARCH>
Searching for imbricated dependencies
We want the grandfather of an element :
<SEARCH>
<MEDIA>
<DEPENDENCY type="mediaContent">
<MEDIA>
<DEPENDENCY type="mediaContent">
<MEDIA ID="25"/>
</DEPENDENCY>
</MEDIA>
</DEPENDENCY>
</MEDIA>
</SEARCH>
Searching for elements with a specific number of dependencies
We want a menu with exactly 3 submenus
<SEARCH>
<MEDIA mediatype="Menu">
<DEPENDENCY type="mediaContent">
<MEDIA>
<HITS>3</HITS>
</MEDIA>
</DEPENDENCY>
</MEDIA>
</SEARCH>
We want a menu with at least 3 submenus
<SEARCH>
<MEDIA mediatype="Menu">
<DEPENDENCY type="mediaContent">
<MEDIA>
<HITS operator="GT=">3</HITS>
</MEDIA>
</DEPENDENCY>
</MEDIA>
</SEARCH>
Searching for dependency with additional information
Additional informations can be saved on a dependency to characterize it (Rate, Status, etc). See the NQL UPDATE command.
<SEARCH>
<MEDIA mediatype="Menu">
<DEPENDENCY type="mediaContent">
<MEDIA>
<DEPINFO operator="=">3</DEPINFO>
<COMMENT operator="=">pending</COMMENT>
</MEDIA>
</DEPENDENCY>
</MEDIA>
</SEARCH>