class DroolsConceptService implements ConceptService {

	@Override
	public Set<String> findStatedAncestorsOfConcept(Concept concept) {
		if(concept == null || concept.getId().equals(Constants.ROOT_CONCEPT)) {
			return Collections.emptySet();
		}
		DroolsConcept droolsConcept = repository.getConcept(concept.getId());
		Set<String> statedParents = new HashSet<>();
		for (DroolsRelationship relationship : droolsConcept.getRelationships()) {
			if(relationship.isActive() 
					&& !relationship.isAxiomGCI() 
					&& Constants.IS_A.equals(relationship.getTypeId())
					&& Constants.STATED_RELATIONSHIP.equals(relationship.getCharacteristicTypeId())) {
				statedParents.add(relationship.getDestinationId());
			}
		}
		Set<String> resultSet = new HashSet<>(statedParents);
		for (String statedParent : statedParents) {
			resultSet.addAll(findStatedAncestorsOfConcept(repository.getConcept(statedParent)));
		}
		return resultSet;
	}

	public  DroolsConceptService(SnomedDroolsComponentRepository repository);

}