Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawn.f.cook2012-05-10 18:45:11 +0000
committerkwilk2012-05-10 18:45:11 +0000
commite4062025416e9478d1e72e8a6f05814fe45106d1 (patch)
treeb09a8b922c9347e9c82a1f5ddd1b0e8d6fe12b7a /plugins/org.eclipse.osee.orcs.rest
parent548150fc9c8d514a62d2d8e7775c947b858eba9b (diff)
downloadorg.eclipse.osee-e4062025416e9478d1e72e8a6f05814fe45106d1.tar.gz
org.eclipse.osee-e4062025416e9478d1e72e8a6f05814fe45106d1.tar.xz
org.eclipse.osee-e4062025416e9478d1e72e8a6f05814fe45106d1.zip
refinement: Improve JavaDocs for ArtifactSearch_V1
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.rest')
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/ArtifactSearch_V1.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/ArtifactSearch_V1.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/ArtifactSearch_V1.java
index 9884489902..27e00bdba9 100644
--- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/ArtifactSearch_V1.java
+++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/ArtifactSearch_V1.java
@@ -46,6 +46,59 @@ public class ArtifactSearch_V1 extends ArtifactSearch {
dsl = new SearchDsl(handlers, translator);
}
+ /**
+ * @param alt The return data format. Possible values:
+ * <ul>
+ * <li>xml
+ * <li>text (not supported)
+ * <li>json (not supported)
+ * <li>xhtml (not supported)
+ * </ul>
+ * @param fields What to do with the query. For example, once the search has produced a result set, what aspect of
+ * the result set should be returned? Possible values:
+ * <ul>
+ * <li>count = Return an integer value counting the number of items returned by the query. Note that none of the
+ * artifacts or attributes of the search result will be returned to the client. Only a count of the search result
+ * items.
+ * </ul>
+ * @param rawQuery A query string with a custom syntax (see below). The query string syntax must be properly <a
+ * href="http://en.wikipedia.org/wiki/Percent-encoding">URL-encoded</a>
+ * @param fromTransaction (Optional) Transaction ID for a historical context. Use this parameter if you want the
+ * search results to represent a specific point in time in the past. Without this parameter search results will
+ * reflect the most current state of the data.
+ * @param includeTypeInheritance (Optional) Boolean parameter that configures the search to use hiearchical type
+ * inheritance if possible.
+ * @param includeCache (Optional) Boolean parameter that configures the search to ???
+ * @param includeDeleted (Optional) Boolean parameter that configures the search to include deleted artifacts in its
+ * result set and analysis.
+ * @return A {@link SearchResult} object containing the results of the search, configuration and analysis
+ * information.
+ * @throws OseeCoreException<br>
+ * <br>
+ * <b>rawQuery Syntax</b><br>
+ * The query syntax is composed of one or more predicates - atomic search instructions - that can be appended
+ * together as compound AND or OR query statements. Each predicate is surrounded by square brackets '[' and ']' which
+ * makes writing a formal definitoin of the syntax a little confusing since the square bracket traditionally
+ * surrounds optional items in a syntax. Because of this please note in the formal definition below literal square
+ * brackets - those which belong as actual characters in the syntax - are escaped with a back slash character '\'.<br>
+ * <b>Example Request String</b><br>
+ * <FONT FACE="Courier New">
+ * http://localhost:8089/oseex/branch/AyH_fDpMERA+zDfML4gA/artifact/search/v1?alt=xml&fields=
+ * count&q=[t:attrType%26tp: 123%26op:==%26v:Smith]%26[t:attrType%26tp:456%26op:==%26v:John]</FONT><br>
+ * <i>Note: "%26" = "&"</i>
+ * <ul>
+ * <li><b>http://localhost:8089/oseex/branch/AyH_fDpMERA+zDfML4gA/artifact/search/v1</b> ==> URL address
+ * <li><b>alt=xml</b> ==> Search results will be formatted as XML
+ * <li><b>fields=count</b> ==> Result returned will be a count of the search results
+ * <li><b>q=[...]%26[...]</b> ==> The query string. In this example there are two search predicates "AND"-ed
+ * together.
+ * <li><b>t:attrType%26tp: 123%26op:==%26v:Smith</b> ==> Presumably "123" is the UUID for the "Last Name" attribute
+ * type. This predicate can be translated into English as
+ * <b>"Find all the artifacts with a <i>Last Name</i> <i>attribute</i> that equals <i>'Smith'</i>."</b>
+ * <li><b>t:attrType%26tp:456%26op:==%26v:John</b> ==> Presumably "456" is the UUID for the "First Name" attribute
+ * type. <b>"Find all the artifacts with a <i>First Name</i> <i>attribute</i> that equals <i>'John'</i>."</b>
+ * </ul>
+ */
@GET
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public SearchResult getSearchWithQueryParams(@QueryParam("alt") String alt, @QueryParam("fields") String fields, @QueryParam("q") String rawQuery, @QueryParam("fromTx") int fromTransaction, @QueryParam("inherits") boolean includeTypeInheritance, @QueryParam("cached") boolean includeCache, @QueryParam("includeDeleted") boolean includeDeleted) throws OseeCoreException {

Back to the top