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 Repere's identifier: its <b><i>NAME</i></b>.
 */
public class RepereIdExtractor implements TransformerR07 {

    @Override
    public String makeIdentifier(final R07Quad line) {
        return line.getRepereComposant().getName();
    }

    @Override
    public String makeIdentifier(final R07PartRfPart line) {
        return line.getRfPartComponent().getName();
    }

    @Override
    public String makeIdentifier(final R07ReceptorLine line) {
        return line.getRepere().getName();
    }

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

    @Override
    public String makeIdentifier(final R07AltPart altPart) {
        return "";
    }

}
