this is fetching all statements about the CD - you want annotations to
the CD
try this:
Collection<Statements> stmts = obdsql.getStatementsByQuery(new
AnnotationLinkQueryTerm(cdqt));
see:
http://www.berkeleybop.org/obd/docs/org/obd/query/AnnotationLinkQueryTerm.html
Can you add a junit for your desired behavior?
>
> Chris.
>
> Given a statement from OBD Phenocape looks like
>
> <Taxon> encodes (<Quality> inheres_in <Entity>)
>
> I want to run a query like
>
> ?x encodes (<Quality> inheres_in <Entity>)
>
> that returns values for ?x.
>
> When I run the getStatementsByQuery method on the OBDSQLShard
> instance, I suspect I'm running the
> query
>
> (<Quality> inheres_in <Entity>) ?R ?y
>
> which is not really what I'm looking for.
Yes, this is correct, your original query was doing this. The query I
suggest below should give you what you need