I would like to implement some naming conventions with the help of jQAssistant. All classes implementing the PropertyConverter
interface should have names ending with Converter
. This rule does not apply to anonymous inner classes. Now I have two queries. This one returns all classes violating the naming rule:
MATCH (t:Type)-[:IMPLEMENTS]->(i:Type)
WHERE i.fqn='PropertyConverter' And
NOT t.name =~ '.*Converter'
RETURN t.fqn
But this query also returns inner classes which have names like ABC$1
. I can find these classes with the following query:
MATCH (t:Type)-[:IMPLEMENTS]->(i:Type)
WHERE i.fqn='org.apache.tamaya.PropertyConverter'
AND NOT t.name =~ '.*Converter'
WITH t
MATCH (h:Type)-[:DECLARES]->(t)
RETURN distinct t.fqn, h.fqn
But I was unable to combine both queries so that I will get only the results of the first query which are not contained in the second result set.
How can I combine both queries?