I was struggling to understand how we might make searching a little bit more powerful today and I was thinking that maybe it would help if we introduced functions. Let me try to explain via two use cases.
1. Find a JAR which has a method annotated with @Foo
In GQL this would become something like.
select artifact where jar:methodIsAnnotatedWith(foo.Foo)
Contrast with the previously suggested XPath notation:
select artifact where /
2. Find all jars in the transitive dependency tree of galaxy-web.jar
Lets say you want create a view/virtual workspace over an application so that netboot knows exactly what jars to load. In this case you might want to load all artifacts which are in the transitive dependency tree of an artifact. You could then implement a function like this:
select artifact where maven:isInTransitiveTree('/foo/bar/galaxy-web.jar');