test_class.declarator: droolsDescriptionService
test_class.modifier: private
test_class.original_string: private DroolsDescriptionService droolsDescriptionService;
test_class.type: DroolsDescriptionService
test_class.var_name: droolsDescriptionService
test_class.file: snomed-drools-rf2-validator/src/test/java/org/ihtsdo/drools/validator/rf2/service/DroolsDescriptionServiceTest.java
test_class.identifier: DroolsDescriptionServiceTest
test_class.superclass: extends BaseServiceTest
test_case.body: @Test
      public void testFindFSNs() {
          repository.getConcept("1263005").getDescriptions().stream()
                  .filter(d -> ConceptConstants.FSN.equals(d.getTypeId()))
                  .forEach(d -> d.getAcceptabilityMap().put(ConceptConstants.US_EN_LANGUAGE_REFERENCE_SET, Constants.ACCEPTABILITY_PREFERRED));
  
          Set<String> conceptsIds = new HashSet<>();
          conceptsIds.add("1263005");
          Set<String> results = droolsDescriptionService.getFSNs(conceptsIds, ConceptConstants.US_EN_LANGUAGE_REFERENCE_SET);
          Assert.assertEquals(1, results.size());
          for (String result : results) {
              Assert.assertEquals("Distinctive arrangement of microtubules (cell structure)", result);
          }
  
      }
test_case.class_method_signature: DroolsDescriptionServiceTest.testFindFSNs()
test_case.full_signature: @Test public void testFindFSNs()
test_case.identifier: testFindFSNs
test_case.invocations: forEach filter stream getDescriptions getConcept equals getTypeId put getAcceptabilityMap add getFSNs assertEquals size assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFindFSNs()
focal_class.declarator: FULLY_SPECIFIED_NAME = "900000000000003001"
focal_class.modifier: private static final
focal_class.original_string: private static final String FULLY_SPECIFIED_NAME = "900000000000003001";
focal_class.type: String
focal_class.var_name: FULLY_SPECIFIED_NAME
focal_class.declarator: PREFERRED_ACCEPTABILITY = "900000000000548007"
focal_class.modifier: private static final
focal_class.original_string: private static final String PREFERRED_ACCEPTABILITY = "900000000000548007";
focal_class.type: String
focal_class.var_name: PREFERRED_ACCEPTABILITY
focal_class.declarator: repository
focal_class.modifier: private final
focal_class.original_string: private final SnomedDroolsComponentRepository repository;
focal_class.type: SnomedDroolsComponentRepository
focal_class.var_name: repository
focal_class.declarator: droolsDescriptionIndex
focal_class.modifier: private final
focal_class.original_string: private final DroolsDescriptionIndex droolsDescriptionIndex;
focal_class.type: DroolsDescriptionIndex
focal_class.var_name: droolsDescriptionIndex
focal_class.declarator: testResourceProvider
focal_class.modifier: private final
focal_class.original_string: private final TestResourceProvider testResourceProvider;
focal_class.type: TestResourceProvider
focal_class.var_name: testResourceProvider
focal_class.file: snomed-drools-rf2-validator/src/main/java/org/ihtsdo/drools/validator/rf2/service/DroolsDescriptionService.java
focal_class.identifier: DroolsDescriptionService
focal_class.interfaces: implements DescriptionService
focal_class.class_method_signature: DroolsDescriptionService.DroolsDescriptionService(SnomedDroolsComponentRepository repository, TestResourceProvider testResourceProvider)
focal_class.full_signature: public  DroolsDescriptionService(SnomedDroolsComponentRepository repository, TestResourceProvider testResourceProvider)
focal_class.identifier: DroolsDescriptionService
focal_class.modifiers: public
focal_class.parameters: (SnomedDroolsComponentRepository repository, TestResourceProvider testResourceProvider)
focal_class.signature:  DroolsDescriptionService(SnomedDroolsComponentRepository repository, TestResourceProvider testResourceProvider)
focal_class.class_method_signature: DroolsDescriptionService.getFSNs(Set<String> conceptIds, String... languageRefsetIds)
focal_class.full_signature: @Override public Set<String> getFSNs(Set<String> conceptIds, String... languageRefsetIds)
focal_class.identifier: getFSNs
focal_class.modifiers: @Override public
focal_class.parameters: (Set<String> conceptIds, String... languageRefsetIds)
focal_class.return: Set<String>
focal_class.signature: Set<String> getFSNs(Set<String> conceptIds, String... languageRefsetIds)
focal_class.class_method_signature: DroolsDescriptionService.findActiveDescriptionByExactTerm(String exactTerm)
focal_class.full_signature: @Override public Set<Description> findActiveDescriptionByExactTerm(String exactTerm)
focal_class.identifier: findActiveDescriptionByExactTerm
focal_class.modifiers: @Override public
focal_class.parameters: (String exactTerm)
focal_class.return: Set<Description>
focal_class.signature: Set<Description> findActiveDescriptionByExactTerm(String exactTerm)
focal_class.class_method_signature: DroolsDescriptionService.findInactiveDescriptionByExactTerm(String exactTerm)
focal_class.full_signature: @Override public Set<Description> findInactiveDescriptionByExactTerm(String exactTerm)
focal_class.identifier: findInactiveDescriptionByExactTerm
focal_class.modifiers: @Override public
focal_class.parameters: (String exactTerm)
focal_class.return: Set<Description>
focal_class.signature: Set<Description> findInactiveDescriptionByExactTerm(String exactTerm)
focal_class.class_method_signature: DroolsDescriptionService.findMatchingDescriptionInHierarchy(Concept concept, Description description)
focal_class.full_signature: @Override // FIXME: Currently only finds matching description in ancestors. // Should search all descendants of the second highest ancestor (the ancestor which is a direct child of root). public Set<Description> findMatchingDescriptionInHierarchy(Concept concept, Description description)
focal_class.identifier: findMatchingDescriptionInHierarchy
focal_class.modifiers: @Override // FIXME: Currently only finds matching description in ancestors. // Should search all descendants of the second highest ancestor (the ancestor which is a direct child of root). public
focal_class.parameters: (Concept concept, Description description)
focal_class.return: Set<Description>
focal_class.signature: Set<Description> findMatchingDescriptionInHierarchy(Concept concept, Description description)
focal_class.class_method_signature: DroolsDescriptionService.getCaseSensitiveWordsErrorMessage(Description description)
focal_class.full_signature: @Override public String getCaseSensitiveWordsErrorMessage(Description description)
focal_class.identifier: getCaseSensitiveWordsErrorMessage
focal_class.modifiers: @Override public
focal_class.parameters: (Description description)
focal_class.return: String
focal_class.signature: String getCaseSensitiveWordsErrorMessage(Description description)
focal_class.class_method_signature: DroolsDescriptionService.getLanguageSpecificErrorMessage(Description description)
focal_class.full_signature: @Override public String getLanguageSpecificErrorMessage(Description description)
focal_class.identifier: getLanguageSpecificErrorMessage
focal_class.modifiers: @Override public
focal_class.parameters: (Description description)
focal_class.return: String
focal_class.signature: String getLanguageSpecificErrorMessage(Description description)
focal_class.class_method_signature: DroolsDescriptionService.findParentsNotContainingSemanticTag(Concept concept, String termSematicTag, String... languageRefsetIds)
focal_class.full_signature: @Override public Set<String> findParentsNotContainingSemanticTag(Concept concept, String termSematicTag, String... languageRefsetIds)
focal_class.identifier: findParentsNotContainingSemanticTag
focal_class.modifiers: @Override public
focal_class.parameters: (Concept concept, String termSematicTag, String... languageRefsetIds)
focal_class.return: Set<String>
focal_class.signature: Set<String> findParentsNotContainingSemanticTag(Concept concept, String termSematicTag, String... languageRefsetIds)
focal_class.class_method_signature: DroolsDescriptionService.isRecognisedSemanticTag(String termSemanticTag)
focal_class.full_signature: @Override public boolean isRecognisedSemanticTag(String termSemanticTag)
focal_class.identifier: isRecognisedSemanticTag
focal_class.modifiers: @Override public
focal_class.parameters: (String termSemanticTag)
focal_class.return: boolean
focal_class.signature: boolean isRecognisedSemanticTag(String termSemanticTag)
focal_class.class_method_signature: DroolsDescriptionService.getDroolsDescriptionIndex()
focal_class.full_signature: public DroolsDescriptionIndex getDroolsDescriptionIndex()
focal_class.identifier: getDroolsDescriptionIndex
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: DroolsDescriptionIndex
focal_class.signature: DroolsDescriptionIndex getDroolsDescriptionIndex()
focal_method.body: @Override
  	public Set<String> getFSNs(Set<String> conceptIds, String... languageRefsetIds) {
  		Set<String> fsns = new HashSet<>();
  		for (String conceptId : conceptIds) {
  			DroolsConcept concept = repository.getConcept(conceptId);
  			if(concept != null) {
  				Collection<DroolsDescription> descriptions = concept.getDescriptions();
  				for (DroolsDescription description : descriptions) {
  					if (description.isActive() && description.getTypeId().equals(FULLY_SPECIFIED_NAME)) {
  						if(languageRefsetIds != null && languageRefsetIds.length > 0) {
  							for (String languageRefsetId : languageRefsetIds) {
  								if (PREFERRED_ACCEPTABILITY.equals(description.getAcceptabilityMap().get(languageRefsetId))) {
  									fsns.add(description.getTerm());
  								}
  							}
  						} else {
  							fsns.add(description.getTerm());
  						}
  					}
  				}
  			}
  		}
  		return fsns;
  	}
focal_method.class_method_signature: DroolsDescriptionService.getFSNs(Set<String> conceptIds, String... languageRefsetIds)
focal_method.full_signature: @Override public Set<String> getFSNs(Set<String> conceptIds, String... languageRefsetIds)
focal_method.identifier: getFSNs
focal_method.invocations: getConcept getDescriptions isActive equals getTypeId equals get getAcceptabilityMap add getTerm add getTerm
focal_method.modifiers: @Override public
focal_method.parameters: (Set<String> conceptIds, String... languageRefsetIds)
focal_method.return: Set<String>
focal_method.signature: Set<String> getFSNs(Set<String> conceptIds, String... languageRefsetIds)