package com.capgemini.reports.definition.r07report.data.filter.identifiers;

import com.capgemini.reports.definition.r07report.data.TransformerR07;
import com.capgemini.reports.definition.r07report.data.extractor.lines.*;

/**
 * Extracts a receptor's identifier: its Id.
 */
public class ReceptorIdExtractor implements TransformerR07 {

    @Override
    public String makeIdentifier(final R07Quad line) {
        return line.getRecepteur().getItemId();
    }

    @Override
    public String makeIdentifier(final R07PartRfPart line) {
        return line.getPartReceptor().getItemId();
    }

    @Override
    public String makeIdentifier(final R07ReceptorLine line) {
        return line.getRecepteur().getItemId();
    }

    @Override
    public String makeIdentifier(final R07ProductGeneric line) {
        return line.getProductReceptor().getItemId();
    }

    @Override
    public String makeIdentifier(final R07AltPart altPart) {
        return altPart.getAltBL().getSnecmaObject().getItemId();
    }
}
