Instead of doing a textual query on the triple, can you add a fundamental category to the triple class which embodies all the AMD triples that should get this treatment? Then you can query with an isAMD() (or whatever it's called) predicate?