}
article.setSubjects(new ArrayList<SubjectsEntity>(subjectsEntityMap.values()));
List<TripletEntity> tripletEntities = new ArrayList<TripletEntity>();
for (Triplet triplet : tree.keySet()) {
TripletEntity tripletEntity = createEntityFromTriplet(triplet, subjectsEntityMap);
tripletEntities.add(tripletEntity);
tripletEntities.addAll(treeToList(tripletEntity, tree.get(triplet), subjectsEntityMap));
}
for (TripletEntity tripletEntity : tripletEntities) {
tripletEntity.setId(simpleDAO.addObjects(tripletEntity));
}
article.setTriplets(tripletEntities);
simpleDAO.updateObject(article);
}