Search in sources :

Example 16 with SnomedRelationship

use of com.b2international.snowowl.snomed.core.domain.SnomedRelationship in project snow-owl by b2ihealthcare.

the class SnomedRelationshipConverter method toResource.

@Override
protected SnomedRelationship toResource(final SnomedRelationshipIndexEntry input) {
    final SnomedRelationship result = new SnomedRelationship();
    result.setActive(input.isActive());
    result.setCharacteristicTypeId(input.getCharacteristicTypeId());
    result.setDestinationNegated(input.isDestinationNegated());
    result.setEffectiveTime(toEffectiveTime(input.getEffectiveTime()));
    result.setId(input.getId());
    result.setModifierId(toRelationshipModifier(input.isUniversal()));
    result.setModuleId(input.getModuleId());
    result.setIconId(input.getIconId());
    result.setReleased(input.isReleased());
    result.setRelationshipGroup(input.getRelationshipGroup());
    result.setUnionGroup(input.getUnionGroup());
    result.setDestinationId(input.getDestinationId());
    result.setValueAsObject(input.getValueAsObject());
    result.setSourceId(input.getSourceId());
    result.setTypeId(input.getTypeId());
    result.setScore(input.getScore());
    if (input.getMemberOf() != null) {
        result.setMemberOf(ImmutableSortedSet.copyOf(input.getMemberOf()));
    }
    if (input.getActiveMemberOf() != null) {
        result.setActiveMemberOf(ImmutableSortedSet.copyOf(input.getActiveMemberOf()));
    }
    return result;
}
Also used : SnomedRelationship(com.b2international.snowowl.snomed.core.domain.SnomedRelationship)

Aggregations

SnomedRelationship (com.b2international.snowowl.snomed.core.domain.SnomedRelationship)16 SnomedConcept (com.b2international.snowowl.snomed.core.domain.SnomedConcept)8 Options (com.b2international.commons.options.Options)6 SnomedDescription (com.b2international.snowowl.snomed.core.domain.SnomedDescription)5 SnomedConceptRequestCache (com.b2international.snowowl.snomed.datastore.request.SnomedConceptRequestCache)5 SnomedReferenceSetMember (com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember)4 BranchContext (com.b2international.snowowl.core.domain.BranchContext)3 SnomedConcepts (com.b2international.snowowl.snomed.core.domain.SnomedConcepts)3 AbstractSnomedApiTest (com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest)3 Test (org.junit.Test)3 ExtendedLocale (com.b2international.commons.http.ExtendedLocale)2 Json (com.b2international.commons.json.Json)2 ComponentIdentifier (com.b2international.snowowl.core.ComponentIdentifier)2 Concepts (com.b2international.snowowl.snomed.common.SnomedConstants.Concepts)2 SnomedRf2Headers (com.b2international.snowowl.snomed.common.SnomedRf2Headers)2 SnomedCoreComponent (com.b2international.snowowl.snomed.core.domain.SnomedCoreComponent)2 SnomedRelationships (com.b2international.snowowl.snomed.core.domain.SnomedRelationships)2 SnomedRefSetType (com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType)2 SnomedRelationshipIndexEntry (com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry)2 List (java.util.List)2