NCATS-Tangerine / beacon-aggregator

A web service that operates over the Beacon network to provide a single software interface over the all the Beacons
Other
2 stars 0 forks source link

ConceptRepository getByClique #50

Open lhannest opened 6 years ago

lhannest commented 6 years ago

The following method looks incorrect, or at least has a very confusing name:

@Query("MATCH path = (concept:Concept {clique: {clique}})-[:TYPE]->(type:ConceptType) RETURN path LIMIT 1")
public Neo4jConcept getByClique(@Param("clique") String clique);

A clique is a collection of concept ID's. So shouldn't the method instead return all the concepts that are identified by that clique rather than just the first one? It seems it should instead be:

@Query("MATCH path = (concept:Concept {clique: {clique}})-[:TYPE]->(type:ConceptType) RETURN path")
public List<Neo4jConcept> getByClique(@Param("clique") String clique);

If there is only supposed to be a single Concept for any cliqueId, then why do we have both a Concept as well as a Clique in our data model? This would be redundant.