All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.ehex.foss.gematik.specifications.gemSpec_TSL.AFOs Maven / Gradle / Ivy

Go to download

This project provides the eHealthExperts-related, commonly used gematik specifications (AFOs, Specs, PTStBs, etc.).

There is a newer version: 2.5.2
Show newest version
package de.ehex.foss.gematik.specifications.gemSpec_TSL;

import static de.ehex.foss.gematik.specifications.AFOType.MUST;
import static java.util.Objects.nonNull;

import de.ehex.foss.gematik.specifications.AFO;
import de.ehex.foss.gematik.specifications.AFOType;

/**
 * Enumeration of all – currently considered – {@link AFO}s of {@code [gemSpec_TSL]}.
 *
 * @author Stefan Gasterstädt
 * @since September 21st, 2016
 */
public enum AFOs implements AFO {

    // TODO: AFO-Typ klären derzeit implizit MUSS-AFO
    TIP1_A_5120("TIP1-A_5120", "Clients des TSL-Dienstes: HTTP-Komprimierung unterstützen"),

    ;

    private AFOs(final String afoID, final String title) {
        this(afoID, title, MUST);
    }

    private AFOs(final String afoID, final String title, final AFOType level) {
        assert nonNull(afoID) : "There must be a non-null AFO id!";
        assert !afoID.isEmpty() : "There must be a non-empty AFO id!";
        assert nonNull(title) : "There must be a non-null AFO title!";
        assert !title.isEmpty() : "There must be a non-empty AFO title!";
        assert nonNull(level) : "There must be a non-null AFO type!";

        this.afoID = afoID;
        this.title = title;
        this.level = level;
    }

    private final String afoID;

    @Override
    public String getAfoId() {
        assert nonNull(this.afoID) : "Class invariant violation!";
        assert !this.afoID.isEmpty() : "Class invariant violation!";

        return this.afoID;
    }

    private final String title;

    @Override
    public String getLabel() {
        assert nonNull(this.title) : "Class invariant violation!";
        assert !this.title.isEmpty() : "Class invariant violation!";

        return this.title;
    }

    private final AFOType level;

    @Override
    public AFOType getType() {
        assert nonNull(this.level) : "Class invariant violation!";

        return this.level;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy