use of com.b2international.snowowl.snomed.datastore.request.SnomedRefSetCreateRequestBuilder in project snow-owl by b2ihealthcare.
the class SnomedRefSetRestInput method toRequestBuilder.
public SnomedTransactionalRequestBuilder<String> toRequestBuilder() {
SnomedRefSetCreateRequestBuilder refsetCreateRequest = SnomedRequests.prepareNewRefSet().setType(type).setReferencedComponentType(referencedComponentType);
if (!Strings.isNullOrEmpty(conceptRestInput.getId()) && conceptRestInput.getDescriptions().isEmpty()) {
refsetCreateRequest.setIdentifierId(conceptRestInput.getId());
return refsetCreateRequest;
}
SnomedConceptCreateRequestBuilder conceptRequest = conceptRestInput.toRequestBuilder();
if (conceptRestInput.getRelationships().isEmpty()) {
conceptRequest.addParent(SnomedRefSetUtil.getParentConceptId(getType()));
}
conceptRequest.setRefSet(refsetCreateRequest);
return conceptRequest;
}
Aggregations