Re: [base] Querying annotations

2010-01-06 Thread Nicklas Nordborg
Olivier Lefevre wrote: The docs leave me unsure of whether one can use the Query facility to search annotations. Is there any place I can look? An example would be wonderful. The net.sf.basedb.core.query.Annotations class contains a collection of factory methods for creating restrictions

Re: [base] Querying annotations

2010-01-06 Thread Nicklas Nordborg
Olivier Lefevre wrote: Thanks. Between that and the other thread I am getting I should be able to work out something. What about AnnotationSet.getQuery(), though: can't you search that and then use getItem() to go back to the item? This is not a public method since the query will return

Re: [base] Querying annotations

2010-01-05 Thread Bob MacCallum
AnnotationSet.getQuery() seems to be private also, but there are ways to get at it... Olivier Lefevre writes: Thanks. Between that and the other thread I am getting I should be able to work out something. What about AnnotationSet.getQuery(), though: can't you search that and then

[base] Querying annotations

2010-01-04 Thread Bob MacCallum
Hi Olivier, This is how we search Samples for a particular annotation. I'm not sure if it will compile because I've simplified it for you. ItemQuerynet.sf.basedb.core.Sample sampleQuery = net.sf.basedb.core.Sample.getQuery(); sampleQuery.include(Include.SHARED);

Re: [base] Querying annotations

2010-01-04 Thread Olivier Lefevre
Thanks. Between that and the other thread I am getting I should be able to work out something. What about AnnotationSet.getQuery(), though: can't you search that and then use getItem() to go back to the item? -- O.L.