seth redmond wrote: > I have two different functions, one to return annotations with a > given type and a given value, another to return all annotations with > a given value (of any annotation type). > the code for the first is below:
.... > AnnotationSimpleRestriction[] restrictions = restArray.toArray(new >> AnnotationSimpleRestriction[restArray.size()]); >> The AnnotationSimpleRestriction can only be used to find which items (samples, extracts, etc.) that has been annotated with a given annotation type and value. It always works on the AnnotationSet level. It will find all annotation sets that contains an annotation of the given type with the given value. This also gives us the items since AnnotationSet:s are one-to-one related with the items. >> ItemQuery<net.sf.basedb.core.Annotation> annoQuery = >> Annotation.getQuery(); The Annotation.getQuery() is not a public method since it doesn't support the BASE security model. Ie. it doesn't care about the logged in user's permissions and may return items to which the user doesn't have access to. This method is only used internally by BASE when the permissions can be applied by other means. In all practical cases this means that we are restricted to query the annotations on a single item. /Nicklas ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ basedb-devel mailing list basedb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/basedb-devel