for (Concept requiredConcept : concept.getRequiresConcepts()) {
applyConcept(requiredConcept);
}
try {
store.beginTransaction();
ConceptDescriptor conceptDescriptor = store.find(ConceptDescriptor.class, concept.getId());
if (conceptDescriptor == null) {
console.info("Applying concept '" + concept.getId() + "'.");
reportWriter.beginConcept(concept);
reportWriter.setResult(execute(concept));
conceptDescriptor = store.create(ConceptDescriptor.class);
conceptDescriptor.setId(concept.getId());
reportWriter.endConcept();
}
store.commitTransaction();
} catch (XOException e) {
store.rollbackTransaction();