use of com.b2international.snowowl.snomed.core.domain.SnomedConcept in project snow-owl by b2ihealthcare.
the class TerminologyTreeTest method getProximalPrimitiveParentsOfPrimitiveConcept.
@Ignore("Fix create sibling concept creation to enable this feature in TerminologyTree")
@Test
public void getProximalPrimitiveParentsOfPrimitiveConcept() throws Exception {
final TerminologyTree tree = new TestTree().addNode(N1, true).build();
final SnomedConcept n1 = tree.getNode(N1);
assertThat(tree.getProximalPrimitiveParents(N1)).containsOnly(n1);
}
use of com.b2international.snowowl.snomed.core.domain.SnomedConcept in project snow-owl by b2ihealthcare.
the class TerminologyTreeTest method getProximalPrimitiveParentsOfDefiningConceptWithMultiplePrimitiveAncestors.
@Test
public void getProximalPrimitiveParentsOfDefiningConceptWithMultiplePrimitiveAncestors() throws Exception {
final TerminologyTree tree = new TestTree().addNode(N1, true, null, newHashSet(N2)).addNode(N2, true, newHashSet(N1), newHashSet(N3)).addNode(N3, false, newHashSet(N2)).build();
final SnomedConcept n2 = tree.getNode(N2);
assertThat(tree.getProximalPrimitiveParents(N3)).containsOnly(n2);
}
use of com.b2international.snowowl.snomed.core.domain.SnomedConcept in project snow-owl by b2ihealthcare.
the class TerminologyTreeTest method getProximalPrimitiveParentsOfDefiningConceptWithMultiplePrimitiveAncestorsViaLongRoutes.
@Test
public void getProximalPrimitiveParentsOfDefiningConceptWithMultiplePrimitiveAncestorsViaLongRoutes() throws Exception {
final TerminologyTree tree = new TestTree().addNode(N1, true, null, newHashSet(N2, N4)).addNode(N2, true, newHashSet(N1), newHashSet(N3)).addNode(N3, false, newHashSet(N2), newHashSet(N4)).addNode(N4, false, newHashSet(N3, N1)).build();
final SnomedConcept n2 = tree.getNode(N2);
assertThat(tree.getProximalPrimitiveParents(N4)).containsOnly(n2);
}
use of com.b2international.snowowl.snomed.core.domain.SnomedConcept in project snow-owl by b2ihealthcare.
the class TerminologyTreeTest method getProximalPrimitiveWithFixedAncestorSet_ReplacementTest.
@Test
public void getProximalPrimitiveWithFixedAncestorSet_ReplacementTest() throws Exception {
final TerminologyTree tree = new TestTree().addNode(N1, true, null, newHashSet(N2)).addNode(N2, true, newHashSet(N1), newHashSet(N4)).addNode(N3, true, null, newHashSet(N4)).addNode(N4, false, newHashSet(N3, N2)).build();
final SnomedConcept n2 = tree.getNode(N2);
final SnomedConcept n3 = tree.getNode(N3);
assertThat(tree.getProximalPrimitiveParents(N4)).containsOnly(n3, n2);
final SnomedConcept n1 = tree.getNode(N1);
assertThat(tree.getProximalPrimitiveParentIds(newArrayList(n1, n3, n2))).containsOnly(N3, N2);
}
use of com.b2international.snowowl.snomed.core.domain.SnomedConcept in project snow-owl by b2ihealthcare.
the class TerminologyTreeTest method getProximalPrimitiveParentsOfDefiningConceptWithOnePrimitiveParent.
@Test
public void getProximalPrimitiveParentsOfDefiningConceptWithOnePrimitiveParent() throws Exception {
final TerminologyTree tree = new TestTree().addNode(N1, true, null, newHashSet(N2)).addNode(N2, false, newHashSet(N1)).build();
final SnomedConcept n1 = tree.getNode(N1);
assertThat(tree.getProximalPrimitiveParents(N2)).containsOnly(n1);
}
Aggregations