diff --git a/src/application.wadl b/src/application.wadl index f3545eba4bd9d48c1814307e0c1d0a05ee798bb7..004c2a6de56ab614e87dda2ab8f8c76b589f4e73 100644 --- a/src/application.wadl +++ b/src/application.wadl @@ -162,11 +162,19 @@ * By default, only a few basic details about each group are returned, * but the optional <code>fetch</code> parameter may be used to fetch * additional attributes or references. + * <p> + * NOTE: If the query string starts with the prefix {@code "group:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> parameter, but it will respect the value of + * <code>includeCancelled</code>. In addition, an LQL query will ignore + * the <code>orderBy</code> parameter, since LQL queries always return + * results in ID order. * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled groups to * be included. Defaults to {@code false}. * @param offset [optional] The number of results to skip at the start @@ -174,8 +182,9 @@ * @param limit [optional] The maximum number of results to return. * Defaults to 100. * @param orderBy [optional] The order in which to list the results. - * This may be {@code "groupid"}, {@code "name"} (the default) or - * {@code "title"}. + * This may be {@code "groupid"}, {@code "name"} (the default for non-LQL + * queries) or {@code "title"}. This is ignored for LQL queries, which + * always return results in groupid order. * @param fetch [optional] A comma-separated list of any additional * attributes or references to fetch. * @@ -204,11 +213,17 @@ /** * Count the number of groups that would be returned by a search using * a free text query string. + * <p> + * NOTE: If the query string starts with the prefix {@code "group:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> parameter, but it will respect the value of + * <code>includeCancelled</code>. * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled groups to * be included. Defaults to {@code false}. * @@ -580,22 +595,33 @@ * By default, only a few basic details about each institution are * returned, but the optional <code>fetch</code> parameter may be used * to fetch additional attributes or references. + * <p> + * NOTE: If the query string starts with the prefix {@code "inst:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> and <code>attributes</code> parameters, but + * it will respect the value of <code>includeCancelled</code>. In + * addition, an LQL query will ignore the <code>orderBy</code> parameter, + * since LQL queries always return results in ID order. * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled institutions * to be included. Defaults to {@code false}. * @param attributes [optional] A comma-separated list of attributes to * consider when searching. If this is {@code null} (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * @param offset [optional] The number of results to skip at the start * of the search. Defaults to 0. * @param limit [optional] The maximum number of results to return. * Defaults to 100. * @param orderBy [optional] The order in which to list the results. - * This may be either {@code "instid"} or {@code "name"} (the default). + * This may be either {@code "instid"} or {@code "name"} (the default for + * non-LQL queries). This is ignored for LQL queries, which always return + * results in instid order. * @param fetch [optional] A comma-separated list of any additional * attributes or references to fetch. * @@ -625,16 +651,23 @@ /** * Count the number of institutions that would be returned by a search * using a free text query string. + * <p> + * NOTE: If the query string starts with the prefix {@code "inst:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> and <code>attributes</code> parameters, but + * it will respect the value of <code>includeCancelled</code>. * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled institutions * to be included. Defaults to {@code false}. * @param attributes [optional] A comma-separated list of attributes to * consider when searching. If this is {@code null} (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * * @return The number of matching institutions. */</doc> @@ -1167,11 +1200,20 @@ * By default, only a few basic details about each person are returned, * but the optional <code>fetch</code> parameter may be used to fetch * additional attributes or references. + * <p> + * NOTE: If the query string starts with the prefix {@code "person:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> and <code>attributes</code> parameters, but + * it will respect the values of <code>includeCancelled</code> and + * <code>misStatus</code>. In addition, an LQL query will ignore the + * <code>orderBy</code> parameter, since LQL queries always return + * results in ID order. * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled people to * be included (people who are no longer members of the University). * Defaults to {@code false}. @@ -1189,14 +1231,16 @@ * mutually exclusive. * @param attributes [optional] A comma-separated list of attributes to * consider when searching. If this is {@code null} (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * @param offset [optional] The number of results to skip at the start * of the search. Defaults to 0. * @param limit [optional] The maximum number of results to return. * Defaults to 100. * @param orderBy [optional] The order in which to list the results. * This may be either {@code "identifier"} or {@code "surname"} (the - * default). + * default for non-LQL queries). This is ignored for LQL queries, which + * always return results in identifier order. * @param fetch [optional] A comma-separated list of any additional * attributes or references to fetch. * @@ -1227,11 +1271,18 @@ /** * Count the number of people that would be returned by a search using * a free text query string. + * <p> + * NOTE: If the query string starts with the prefix {@code "person:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> and <code>attributes</code> parameters, but + * it will respect the values of <code>includeCancelled</code> and + * <code>misStatus</code>. * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled people to * be included (people who are no longer members of the University). * Defaults to {@code false}. @@ -1249,7 +1300,8 @@ * mutually exclusive. * @param attributes [optional] A comma-separated list of attributes to * consider when searching. If this is {@code null} (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * * @return The number of matching people. */</doc> diff --git a/src/generate-client-methods.py b/src/generate-client-methods.py index 9f6b5117d239ba010d3642bea0cd47f6ad1bdae9..cf6df94edd412dce7e256a13790ab433a1aa08a4 100755 --- a/src/generate-client-methods.py +++ b/src/generate-client-methods.py @@ -714,8 +714,11 @@ def javadocs_to_pydocs(docs, cls, line_prefix="", method=None): # Replace <li> with plain text "*" bullet points (reST format) docs = list_items_to_text(docs) - # Remove any other HTML tags - docs = re.sub("<[^>]+>", "", docs) + # Remove any other HTML tags, except for <a> tags (links) + docs = re.sub("<(?!a|/a)[^>]+>", "", docs) + + # Replace <a href="url">text</a> links with `text <url>`_ reST links + docs = re.sub("(?s)<a href=\"([^\"]*)\"[^>]*>([^<]*)</a>", "`\\2 <\\1>`_", docs) # == End of HTML tag processing == @@ -1032,8 +1035,8 @@ def javadocs_to_phpdocs(docs, line_prefix=""): # Replace <li> with plain text "*" bullet points (reST format) docs = list_items_to_text(docs) - # Remove any other HTML tags, except for <code> and <pre> blocks - docs = re.sub("<(?!code|/code|pre|/pre)[^>]+>", "", docs) + # Remove any other HTML tags, except for <a>, <code> and <pre> blocks + docs = re.sub("<(?!a|/a|code|/code|pre|/pre)[^>]+>", "", docs) # == End of HTML tag processing == diff --git a/src/java/uk/ac/cam/ucs/ibis/methods/GroupMethods.java b/src/java/uk/ac/cam/ucs/ibis/methods/GroupMethods.java index df0d2beb6634ad3a845237f25de0eb3798a6cbb7..726e282613ab4491359b561e1b87f7c76089f406 100644 --- a/src/java/uk/ac/cam/ucs/ibis/methods/GroupMethods.java +++ b/src/java/uk/ac/cam/ucs/ibis/methods/GroupMethods.java @@ -186,12 +186,20 @@ public class GroupMethods * but the optional <code>fetch</code> parameter may be used to fetch * additional attributes or references. * <p> + * NOTE: If the query string starts with the prefix {@code "group:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> parameter, but it will respect the value of + * <code>includeCancelled</code>. In addition, an LQL query will ignore + * the <code>orderBy</code> parameter, since LQL queries always return + * results in ID order. + * <p> * <code style="background-color: #eec;">[ HTTP: GET /api/v1/group/search?query=... ]</code> * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled groups to * be included. Defaults to {@code false}. * @param offset [optional] The number of results to skip at the start @@ -199,8 +207,9 @@ public class GroupMethods * @param limit [optional] The maximum number of results to return. * Defaults to 100. * @param orderBy [optional] The order in which to list the results. - * This may be {@code "groupid"}, {@code "name"} (the default) or - * {@code "title"}. + * This may be {@code "groupid"}, {@code "name"} (the default for non-LQL + * queries) or {@code "title"}. This is ignored for LQL queries, which + * always return results in groupid order. * @param fetch [optional] A comma-separated list of any additional * attributes or references to fetch. * @@ -238,12 +247,18 @@ public class GroupMethods * Count the number of groups that would be returned by a search using * a free text query string. * <p> + * NOTE: If the query string starts with the prefix {@code "group:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> parameter, but it will respect the value of + * <code>includeCancelled</code>. + * <p> * <code style="background-color: #eec;">[ HTTP: GET /api/v1/group/search-count?query=... ]</code> * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled groups to * be included. Defaults to {@code false}. * diff --git a/src/java/uk/ac/cam/ucs/ibis/methods/InstitutionMethods.java b/src/java/uk/ac/cam/ucs/ibis/methods/InstitutionMethods.java index 6849380cb560337fa1349b5d7a7978f105de638e..1657ddf34d7003c8bccc69d870cef97eaee49aad 100644 --- a/src/java/uk/ac/cam/ucs/ibis/methods/InstitutionMethods.java +++ b/src/java/uk/ac/cam/ucs/ibis/methods/InstitutionMethods.java @@ -216,23 +216,34 @@ public class InstitutionMethods * returned, but the optional <code>fetch</code> parameter may be used * to fetch additional attributes or references. * <p> + * NOTE: If the query string starts with the prefix {@code "inst:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> and <code>attributes</code> parameters, but + * it will respect the value of <code>includeCancelled</code>. In + * addition, an LQL query will ignore the <code>orderBy</code> parameter, + * since LQL queries always return results in ID order. + * <p> * <code style="background-color: #eec;">[ HTTP: GET /api/v1/inst/search?query=... ]</code> * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled institutions * to be included. Defaults to {@code false}. * @param attributes [optional] A comma-separated list of attributes to * consider when searching. If this is {@code null} (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * @param offset [optional] The number of results to skip at the start * of the search. Defaults to 0. * @param limit [optional] The maximum number of results to return. * Defaults to 100. * @param orderBy [optional] The order in which to list the results. - * This may be either {@code "instid"} or {@code "name"} (the default). + * This may be either {@code "instid"} or {@code "name"} (the default for + * non-LQL queries). This is ignored for LQL queries, which always return + * results in instid order. * @param fetch [optional] A comma-separated list of any additional * attributes or references to fetch. * @@ -272,17 +283,24 @@ public class InstitutionMethods * Count the number of institutions that would be returned by a search * using a free text query string. * <p> + * NOTE: If the query string starts with the prefix {@code "inst:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> and <code>attributes</code> parameters, but + * it will respect the value of <code>includeCancelled</code>. + * <p> * <code style="background-color: #eec;">[ HTTP: GET /api/v1/inst/search-count?query=... ]</code> * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled institutions * to be included. Defaults to {@code false}. * @param attributes [optional] A comma-separated list of attributes to * consider when searching. If this is {@code null} (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * * @return The number of matching institutions. */ diff --git a/src/java/uk/ac/cam/ucs/ibis/methods/PersonMethods.java b/src/java/uk/ac/cam/ucs/ibis/methods/PersonMethods.java index 4b18c787a99dd0500a2d9538d31fae20e8c05e02..84144492db94bbdcb2eefe42977baaf19f1b012e 100644 --- a/src/java/uk/ac/cam/ucs/ibis/methods/PersonMethods.java +++ b/src/java/uk/ac/cam/ucs/ibis/methods/PersonMethods.java @@ -281,12 +281,21 @@ public class PersonMethods * but the optional <code>fetch</code> parameter may be used to fetch * additional attributes or references. * <p> + * NOTE: If the query string starts with the prefix {@code "person:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> and <code>attributes</code> parameters, but + * it will respect the values of <code>includeCancelled</code> and + * <code>misStatus</code>. In addition, an LQL query will ignore the + * <code>orderBy</code> parameter, since LQL queries always return + * results in ID order. + * <p> * <code style="background-color: #eec;">[ HTTP: GET /api/v1/person/search?query=... ]</code> * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled people to * be included (people who are no longer members of the University). * Defaults to {@code false}. @@ -304,14 +313,16 @@ public class PersonMethods * mutually exclusive. * @param attributes [optional] A comma-separated list of attributes to * consider when searching. If this is {@code null} (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * @param offset [optional] The number of results to skip at the start * of the search. Defaults to 0. * @param limit [optional] The maximum number of results to return. * Defaults to 100. * @param orderBy [optional] The order in which to list the results. * This may be either {@code "identifier"} or {@code "surname"} (the - * default). + * default for non-LQL queries). This is ignored for LQL queries, which + * always return results in identifier order. * @param fetch [optional] A comma-separated list of any additional * attributes or references to fetch. * @@ -353,12 +364,19 @@ public class PersonMethods * Count the number of people that would be returned by a search using * a free text query string. * <p> + * NOTE: If the query string starts with the prefix {@code "person:"}, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * <code>approxMatches</code> and <code>attributes</code> parameters, but + * it will respect the values of <code>includeCancelled</code> and + * <code>misStatus</code>. + * <p> * <code style="background-color: #eec;">[ HTTP: GET /api/v1/person/search-count?query=... ]</code> * * @param query [required] The search string. * @param approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to {@code false}. + * to {@code false}. This is ignored for LQL queries. * @param includeCancelled [optional] Flag to allow cancelled people to * be included (people who are no longer members of the University). * Defaults to {@code false}. @@ -376,7 +394,8 @@ public class PersonMethods * mutually exclusive. * @param attributes [optional] A comma-separated list of attributes to * consider when searching. If this is {@code null} (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * * @return The number of matching people. */ diff --git a/src/php/ibisclient/methods/GroupMethods.php b/src/php/ibisclient/methods/GroupMethods.php index 68e69560c0a38fb2f5ca33097f401e53d5efa8b0..5e5b3396f6077db371d9dee7ecdd15e1b19b831e 100644 --- a/src/php/ibisclient/methods/GroupMethods.php +++ b/src/php/ibisclient/methods/GroupMethods.php @@ -186,12 +186,20 @@ class GroupMethods * but the optional ``fetch`` parameter may be used to fetch * additional attributes or references. * + * NOTE: If the query string starts with the prefix ``"group:"``, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * ``approxMatches`` parameter, but it will respect the value of + * ``includeCancelled``. In addition, an LQL query will ignore + * the ``orderBy`` parameter, since LQL queries always return + * results in ID order. + * * ``[ HTTP: GET /api/v1/group/search?query=... ]`` * * @param string $query [required] The search string. * @param boolean $approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to ``false``. + * to ``false``. This is ignored for LQL queries. * @param boolean $includeCancelled [optional] Flag to allow cancelled groups to * be included. Defaults to ``false``. * @param int $offset [optional] The number of results to skip at the start @@ -199,8 +207,9 @@ class GroupMethods * @param int $limit [optional] The maximum number of results to return. * Defaults to 100. * @param string $orderBy [optional] The order in which to list the results. - * This may be ``"groupid"``, ``"name"`` (the default) or - * ``"title"``. + * This may be ``"groupid"``, ``"name"`` (the default for non-LQL + * queries) or ``"title"``. This is ignored for LQL queries, which + * always return results in groupid order. * @param string $fetch [optional] A comma-separated list of any additional * attributes or references to fetch. * @@ -237,12 +246,18 @@ class GroupMethods * Count the number of groups that would be returned by a search using * a free text query string. * + * NOTE: If the query string starts with the prefix ``"group:"``, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * ``approxMatches`` parameter, but it will respect the value of + * ``includeCancelled``. + * * ``[ HTTP: GET /api/v1/group/search-count?query=... ]`` * * @param string $query [required] The search string. * @param boolean $approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to ``false``. + * to ``false``. This is ignored for LQL queries. * @param boolean $includeCancelled [optional] Flag to allow cancelled groups to * be included. Defaults to ``false``. * diff --git a/src/php/ibisclient/methods/InstitutionMethods.php b/src/php/ibisclient/methods/InstitutionMethods.php index 5f3dce0cebae441c1c88cb502d2ab011e220fde2..f5122a7875937592d764231398390eee085c87f8 100644 --- a/src/php/ibisclient/methods/InstitutionMethods.php +++ b/src/php/ibisclient/methods/InstitutionMethods.php @@ -211,23 +211,34 @@ class InstitutionMethods * returned, but the optional ``fetch`` parameter may be used * to fetch additional attributes or references. * + * NOTE: If the query string starts with the prefix ``"inst:"``, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * ``approxMatches`` and ``attributes`` parameters, but + * it will respect the value of ``includeCancelled``. In + * addition, an LQL query will ignore the ``orderBy`` parameter, + * since LQL queries always return results in ID order. + * * ``[ HTTP: GET /api/v1/inst/search?query=... ]`` * * @param string $query [required] The search string. * @param boolean $approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to ``false``. + * to ``false``. This is ignored for LQL queries. * @param boolean $includeCancelled [optional] Flag to allow cancelled institutions * to be included. Defaults to ``false``. * @param string $attributes [optional] A comma-separated list of attributes to * consider when searching. If this is ``null`` (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * @param int $offset [optional] The number of results to skip at the start * of the search. Defaults to 0. * @param int $limit [optional] The maximum number of results to return. * Defaults to 100. * @param string $orderBy [optional] The order in which to list the results. - * This may be either ``"instid"`` or ``"name"`` (the default). + * This may be either ``"instid"`` or ``"name"`` (the default for + * non-LQL queries). This is ignored for LQL queries, which always return + * results in instid order. * @param string $fetch [optional] A comma-separated list of any additional * attributes or references to fetch. * @@ -266,17 +277,24 @@ class InstitutionMethods * Count the number of institutions that would be returned by a search * using a free text query string. * + * NOTE: If the query string starts with the prefix ``"inst:"``, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * ``approxMatches`` and ``attributes`` parameters, but + * it will respect the value of ``includeCancelled``. + * * ``[ HTTP: GET /api/v1/inst/search-count?query=... ]`` * * @param string $query [required] The search string. * @param boolean $approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to ``false``. + * to ``false``. This is ignored for LQL queries. * @param boolean $includeCancelled [optional] Flag to allow cancelled institutions * to be included. Defaults to ``false``. * @param string $attributes [optional] A comma-separated list of attributes to * consider when searching. If this is ``null`` (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * * @return int The number of matching institutions. */ diff --git a/src/php/ibisclient/methods/PersonMethods.php b/src/php/ibisclient/methods/PersonMethods.php index d8fbe786e8273824708b08340ba1acb885eeffa0..8f95428dcf9024557d17568e762c4ce3b6a4a2f9 100644 --- a/src/php/ibisclient/methods/PersonMethods.php +++ b/src/php/ibisclient/methods/PersonMethods.php @@ -259,12 +259,21 @@ class PersonMethods * but the optional ``fetch`` parameter may be used to fetch * additional attributes or references. * + * NOTE: If the query string starts with the prefix ``"person:"``, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * ``approxMatches`` and ``attributes`` parameters, but + * it will respect the values of ``includeCancelled`` and + * ``misStatus``. In addition, an LQL query will ignore the + * ``orderBy`` parameter, since LQL queries always return + * results in ID order. + * * ``[ HTTP: GET /api/v1/person/search?query=... ]`` * * @param string $query [required] The search string. * @param boolean $approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to ``false``. + * to ``false``. This is ignored for LQL queries. * @param boolean $includeCancelled [optional] Flag to allow cancelled people to * be included (people who are no longer members of the University). * Defaults to ``false``. @@ -283,14 +292,16 @@ class PersonMethods * mutually exclusive. * @param string $attributes [optional] A comma-separated list of attributes to * consider when searching. If this is ``null`` (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * @param int $offset [optional] The number of results to skip at the start * of the search. Defaults to 0. * @param int $limit [optional] The maximum number of results to return. * Defaults to 100. * @param string $orderBy [optional] The order in which to list the results. * This may be either ``"identifier"`` or ``"surname"`` (the - * default). + * default for non-LQL queries). This is ignored for LQL queries, which + * always return results in identifier order. * @param string $fetch [optional] A comma-separated list of any additional * attributes or references to fetch. * @@ -331,12 +342,19 @@ class PersonMethods * Count the number of people that would be returned by a search using * a free text query string. * + * NOTE: If the query string starts with the prefix ``"person:"``, it + * is treated as an <a href="/lql" target="_top">LQL query</a>, allowing + * more advanced searches. An LQL query will ignore the + * ``approxMatches`` and ``attributes`` parameters, but + * it will respect the values of ``includeCancelled`` and + * ``misStatus``. + * * ``[ HTTP: GET /api/v1/person/search-count?query=... ]`` * * @param string $query [required] The search string. * @param boolean $approxMatches [optional] Flag to enable more approximate * matching in the search, causing more results to be returned. Defaults - * to ``false``. + * to ``false``. This is ignored for LQL queries. * @param boolean $includeCancelled [optional] Flag to allow cancelled people to * be included (people who are no longer members of the University). * Defaults to ``false``. @@ -355,7 +373,8 @@ class PersonMethods * mutually exclusive. * @param string $attributes [optional] A comma-separated list of attributes to * consider when searching. If this is ``null`` (the default) then - * all attribute schemes marked as searchable will be included. + * all attribute schemes marked as searchable will be included. This is + * ignored for LQL queries. * * @return int The number of matching people. */ diff --git a/src/python/ibisclient/methods.py b/src/python/ibisclient/methods.py index fbcf3452effcaa84614b2c98a04ad203b4d3abbf..87368595c475376aca0e1c61d8429d45a7ad3023 100644 --- a/src/python/ibisclient/methods.py +++ b/src/python/ibisclient/methods.py @@ -224,6 +224,15 @@ class GroupMethods: but the optional `fetch` parameter may be used to fetch additional attributes or references. + .. note:: + If the query string starts with the prefix ``"group:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` parameter, but it will respect the value of + `includeCancelled`. In addition, an LQL query will ignore + the `orderBy` parameter, since LQL queries always return + results in ID order. + ``[ HTTP: GET /api/v1/group/search?query=... ]`` **Parameters** @@ -233,7 +242,7 @@ class GroupMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled groups to @@ -249,8 +258,9 @@ class GroupMethods: `orderBy` : str [optional] The order in which to list the results. - This may be ``"groupid"``, ``"name"`` (the default) or - ``"title"``. + This may be ``"groupid"``, ``"name"`` (the default for non-LQL + queries) or ``"title"``. This is ignored for LQL queries, which + always return results in groupid order. `fetch` : str [optional] A comma-separated list of any additional @@ -284,6 +294,13 @@ class GroupMethods: Count the number of groups that would be returned by a search using a free text query string. + .. note:: + If the query string starts with the prefix ``"group:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` parameter, but it will respect the value of + `includeCancelled`. + ``[ HTTP: GET /api/v1/group/search-count?query=... ]`` **Parameters** @@ -293,7 +310,7 @@ class GroupMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled groups to @@ -743,6 +760,15 @@ class InstitutionMethods: returned, but the optional `fetch` parameter may be used to fetch additional attributes or references. + .. note:: + If the query string starts with the prefix ``"inst:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` and `attributes` parameters, but + it will respect the value of `includeCancelled`. In + addition, an LQL query will ignore the `orderBy` parameter, + since LQL queries always return results in ID order. + ``[ HTTP: GET /api/v1/inst/search?query=... ]`` **Parameters** @@ -752,7 +778,7 @@ class InstitutionMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled institutions @@ -761,7 +787,8 @@ class InstitutionMethods: `attributes` : str [optional] A comma-separated list of attributes to consider when searching. If this is :any:`None` (the default) then - all attribute schemes marked as searchable will be included. + all attribute schemes marked as searchable will be included. This is + ignored for LQL queries. `offset` : int [optional] The number of results to skip at the start @@ -773,7 +800,9 @@ class InstitutionMethods: `orderBy` : str [optional] The order in which to list the results. - This may be either ``"instid"`` or ``"name"`` (the default). + This may be either ``"instid"`` or ``"name"`` (the default for + non-LQL queries). This is ignored for LQL queries, which always return + results in instid order. `fetch` : str [optional] A comma-separated list of any additional @@ -809,6 +838,13 @@ class InstitutionMethods: Count the number of institutions that would be returned by a search using a free text query string. + .. note:: + If the query string starts with the prefix ``"inst:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` and `attributes` parameters, but + it will respect the value of `includeCancelled`. + ``[ HTTP: GET /api/v1/inst/search-count?query=... ]`` **Parameters** @@ -818,7 +854,7 @@ class InstitutionMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled institutions @@ -827,7 +863,8 @@ class InstitutionMethods: `attributes` : str [optional] A comma-separated list of attributes to consider when searching. If this is :any:`None` (the default) then - all attribute schemes marked as searchable will be included. + all attribute schemes marked as searchable will be included. This is + ignored for LQL queries. **Returns** int @@ -1466,6 +1503,16 @@ class PersonMethods: but the optional `fetch` parameter may be used to fetch additional attributes or references. + .. note:: + If the query string starts with the prefix ``"person:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` and `attributes` parameters, but + it will respect the values of `includeCancelled` and + `misStatus`. In addition, an LQL query will ignore the + `orderBy` parameter, since LQL queries always return + results in ID order. + ``[ HTTP: GET /api/v1/person/search?query=... ]`` **Parameters** @@ -1475,7 +1522,7 @@ class PersonMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled people to @@ -1500,7 +1547,8 @@ class PersonMethods: `attributes` : str [optional] A comma-separated list of attributes to consider when searching. If this is :any:`None` (the default) then - all attribute schemes marked as searchable will be included. + all attribute schemes marked as searchable will be included. This is + ignored for LQL queries. `offset` : int [optional] The number of results to skip at the start @@ -1513,7 +1561,8 @@ class PersonMethods: `orderBy` : str [optional] The order in which to list the results. This may be either ``"identifier"`` or ``"surname"`` (the - default). + default for non-LQL queries). This is ignored for LQL queries, which + always return results in identifier order. `fetch` : str [optional] A comma-separated list of any additional @@ -1551,6 +1600,14 @@ class PersonMethods: Count the number of people that would be returned by a search using a free text query string. + .. note:: + If the query string starts with the prefix ``"person:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` and `attributes` parameters, but + it will respect the values of `includeCancelled` and + `misStatus`. + ``[ HTTP: GET /api/v1/person/search-count?query=... ]`` **Parameters** @@ -1560,7 +1617,7 @@ class PersonMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled people to @@ -1585,7 +1642,8 @@ class PersonMethods: `attributes` : str [optional] A comma-separated list of attributes to consider when searching. If this is :any:`None` (the default) then - all attribute schemes marked as searchable will be included. + all attribute schemes marked as searchable will be included. This is + ignored for LQL queries. **Returns** int diff --git a/src/python3/ibisclient/methods.py b/src/python3/ibisclient/methods.py index 724f8ad964627fb043fa46b1a284bbfbc196709f..7c37913960c49c4b78f08d2a2df0e3411a0267bf 100644 --- a/src/python3/ibisclient/methods.py +++ b/src/python3/ibisclient/methods.py @@ -224,6 +224,15 @@ class GroupMethods: but the optional `fetch` parameter may be used to fetch additional attributes or references. + .. note:: + If the query string starts with the prefix ``"group:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` parameter, but it will respect the value of + `includeCancelled`. In addition, an LQL query will ignore + the `orderBy` parameter, since LQL queries always return + results in ID order. + ``[ HTTP: GET /api/v1/group/search?query=... ]`` **Parameters** @@ -233,7 +242,7 @@ class GroupMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled groups to @@ -249,8 +258,9 @@ class GroupMethods: `orderBy` : str [optional] The order in which to list the results. - This may be ``"groupid"``, ``"name"`` (the default) or - ``"title"``. + This may be ``"groupid"``, ``"name"`` (the default for non-LQL + queries) or ``"title"``. This is ignored for LQL queries, which + always return results in groupid order. `fetch` : str [optional] A comma-separated list of any additional @@ -284,6 +294,13 @@ class GroupMethods: Count the number of groups that would be returned by a search using a free text query string. + .. note:: + If the query string starts with the prefix ``"group:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` parameter, but it will respect the value of + `includeCancelled`. + ``[ HTTP: GET /api/v1/group/search-count?query=... ]`` **Parameters** @@ -293,7 +310,7 @@ class GroupMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled groups to @@ -743,6 +760,15 @@ class InstitutionMethods: returned, but the optional `fetch` parameter may be used to fetch additional attributes or references. + .. note:: + If the query string starts with the prefix ``"inst:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` and `attributes` parameters, but + it will respect the value of `includeCancelled`. In + addition, an LQL query will ignore the `orderBy` parameter, + since LQL queries always return results in ID order. + ``[ HTTP: GET /api/v1/inst/search?query=... ]`` **Parameters** @@ -752,7 +778,7 @@ class InstitutionMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled institutions @@ -761,7 +787,8 @@ class InstitutionMethods: `attributes` : str [optional] A comma-separated list of attributes to consider when searching. If this is :any:`None` (the default) then - all attribute schemes marked as searchable will be included. + all attribute schemes marked as searchable will be included. This is + ignored for LQL queries. `offset` : int [optional] The number of results to skip at the start @@ -773,7 +800,9 @@ class InstitutionMethods: `orderBy` : str [optional] The order in which to list the results. - This may be either ``"instid"`` or ``"name"`` (the default). + This may be either ``"instid"`` or ``"name"`` (the default for + non-LQL queries). This is ignored for LQL queries, which always return + results in instid order. `fetch` : str [optional] A comma-separated list of any additional @@ -809,6 +838,13 @@ class InstitutionMethods: Count the number of institutions that would be returned by a search using a free text query string. + .. note:: + If the query string starts with the prefix ``"inst:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` and `attributes` parameters, but + it will respect the value of `includeCancelled`. + ``[ HTTP: GET /api/v1/inst/search-count?query=... ]`` **Parameters** @@ -818,7 +854,7 @@ class InstitutionMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled institutions @@ -827,7 +863,8 @@ class InstitutionMethods: `attributes` : str [optional] A comma-separated list of attributes to consider when searching. If this is :any:`None` (the default) then - all attribute schemes marked as searchable will be included. + all attribute schemes marked as searchable will be included. This is + ignored for LQL queries. **Returns** int @@ -1466,6 +1503,16 @@ class PersonMethods: but the optional `fetch` parameter may be used to fetch additional attributes or references. + .. note:: + If the query string starts with the prefix ``"person:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` and `attributes` parameters, but + it will respect the values of `includeCancelled` and + `misStatus`. In addition, an LQL query will ignore the + `orderBy` parameter, since LQL queries always return + results in ID order. + ``[ HTTP: GET /api/v1/person/search?query=... ]`` **Parameters** @@ -1475,7 +1522,7 @@ class PersonMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled people to @@ -1500,7 +1547,8 @@ class PersonMethods: `attributes` : str [optional] A comma-separated list of attributes to consider when searching. If this is :any:`None` (the default) then - all attribute schemes marked as searchable will be included. + all attribute schemes marked as searchable will be included. This is + ignored for LQL queries. `offset` : int [optional] The number of results to skip at the start @@ -1513,7 +1561,8 @@ class PersonMethods: `orderBy` : str [optional] The order in which to list the results. This may be either ``"identifier"`` or ``"surname"`` (the - default). + default for non-LQL queries). This is ignored for LQL queries, which + always return results in identifier order. `fetch` : str [optional] A comma-separated list of any additional @@ -1551,6 +1600,14 @@ class PersonMethods: Count the number of people that would be returned by a search using a free text query string. + .. note:: + If the query string starts with the prefix ``"person:"``, it + is treated as an `LQL query </lql>`_, allowing + more advanced searches. An LQL query will ignore the + `approxMatches` and `attributes` parameters, but + it will respect the values of `includeCancelled` and + `misStatus`. + ``[ HTTP: GET /api/v1/person/search-count?query=... ]`` **Parameters** @@ -1560,7 +1617,7 @@ class PersonMethods: `approxMatches` : bool [optional] Flag to enable more approximate matching in the search, causing more results to be returned. Defaults - to :any:`False`. + to :any:`False`. This is ignored for LQL queries. `includeCancelled` : bool [optional] Flag to allow cancelled people to @@ -1585,7 +1642,8 @@ class PersonMethods: `attributes` : str [optional] A comma-separated list of attributes to consider when searching. If this is :any:`None` (the default) then - all attribute schemes marked as searchable will be included. + all attribute schemes marked as searchable will be included. This is + ignored for LQL queries. **Returns** int